From 968ba1e11b54abfec88fefa04ccdd717e46e7771 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Fri, 9 Oct 2026 12:19:44 +0000 Subject: [PATCH 1/2] Configurations: 'specification/eventgrid/resource-manager/Microsoft.EventGrid/EventGrid/tspconfig.yaml', and CommitSHA: '88e2199d770d74f3061a162824185fd6894cb7d7' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6938286 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 787 +++- .../azure-resourcemanager-eventgrid/README.md | 4 +- .../azure-resourcemanager-eventgrid/SAMPLE.md | 957 ++-- .../azure-resourcemanager-eventgrid/pom.xml | 6 +- .../eventgrid/EventGridManager.java | 188 +- .../fluent/CaCertificatesClient.java | 46 +- .../eventgrid/fluent/ChannelsClient.java | 108 +- .../eventgrid/fluent/ClientGroupsClient.java | 46 +- .../eventgrid/fluent/ClientsClient.java | 46 +- .../DomainEventSubscriptionsClient.java | 302 +- .../DomainTopicEventSubscriptionsClient.java | 318 +- .../eventgrid/fluent/DomainTopicsClient.java | 54 +- .../eventgrid/fluent/DomainsClient.java | 144 +- .../fluent/EventGridManagementClient.java | 109 +- .../fluent/EventSubscriptionsClient.java | 606 +-- .../fluent/ExtensionTopicsClient.java | 24 +- ...amespaceTopicEventSubscriptionsClient.java | 188 +- .../fluent/NamespaceTopicsClient.java | 150 +- .../eventgrid/fluent/NamespacesClient.java | 182 +- ...SecurityPerimeterConfigurationsClient.java | 124 +- .../eventgrid/fluent/OperationsClient.java | 2 +- .../fluent/PartnerConfigurationsClient.java | 126 +- .../fluent/PartnerDestinationsClient.java | 150 +- .../fluent/PartnerNamespacesClient.java | 146 +- .../fluent/PartnerRegistrationsClient.java | 138 +- .../PartnerTopicEventSubscriptionsClient.java | 234 +- .../eventgrid/fluent/PartnerTopicsClient.java | 126 +- .../fluent/PermissionBindingsClient.java | 46 +- .../PrivateEndpointConnectionsClient.java | 132 +- .../fluent/PrivateLinkResourcesClient.java | 38 +- .../SystemTopicEventSubscriptionsClient.java | 292 +- .../eventgrid/fluent/SystemTopicsClient.java | 146 +- .../fluent/TopicEventSubscriptionsClient.java | 310 +- .../eventgrid/fluent/TopicSpacesClient.java | 46 +- .../eventgrid/fluent/TopicTypesClient.java | 56 +- .../eventgrid/fluent/TopicsClient.java | 156 +- .../fluent/VerifiedPartnersClient.java | 14 +- ...PartnerClientAuthenticationProperties.java | 10 +- ...ventSubscriptionDestinationProperties.java | 13 +- .../fluent/models/CaCertificateInner.java | 17 +- .../models/CaCertificateProperties.java | 10 +- .../eventgrid/fluent/models/ChannelInner.java | 17 +- .../fluent/models/ChannelProperties.java | 16 +- .../ChannelUpdateParametersProperties.java | 16 +- .../fluent/models/ClientGroupInner.java | 17 +- .../fluent/models/ClientGroupProperties.java | 10 +- .../eventgrid/fluent/models/ClientInner.java | 17 +- .../fluent/models/ClientProperties.java | 13 +- ...mDomainOwnershipValidationResultInner.java | 48 +- .../DeliveryAttributeListResultInner.java | 30 +- .../eventgrid/fluent/models/DomainInner.java | 23 +- .../fluent/models/DomainProperties.java | 22 +- .../models/DomainSharedAccessKeysInner.java | 38 +- .../fluent/models/DomainTopicInner.java | 19 +- .../fluent/models/DomainTopicProperties.java | 12 +- .../DomainUpdateParameterProperties.java | 16 +- ...micDeliveryAttributeMappingProperties.java | 10 +- ...ventSubscriptionDestinationProperties.java | 13 +- .../models/EventSubscriptionFullUrlInner.java | 27 +- .../fluent/models/EventSubscriptionInner.java | 17 +- .../models/EventSubscriptionProperties.java | 28 +- .../fluent/models/EventTypeInner.java | 92 +- .../fluent/models/EventTypeProperties.java | 60 +- .../fluent/models/ExtensionTopicInner.java | 51 +- .../models/ExtensionTopicProperties.java | 38 +- ...ventSubscriptionDestinationProperties.java | 13 +- .../JsonInputSchemaMappingProperties.java | 28 +- ...ventSubscriptionDestinationProperties.java | 10 +- .../fluent/models/NamespaceInner.java | 63 +- .../fluent/models/NamespaceProperties.java | 81 +- .../NamespaceSharedAccessKeysInner.java | 38 +- ...ventSubscriptionDestinationProperties.java | 10 +- .../fluent/models/NamespaceTopicInner.java | 17 +- .../models/NamespaceTopicProperties.java | 10 +- ...mespaceTopicUpdateParameterProperties.java | 10 +- .../NamespaceUpdateParameterProperties.java | 72 +- ...rkSecurityPerimeterConfigurationInner.java | 112 +- ...erimeterConfigurationIssuesProperties.java | 76 +- ...urityPerimeterConfigurationProperties.java | 90 +- ...yPerimeterProfileAccessRuleProperties.java | 103 +- .../fluent/models/OperationInner.java | 74 +- .../models/PartnerConfigurationInner.java | 69 +- .../PartnerConfigurationProperties.java | 13 +- ...onfigurationUpdateParameterProperties.java | 10 +- .../models/PartnerDestinationInner.java | 22 +- .../models/PartnerDestinationProperties.java | 24 +- ...ventSubscriptionDestinationProperties.java | 10 +- .../fluent/models/PartnerNamespaceInner.java | 17 +- .../models/PartnerNamespaceProperties.java | 16 +- ...PartnerNamespaceSharedAccessKeysInner.java | 38 +- ...nerNamespaceUpdateParameterProperties.java | 13 +- .../models/PartnerRegistrationInner.java | 22 +- .../models/PartnerRegistrationProperties.java | 24 +- .../fluent/models/PartnerTopicInner.java | 51 +- .../fluent/models/PartnerTopicProperties.java | 27 +- .../fluent/models/PermissionBindingInner.java | 17 +- .../models/PermissionBindingProperties.java | 10 +- .../PrivateEndpointConnectionInner.java | 32 +- .../PrivateEndpointConnectionProperties.java | 16 +- .../models/PrivateLinkResourceInner.java | 125 +- .../models/PrivateLinkResourceProperties.java | 60 +- ...ventSubscriptionDestinationProperties.java | 13 +- ...ventSubscriptionDestinationProperties.java | 13 +- ...ticDeliveryAttributeMappingProperties.java | 10 +- ...geBlobDeadLetterDestinationProperties.java | 10 +- ...ventSubscriptionDestinationProperties.java | 10 +- .../models/SubscriptionFullUrlInner.java | 27 +- .../fluent/models/SubscriptionInner.java | 17 +- .../fluent/models/SubscriptionProperties.java | 16 +- ...ubscriptionUpdateParametersProperties.java | 16 +- .../fluent/models/SystemTopicInner.java | 84 +- .../fluent/models/SystemTopicProperties.java | 63 +- .../eventgrid/fluent/models/TopicInner.java | 64 +- .../fluent/models/TopicProperties.java | 77 +- .../models/TopicSharedAccessKeysInner.java | 38 +- .../fluent/models/TopicSpaceInner.java | 17 +- .../fluent/models/TopicSpaceProperties.java | 10 +- .../fluent/models/TopicTypeInfoInner.java | 179 +- .../fluent/models/TopicTypeProperties.java | 132 +- .../TopicUpdateParameterProperties.java | 16 +- .../fluent/models/VerifiedPartnerInner.java | 110 +- .../models/VerifiedPartnerProperties.java | 100 +- ...ventSubscriptionDestinationProperties.java | 13 +- .../WebhookPartnerDestinationProperties.java | 13 +- .../eventgrid/fluent/models/package-info.java | 4 +- .../eventgrid/fluent/package-info.java | 4 +- .../implementation/CaCertificateImpl.java | 2 +- .../CaCertificatesClientImpl.java | 508 +- .../implementation/CaCertificatesImpl.java | 10 +- .../eventgrid/implementation/ChannelImpl.java | 2 +- .../implementation/ChannelsClientImpl.java | 780 +--- .../implementation/ChannelsImpl.java | 34 +- .../implementation/ClientGroupImpl.java | 2 +- .../ClientGroupsClientImpl.java | 508 +- .../implementation/ClientGroupsImpl.java | 10 +- .../eventgrid/implementation/ClientImpl.java | 2 +- .../implementation/ClientsClientImpl.java | 503 +- .../eventgrid/implementation/ClientsImpl.java | 10 +- ...omDomainOwnershipValidationResultImpl.java | 2 +- .../DeliveryAttributeListResultImpl.java | 2 +- .../DomainEventSubscriptionsClientImpl.java | 1467 +++--- .../DomainEventSubscriptionsImpl.java | 100 +- .../eventgrid/implementation/DomainImpl.java | 2 +- .../DomainSharedAccessKeysImpl.java | 2 +- ...mainTopicEventSubscriptionsClientImpl.java | 1574 +++---- .../DomainTopicEventSubscriptionsImpl.java | 106 +- .../implementation/DomainTopicImpl.java | 2 +- .../DomainTopicsClientImpl.java | 492 +- .../implementation/DomainTopicsImpl.java | 10 +- .../implementation/DomainsClientImpl.java | 1182 ++--- .../eventgrid/implementation/DomainsImpl.java | 46 +- .../EventGridManagementClientBuilder.java | 30 +- .../EventGridManagementClientImpl.java | 243 +- .../EventSubscriptionFullUrlImpl.java | 2 +- .../implementation/EventSubscriptionImpl.java | 2 +- .../EventSubscriptionsClientImpl.java | 4075 ++++++----------- .../EventSubscriptionsImpl.java | 150 +- .../implementation/EventTypeImpl.java | 7 +- .../implementation/ExtensionTopicImpl.java | 2 +- .../ExtensionTopicsClientImpl.java | 81 +- .../implementation/ExtensionTopicsImpl.java | 10 +- .../implementation/NamespaceImpl.java | 33 +- .../NamespaceSharedAccessKeysImpl.java | 2 +- ...paceTopicEventSubscriptionsClientImpl.java | 1227 ++--- .../NamespaceTopicEventSubscriptionsImpl.java | 26 +- .../implementation/NamespaceTopicImpl.java | 2 +- .../NamespaceTopicsClientImpl.java | 1127 ++--- .../implementation/NamespaceTopicsImpl.java | 18 +- .../implementation/NamespacesClientImpl.java | 1374 ++---- .../implementation/NamespacesImpl.java | 38 +- ...orkSecurityPerimeterConfigurationImpl.java | 7 +- ...rityPerimeterConfigurationsClientImpl.java | 674 ++- ...rkSecurityPerimeterConfigurationsImpl.java | 42 +- .../implementation/OperationImpl.java | 2 +- .../implementation/OperationsClientImpl.java | 113 +- .../implementation/OperationsImpl.java | 2 +- .../PartnerConfigurationImpl.java | 18 +- .../PartnerConfigurationsClientImpl.java | 1051 ++--- .../PartnerConfigurationsImpl.java | 42 +- .../PartnerDestinationImpl.java | 7 +- .../PartnerDestinationsClientImpl.java | 1155 ++--- .../PartnerDestinationsImpl.java | 38 +- .../implementation/PartnerNamespaceImpl.java | 2 +- .../PartnerNamespaceSharedAccessKeysImpl.java | 2 +- .../PartnerNamespacesClientImpl.java | 1211 ++--- .../implementation/PartnerNamespacesImpl.java | 46 +- .../PartnerRegistrationImpl.java | 7 +- .../PartnerRegistrationsClientImpl.java | 1076 ++--- .../PartnerRegistrationsImpl.java | 30 +- ...tnerTopicEventSubscriptionsClientImpl.java | 1283 ++---- .../PartnerTopicEventSubscriptionsImpl.java | 70 +- .../implementation/PartnerTopicImpl.java | 15 +- .../PartnerTopicsClientImpl.java | 1045 ++--- .../implementation/PartnerTopicsImpl.java | 46 +- .../implementation/PermissionBindingImpl.java | 2 +- .../PermissionBindingsClientImpl.java | 512 +-- .../PermissionBindingsImpl.java | 10 +- .../PrivateEndpointConnectionImpl.java | 7 +- .../PrivateEndpointConnectionsClientImpl.java | 768 +--- .../PrivateEndpointConnectionsImpl.java | 10 +- .../PrivateLinkResourceImpl.java | 2 +- .../PrivateLinkResourcesClientImpl.java | 312 +- .../PrivateLinkResourcesImpl.java | 10 +- .../implementation/ResourceManagerUtils.java | 2 +- .../SubscriptionFullUrlImpl.java | 2 +- .../implementation/SubscriptionImpl.java | 2 +- ...stemTopicEventSubscriptionsClientImpl.java | 1469 +++--- .../SystemTopicEventSubscriptionsImpl.java | 104 +- .../implementation/SystemTopicImpl.java | 30 +- .../SystemTopicsClientImpl.java | 1072 ++--- .../implementation/SystemTopicsImpl.java | 30 +- .../TopicEventSubscriptionsClientImpl.java | 1484 +++--- .../TopicEventSubscriptionsImpl.java | 100 +- .../eventgrid/implementation/TopicImpl.java | 22 +- .../TopicSharedAccessKeysImpl.java | 2 +- .../implementation/TopicSpaceImpl.java | 2 +- .../implementation/TopicSpacesClientImpl.java | 502 +- .../implementation/TopicSpacesImpl.java | 10 +- .../implementation/TopicTypeInfoImpl.java | 7 +- .../implementation/TopicTypesClientImpl.java | 401 +- .../implementation/TopicTypesImpl.java | 30 +- .../implementation/TopicsClientImpl.java | 1433 ++---- .../eventgrid/implementation/TopicsImpl.java | 38 +- .../implementation/VerifiedPartnerImpl.java | 5 +- .../VerifiedPartnersClientImpl.java | 131 +- .../implementation/VerifiedPartnersImpl.java | 10 +- .../models/CaCertificatesListResult.java | 52 +- .../models/ChannelsListResult.java | 52 +- .../models/ClientGroupsListResult.java | 52 +- .../models/ClientsListResult.java | 52 +- .../models/DomainTopicsListResult.java | 52 +- .../models/DomainsListResult.java | 52 +- .../models/EventSubscriptionsListResult.java | 52 +- .../models/EventTypesListResult.java | 39 +- .../models/NamespaceTopicsListResult.java | 52 +- .../models/NamespacesListResult.java | 52 +- ...orkSecurityPerimeterConfigurationList.java | 52 +- .../models/OperationsListResult.java | 44 +- .../PartnerConfigurationsListResult.java | 52 +- .../models/PartnerDestinationsListResult.java | 52 +- .../models/PartnerNamespacesListResult.java | 52 +- .../PartnerRegistrationsListResult.java | 52 +- .../models/PartnerTopicsListResult.java | 52 +- .../models/PermissionBindingsListResult.java | 52 +- .../PrivateEndpointConnectionListResult.java | 52 +- .../PrivateLinkResourcesListResult.java | 52 +- .../models/SubscriptionsListResult.java | 52 +- .../models/SystemTopicsListResult.java | 52 +- .../models/TopicSpacesListResult.java | 52 +- .../models/TopicTypesListResult.java | 39 +- .../models/TopicsListResult.java | 52 +- .../models/VerifiedPartnersListResult.java | 54 +- .../implementation/package-info.java | 4 +- .../eventgrid/models/AdvancedFilter.java | 10 +- .../models/AdvancedFilterOperatorType.java | 40 +- .../AlternativeAuthenticationNameSource.java | 12 +- .../models/AutoScaleConfiguration.java | 150 + .../AzureADPartnerClientAuthentication.java | 14 +- ...eFunctionEventSubscriptionDestination.java | 14 +- .../models/BoolEqualsAdvancedFilter.java | 11 +- .../eventgrid/models/BoolEqualsFilter.java | 11 +- .../eventgrid/models/CaCertificate.java | 6 +- .../CaCertificateProvisioningState.java | 16 +- .../eventgrid/models/CaCertificates.java | 34 +- .../eventgrid/models/Channel.java | 14 +- .../models/ChannelProvisioningState.java | 18 +- .../eventgrid/models/ChannelType.java | 6 +- .../models/ChannelUpdateParameters.java | 13 +- .../eventgrid/models/Channels.java | 88 +- .../eventgrid/models/Client.java | 6 +- .../models/ClientAuthenticationSettings.java | 16 +- .../ClientCertificateAuthentication.java | 10 +- .../ClientCertificateValidationScheme.java | 14 +- .../eventgrid/models/ClientGroup.java | 6 +- .../models/ClientGroupProvisioningState.java | 16 +- .../eventgrid/models/ClientGroups.java | 34 +- .../models/ClientProvisioningState.java | 16 +- .../eventgrid/models/ClientState.java | 6 +- .../eventgrid/models/Clients.java | 34 +- .../eventgrid/models/ConfidentialCompute.java | 98 + .../models/ConfidentialComputeMode.java | 54 + .../eventgrid/models/ConnectionState.java | 10 +- .../models/CustomDomainConfiguration.java | 21 +- .../models/CustomDomainIdentity.java | 10 +- .../models/CustomDomainIdentityType.java | 6 +- ...CustomDomainOwnershipValidationResult.java | 2 +- .../models/CustomDomainValidationState.java | 8 +- ...ustomJwtAuthenticationManagedIdentity.java | 18 +- ...mJwtAuthenticationManagedIdentityType.java | 6 +- .../CustomJwtAuthenticationSettings.java | 16 +- ...mWebhookAuthenticationManagedIdentity.java | 18 +- ...hookAuthenticationManagedIdentityType.java | 6 +- .../models/CustomerManagedKeyEncryption.java | 188 + .../models/DataResidencyBoundary.java | 6 +- .../models/DeadLetterDestination.java | 10 +- .../models/DeadLetterEndPointType.java | 4 +- .../DeadLetterWithResourceIdentity.java | 16 +- .../models/DeliveryAttributeListResult.java | 2 +- .../models/DeliveryAttributeMapping.java | 10 +- .../models/DeliveryAttributeMappingType.java | 6 +- .../models/DeliveryConfiguration.java | 16 +- .../eventgrid/models/DeliveryMode.java | 6 +- .../eventgrid/models/DeliverySchema.java | 4 +- .../models/DeliveryWithResourceIdentity.java | 16 +- .../eventgrid/models/Domain.java | 6 +- .../models/DomainEventSubscriptions.java | 204 +- .../models/DomainProvisioningState.java | 14 +- .../models/DomainRegenerateKeyRequest.java | 18 +- .../models/DomainSharedAccessKeys.java | 2 +- .../eventgrid/models/DomainTopic.java | 4 +- .../models/DomainTopicEventSubscriptions.java | 208 +- .../models/DomainTopicProvisioningState.java | 14 +- .../eventgrid/models/DomainTopics.java | 38 +- .../models/DomainUpdateParameters.java | 19 +- .../eventgrid/models/Domains.java | 64 +- .../DynamicDeliveryAttributeMapping.java | 14 +- .../models/DynamicRoutingEnrichment.java | 10 +- .../models/EncodedIssuerCertificateInfo.java | 23 +- .../eventgrid/models/EndpointType.java | 22 +- .../eventgrid/models/EventDefinitionKind.java | 4 +- .../eventgrid/models/EventDeliverySchema.java | 8 +- .../EventHubEventSubscriptionDestination.java | 14 +- .../eventgrid/models/EventInputSchema.java | 4 +- .../eventgrid/models/EventSubscription.java | 30 +- .../models/EventSubscriptionDestination.java | 10 +- .../models/EventSubscriptionFilter.java | 13 +- .../models/EventSubscriptionFullUrl.java | 2 +- .../models/EventSubscriptionIdentity.java | 13 +- .../models/EventSubscriptionIdentityType.java | 6 +- .../EventSubscriptionProvisioningState.java | 16 +- .../EventSubscriptionUpdateParameters.java | 28 +- .../eventgrid/models/EventSubscriptions.java | 410 +- .../eventgrid/models/EventType.java | 10 +- .../eventgrid/models/EventTypeInfo.java | 17 +- .../eventgrid/models/ExtendedLocation.java | 10 +- .../eventgrid/models/ExtensionTopic.java | 4 +- .../eventgrid/models/ExtensionTopics.java | 24 +- .../FederatedIdentityCredentialInfo.java | 31 +- .../eventgrid/models/Filter.java | 10 +- .../eventgrid/models/FilterOperatorType.java | 40 +- .../models/FiltersConfiguration.java | 13 +- ...onnectionEventSubscriptionDestination.java | 14 +- .../eventgrid/models/IdentityInfo.java | 17 +- .../eventgrid/models/IdentityType.java | 10 +- .../eventgrid/models/InboundIpRule.java | 10 +- .../models/InlineEventProperties.java | 10 +- .../eventgrid/models/InputSchema.java | 8 +- .../eventgrid/models/InputSchemaMapping.java | 10 +- .../models/InputSchemaMappingType.java | 4 +- .../eventgrid/models/IpActionType.java | 4 +- .../eventgrid/models/IpAddressType.java | 51 + .../models/IsNotNullAdvancedFilter.java | 11 +- .../eventgrid/models/IsNotNullFilter.java | 11 +- .../IsNullOrUndefinedAdvancedFilter.java | 11 +- .../models/IsNullOrUndefinedFilter.java | 11 +- .../models/IssuerCertificateInfo.java | 21 +- .../eventgrid/models/JsonField.java | 10 +- .../models/JsonFieldWithDefault.java | 10 +- .../models/JsonInputSchemaMapping.java | 14 +- .../eventgrid/models/KeyEncryption.java | 94 + .../models/KeyEncryptionIdentityType.java | 51 + .../models/KeyEncryptionKeyIdentity.java | 124 + .../models/KeyEncryptionKeyStatus.java | 55 + ...itorAlertEventSubscriptionDestination.java | 14 +- .../models/MonitorAlertSeverity.java | 12 +- .../eventgrid/models/Namespace.java | 87 +- .../models/NamespaceProvisioningState.java | 22 +- .../models/NamespaceRegenerateKeyRequest.java | 18 +- .../models/NamespaceSharedAccessKeys.java | 2 +- .../eventgrid/models/NamespaceSku.java | 10 +- .../eventgrid/models/NamespaceTopic.java | 6 +- ...paceTopicEventSubscriptionDestination.java | 14 +- .../NamespaceTopicEventSubscriptions.java | 66 +- .../NamespaceTopicProvisioningState.java | 22 +- .../NamespaceTopicUpdateParameters.java | 13 +- .../eventgrid/models/NamespaceTopics.java | 50 +- .../models/NamespaceUpdateParameters.java | 51 +- .../eventgrid/models/Namespaces.java | 76 +- ...ecurityPerimeterAssociationAccessMode.java | 8 +- ...urityPerimeterConfigProvisioningState.java | 18 +- ...NetworkSecurityPerimeterConfiguration.java | 10 +- ...tyPerimeterConfigurationIssueSeverity.java | 6 +- ...curityPerimeterConfigurationIssueType.java | 10 +- ...kSecurityPerimeterConfigurationIssues.java | 103 +- ...SecurityPerimeterConfigurationProfile.java | 76 +- ...etworkSecurityPerimeterConfigurations.java | 108 +- .../models/NetworkSecurityPerimeterInfo.java | 49 +- ...orkSecurityPerimeterProfileAccessRule.java | 154 +- ...tyPerimeterProfileAccessRuleDirection.java | 6 +- .../NetworkSecurityPerimeterResourceType.java | 6 +- .../NetworkSecurityPerimeterSubscription.java | 27 +- .../NumberGreaterThanAdvancedFilter.java | 11 +- .../models/NumberGreaterThanFilter.java | 11 +- ...mberGreaterThanOrEqualsAdvancedFilter.java | 11 +- .../NumberGreaterThanOrEqualsFilter.java | 11 +- .../models/NumberInAdvancedFilter.java | 11 +- .../eventgrid/models/NumberInFilter.java | 11 +- .../models/NumberInRangeAdvancedFilter.java | 11 +- .../eventgrid/models/NumberInRangeFilter.java | 11 +- .../models/NumberLessThanAdvancedFilter.java | 11 +- .../models/NumberLessThanFilter.java | 11 +- .../NumberLessThanOrEqualsAdvancedFilter.java | 11 +- .../models/NumberLessThanOrEqualsFilter.java | 11 +- .../models/NumberNotInAdvancedFilter.java | 11 +- .../eventgrid/models/NumberNotInFilter.java | 11 +- .../NumberNotInRangeAdvancedFilter.java | 11 +- .../models/NumberNotInRangeFilter.java | 11 +- .../eventgrid/models/Operation.java | 2 +- .../eventgrid/models/OperationInfo.java | 60 +- .../eventgrid/models/Operations.java | 2 +- .../eventgrid/models/Partner.java | 24 +- .../models/PartnerAuthorization.java | 13 +- .../models/PartnerClientAuthentication.java | 10 +- .../PartnerClientAuthenticationType.java | 4 +- .../models/PartnerConfiguration.java | 14 +- ...PartnerConfigurationProvisioningState.java | 14 +- .../PartnerConfigurationUpdateParameters.java | 13 +- .../models/PartnerConfigurations.java | 74 +- .../eventgrid/models/PartnerDestination.java | 11 +- .../PartnerDestinationActivationState.java | 6 +- .../models/PartnerDestinationInfo.java | 13 +- .../PartnerDestinationProvisioningState.java | 16 +- .../PartnerDestinationUpdateParameters.java | 10 +- .../eventgrid/models/PartnerDestinations.java | 62 +- .../eventgrid/models/PartnerDetails.java | 52 +- .../eventgrid/models/PartnerEndpointType.java | 4 +- .../PartnerEventSubscriptionDestination.java | 14 +- .../eventgrid/models/PartnerNamespace.java | 6 +- .../PartnerNamespaceProvisioningState.java | 14 +- .../PartnerNamespaceRegenerateKeyRequest.java | 18 +- .../PartnerNamespaceSharedAccessKeys.java | 2 +- .../PartnerNamespaceUpdateParameters.java | 13 +- .../eventgrid/models/PartnerNamespaces.java | 66 +- .../eventgrid/models/PartnerRegistration.java | 11 +- .../PartnerRegistrationProvisioningState.java | 14 +- .../PartnerRegistrationUpdateParameters.java | 10 +- .../models/PartnerRegistrations.java | 58 +- .../eventgrid/models/PartnerTopic.java | 21 +- .../models/PartnerTopicActivationState.java | 8 +- .../PartnerTopicEventSubscriptions.java | 144 +- .../eventgrid/models/PartnerTopicInfo.java | 13 +- .../models/PartnerTopicProvisioningState.java | 16 +- .../models/PartnerTopicRoutingMode.java | 6 +- .../models/PartnerTopicUpdateParameters.java | 13 +- .../eventgrid/models/PartnerTopics.java | 66 +- .../models/PartnerUpdateDestinationInfo.java | 10 +- .../models/PartnerUpdateTopicInfo.java | 13 +- .../eventgrid/models/PermissionBinding.java | 6 +- .../PermissionBindingProvisioningState.java | 16 +- .../eventgrid/models/PermissionBindings.java | 34 +- .../eventgrid/models/PermissionType.java | 6 +- .../models/PersistedConnectionStatus.java | 10 +- .../models/PlatformCapabilities.java | 85 + .../eventgrid/models/PrivateEndpoint.java | 10 +- .../models/PrivateEndpointConnection.java | 10 +- .../models/PrivateEndpointConnections.java | 90 +- .../PrivateEndpointConnectionsParentType.java | 10 +- .../eventgrid/models/PrivateLinkResource.java | 11 +- .../models/PrivateLinkResources.java | 38 +- .../eventgrid/models/PublicNetworkAccess.java | 8 +- .../eventgrid/models/PublisherType.java | 4 +- .../eventgrid/models/PushInfo.java | 19 +- .../eventgrid/models/QueueInfo.java | 13 +- .../eventgrid/models/ReadinessState.java | 6 +- .../eventgrid/models/ResourceAssociation.java | 38 +- .../eventgrid/models/ResourceKind.java | 6 +- .../models/ResourceMoveChangeHistory.java | 10 +- .../models/ResourceProvisioningState.java | 14 +- .../eventgrid/models/ResourceRegionType.java | 6 +- .../eventgrid/models/ResourceSku.java | 10 +- .../eventgrid/models/RetryPolicy.java | 10 +- .../eventgrid/models/RoutingEnrichments.java | 16 +- .../eventgrid/models/RoutingIdentityInfo.java | 10 +- .../eventgrid/models/RoutingIdentityType.java | 8 +- ...eBusQueueEventSubscriptionDestination.java | 14 +- ...eBusTopicEventSubscriptionDestination.java | 14 +- .../resourcemanager/eventgrid/models/Sku.java | 6 +- .../eventgrid/models/SkuName.java | 4 +- .../StaticDeliveryAttributeMapping.java | 14 +- .../models/StaticRoutingEnrichment.java | 10 +- .../models/StaticRoutingEnrichmentType.java | 4 +- .../models/StaticStringRoutingEnrichment.java | 11 +- .../StorageBlobDeadLetterDestination.java | 14 +- ...rageQueueEventSubscriptionDestination.java | 14 +- .../StringBeginsWithAdvancedFilter.java | 11 +- .../models/StringBeginsWithFilter.java | 11 +- .../models/StringContainsAdvancedFilter.java | 11 +- .../models/StringContainsFilter.java | 11 +- .../models/StringEndsWithAdvancedFilter.java | 11 +- .../models/StringEndsWithFilter.java | 11 +- .../models/StringInAdvancedFilter.java | 11 +- .../eventgrid/models/StringInFilter.java | 11 +- .../StringNotBeginsWithAdvancedFilter.java | 11 +- .../models/StringNotBeginsWithFilter.java | 11 +- .../StringNotContainsAdvancedFilter.java | 11 +- .../models/StringNotContainsFilter.java | 11 +- .../StringNotEndsWithAdvancedFilter.java | 11 +- .../models/StringNotEndsWithFilter.java | 11 +- .../models/StringNotInAdvancedFilter.java | 11 +- .../eventgrid/models/StringNotInFilter.java | 11 +- .../eventgrid/models/Subscription.java | 22 +- .../eventgrid/models/SubscriptionFullUrl.java | 2 +- .../models/SubscriptionProvisioningState.java | 24 +- .../models/SubscriptionUpdateParameters.java | 13 +- .../eventgrid/models/SystemTopic.java | 67 +- .../models/SystemTopicEventSubscriptions.java | 196 +- .../models/SystemTopicUpdateParameters.java | 13 +- .../eventgrid/models/SystemTopics.java | 58 +- .../eventgrid/models/TlsVersion.java | 13 +- .../eventgrid/models/Topic.java | 55 +- .../models/TopicEventSubscriptions.java | 208 +- .../models/TopicProvisioningState.java | 14 +- .../models/TopicRegenerateKeyRequest.java | 18 +- .../models/TopicSharedAccessKeys.java | 2 +- .../eventgrid/models/TopicSpace.java | 6 +- .../models/TopicSpaceProvisioningState.java | 16 +- .../eventgrid/models/TopicSpaces.java | 34 +- .../models/TopicSpacesConfiguration.java | 22 +- .../models/TopicSpacesConfigurationState.java | 6 +- ...TopicTypeAdditionalEnforcedPermission.java | 38 +- .../eventgrid/models/TopicTypeInfo.java | 10 +- .../models/TopicTypeProvisioningState.java | 14 +- .../models/TopicTypeSourceScope.java | 10 +- .../eventgrid/models/TopicTypes.java | 48 +- .../models/TopicUpdateParameters.java | 19 +- .../eventgrid/models/Topics.java | 72 +- .../eventgrid/models/TopicsConfiguration.java | 13 +- .../models/UpdateAutoScaleConfiguration.java | 153 + .../UpdateTopicSpacesConfigurationInfo.java | 22 +- .../models/UpdateTopicsConfigurationInfo.java | 13 +- .../models/UserIdentityProperties.java | 10 +- .../eventgrid/models/VerifiedPartner.java | 7 +- .../VerifiedPartnerProvisioningState.java | 14 +- .../eventgrid/models/VerifiedPartners.java | 14 +- .../models/WebhookAuthenticationSettings.java | 35 +- .../WebhookEventSubscriptionDestination.java | 14 +- .../models/WebhookPartnerDestinationInfo.java | 65 +- .../WebhookUpdatePartnerDestinationInfo.java | 14 +- .../eventgrid/models/package-info.java | 4 +- .../eventgrid/package-info.java | 4 +- .../src/main/java/module-info.java | 3 +- ...re-resourcemanager-eventgrid_metadata.json | 1 + .../CaCertificatesCreateOrUpdateSamples.java | 6 +- .../CaCertificatesDeleteSamples.java | 6 +- .../generated/CaCertificatesGetSamples.java | 6 +- .../CaCertificatesListByNamespaceSamples.java | 6 +- .../ChannelsCreateOrUpdateSamples.java | 6 +- .../generated/ChannelsDeleteSamples.java | 6 +- .../generated/ChannelsGetFullUrlSamples.java | 6 +- .../generated/ChannelsGetSamples.java | 6 +- ...ChannelsListByPartnerNamespaceSamples.java | 6 +- .../generated/ChannelsUpdateSamples.java | 6 +- .../ClientGroupsCreateOrUpdateSamples.java | 6 +- .../generated/ClientGroupsDeleteSamples.java | 6 +- .../generated/ClientGroupsGetSamples.java | 6 +- .../ClientGroupsListByNamespaceSamples.java | 6 +- .../ClientsCreateOrUpdateSamples.java | 6 +- .../generated/ClientsDeleteSamples.java | 6 +- .../generated/ClientsGetSamples.java | 5 +- .../ClientsListByNamespaceSamples.java | 6 +- ...entSubscriptionsCreateOrUpdateSamples.java | 6 +- ...DomainEventSubscriptionsDeleteSamples.java | 6 +- ...criptionsGetDeliveryAttributesSamples.java | 6 +- ...inEventSubscriptionsGetFullUrlSamples.java | 6 +- .../DomainEventSubscriptionsGetSamples.java | 6 +- .../DomainEventSubscriptionsListSamples.java | 6 +- ...DomainEventSubscriptionsUpdateSamples.java | 6 +- ...entSubscriptionsCreateOrUpdateSamples.java | 6 +- ...nTopicEventSubscriptionsDeleteSamples.java | 6 +- ...criptionsGetDeliveryAttributesSamples.java | 6 +- ...icEventSubscriptionsGetFullUrlSamples.java | 6 +- ...mainTopicEventSubscriptionsGetSamples.java | 6 +- ...ainTopicEventSubscriptionsListSamples.java | 6 +- ...nTopicEventSubscriptionsUpdateSamples.java | 6 +- .../DomainTopicsCreateOrUpdateSamples.java | 6 +- .../generated/DomainTopicsDeleteSamples.java | 6 +- .../generated/DomainTopicsGetSamples.java | 6 +- .../DomainTopicsListByDomainSamples.java | 6 +- .../DomainsCreateOrUpdateSamples.java | 6 +- .../generated/DomainsDeleteSamples.java | 6 +- .../DomainsGetByResourceGroupSamples.java | 5 +- .../DomainsListByResourceGroupSamples.java | 6 +- .../generated/DomainsListSamples.java | 6 +- .../DomainsListSharedAccessKeysSamples.java | 6 +- .../DomainsRegenerateKeySamples.java | 6 +- .../generated/DomainsUpdateSamples.java | 6 +- ...entSubscriptionsCreateOrUpdateSamples.java | 41 +- .../EventSubscriptionsDeleteSamples.java | 18 +- ...criptionsGetDeliveryAttributesSamples.java | 6 +- .../EventSubscriptionsGetFullUrlSamples.java | 18 +- .../EventSubscriptionsGetSamples.java | 46 +- ...SubscriptionsListByDomainTopicSamples.java | 6 +- ...bscriptionsListByResourceGroupSamples.java | 6 +- ...entSubscriptionsListByResourceSamples.java | 6 +- ...balByResourceGroupForTopicTypeSamples.java | 6 +- ...obalBySubscriptionForTopicTypeSamples.java | 6 +- ...nalByResourceGroupForTopicTypeSamples.java | 6 +- ...onsListRegionalByResourceGroupSamples.java | 6 +- ...onalBySubscriptionForTopicTypeSamples.java | 6 +- ...ionsListRegionalBySubscriptionSamples.java | 6 +- .../EventSubscriptionsListSamples.java | 6 +- .../EventSubscriptionsUpdateSamples.java | 46 +- .../generated/ExtensionTopicsGetSamples.java | 6 +- ...entSubscriptionsCreateOrUpdateSamples.java | 6 +- ...eTopicEventSubscriptionsDeleteSamples.java | 6 +- ...criptionsGetDeliveryAttributesSamples.java | 6 +- ...icEventSubscriptionsGetFullUrlSamples.java | 6 +- ...paceTopicEventSubscriptionsGetSamples.java | 6 +- ...scriptionsListByNamespaceTopicSamples.java | 6 +- ...eTopicEventSubscriptionsUpdateSamples.java | 6 +- .../NamespaceTopicsCreateOrUpdateSamples.java | 6 +- .../NamespaceTopicsDeleteSamples.java | 6 +- .../generated/NamespaceTopicsGetSamples.java | 6 +- ...NamespaceTopicsListByNamespaceSamples.java | 6 +- ...paceTopicsListSharedAccessKeysSamples.java | 6 +- .../NamespaceTopicsRegenerateKeySamples.java | 6 +- .../NamespaceTopicsUpdateSamples.java | 6 +- .../NamespacesCreateOrUpdateSamples.java | 8 +- .../generated/NamespacesDeleteSamples.java | 6 +- .../NamespacesGetByResourceGroupSamples.java | 6 +- .../NamespacesListByResourceGroupSamples.java | 6 +- .../generated/NamespacesListSamples.java | 6 +- ...NamespacesListSharedAccessKeysSamples.java | 6 +- .../NamespacesRegenerateKeySamples.java | 6 +- .../generated/NamespacesUpdateSamples.java | 9 +- ...sValidateCustomDomainOwnershipSamples.java | 6 +- ...rityPerimeterConfigurationsGetSamples.java | 6 +- ...ityPerimeterConfigurationsListSamples.java | 6 +- ...rimeterConfigurationsReconcileSamples.java | 6 +- .../generated/OperationsListSamples.java | 6 +- ...ConfigurationsAuthorizePartnerSamples.java | 10 +- ...erConfigurationsCreateOrUpdateSamples.java | 30 +- .../PartnerConfigurationsDeleteSamples.java | 6 +- ...nfigurationsGetByResourceGroupSamples.java | 6 +- ...figurationsListByResourceGroupSamples.java | 6 +- .../PartnerConfigurationsListSamples.java | 6 +- ...nfigurationsUnauthorizePartnerSamples.java | 10 +- .../PartnerConfigurationsUpdateSamples.java | 6 +- .../PartnerDestinationsActivateSamples.java | 6 +- ...tnerDestinationsCreateOrUpdateSamples.java | 9 +- .../PartnerDestinationsDeleteSamples.java | 6 +- ...DestinationsGetByResourceGroupSamples.java | 6 +- ...estinationsListByResourceGroupSamples.java | 6 +- .../PartnerDestinationsListSamples.java | 6 +- .../PartnerDestinationsUpdateSamples.java | 6 +- ...artnerNamespacesCreateOrUpdateSamples.java | 6 +- .../PartnerNamespacesDeleteSamples.java | 6 +- ...erNamespacesGetByResourceGroupSamples.java | 6 +- ...rNamespacesListByResourceGroupSamples.java | 6 +- .../PartnerNamespacesListSamples.java | 6 +- ...NamespacesListSharedAccessKeysSamples.java | 6 +- ...PartnerNamespacesRegenerateKeySamples.java | 6 +- .../PartnerNamespacesUpdateSamples.java | 6 +- ...nerRegistrationsCreateOrUpdateSamples.java | 6 +- .../PartnerRegistrationsDeleteSamples.java | 6 +- ...egistrationsGetByResourceGroupSamples.java | 6 +- ...gistrationsListByResourceGroupSamples.java | 6 +- .../PartnerRegistrationsListSamples.java | 6 +- .../PartnerRegistrationsUpdateSamples.java | 6 +- ...entSubscriptionsCreateOrUpdateSamples.java | 6 +- ...rTopicEventSubscriptionsDeleteSamples.java | 6 +- ...criptionsGetDeliveryAttributesSamples.java | 6 +- ...icEventSubscriptionsGetFullUrlSamples.java | 6 +- ...tnerTopicEventSubscriptionsGetSamples.java | 6 +- ...ubscriptionsListByPartnerTopicSamples.java | 6 +- ...rTopicEventSubscriptionsUpdateSamples.java | 6 +- .../PartnerTopicsActivateSamples.java | 6 +- .../PartnerTopicsCreateOrUpdateSamples.java | 9 +- .../PartnerTopicsDeactivateSamples.java | 6 +- .../generated/PartnerTopicsDeleteSamples.java | 6 +- ...artnerTopicsGetByResourceGroupSamples.java | 6 +- ...rtnerTopicsListByResourceGroupSamples.java | 6 +- .../generated/PartnerTopicsListSamples.java | 6 +- .../generated/PartnerTopicsUpdateSamples.java | 6 +- ...rmissionBindingsCreateOrUpdateSamples.java | 6 +- .../PermissionBindingsDeleteSamples.java | 6 +- .../PermissionBindingsGetSamples.java | 6 +- ...missionBindingsListByNamespaceSamples.java | 6 +- ...ivateEndpointConnectionsDeleteSamples.java | 6 +- .../PrivateEndpointConnectionsGetSamples.java | 6 +- ...pointConnectionsListByResourceSamples.java | 6 +- ...ivateEndpointConnectionsUpdateSamples.java | 6 +- .../PrivateLinkResourcesGetSamples.java | 6 +- ...ateLinkResourcesListByResourceSamples.java | 6 +- ...entSubscriptionsCreateOrUpdateSamples.java | 6 +- ...mTopicEventSubscriptionsDeleteSamples.java | 6 +- ...criptionsGetDeliveryAttributesSamples.java | 6 +- ...icEventSubscriptionsGetFullUrlSamples.java | 6 +- ...stemTopicEventSubscriptionsGetSamples.java | 6 +- ...SubscriptionsListBySystemTopicSamples.java | 6 +- ...mTopicEventSubscriptionsUpdateSamples.java | 6 +- .../SystemTopicsCreateOrUpdateSamples.java | 31 +- .../generated/SystemTopicsDeleteSamples.java | 6 +- ...SystemTopicsGetByResourceGroupSamples.java | 6 +- ...ystemTopicsListByResourceGroupSamples.java | 6 +- .../generated/SystemTopicsListSamples.java | 6 +- .../generated/SystemTopicsUpdateSamples.java | 6 +- ...entSubscriptionsCreateOrUpdateSamples.java | 6 +- .../TopicEventSubscriptionsDeleteSamples.java | 6 +- ...criptionsGetDeliveryAttributesSamples.java | 6 +- ...icEventSubscriptionsGetFullUrlSamples.java | 6 +- .../TopicEventSubscriptionsGetSamples.java | 6 +- .../TopicEventSubscriptionsListSamples.java | 6 +- .../TopicEventSubscriptionsUpdateSamples.java | 6 +- .../TopicSpacesCreateOrUpdateSamples.java | 6 +- .../generated/TopicSpacesDeleteSamples.java | 6 +- .../generated/TopicSpacesGetSamples.java | 6 +- .../TopicSpacesListByNamespaceSamples.java | 6 +- .../generated/TopicTypesGetSamples.java | 6 +- .../TopicTypesListEventTypesSamples.java | 6 +- .../generated/TopicTypesListSamples.java | 6 +- .../TopicsCreateOrUpdateSamples.java | 39 +- .../generated/TopicsDeleteSamples.java | 6 +- .../TopicsGetByResourceGroupSamples.java | 5 +- .../TopicsListByResourceGroupSamples.java | 6 +- .../TopicsListEventTypesSamples.java | 6 +- .../generated/TopicsListSamples.java | 6 +- .../TopicsListSharedAccessKeysSamples.java | 6 +- .../generated/TopicsRegenerateKeySamples.java | 6 +- .../generated/TopicsUpdateSamples.java | 6 +- .../generated/VerifiedPartnersGetSamples.java | 6 +- .../VerifiedPartnersListSamples.java | 6 +- .../AutoScaleConfigurationTests.java | 33 + ...erClientAuthenticationPropertiesTests.java | 16 +- ...ureADPartnerClientAuthenticationTests.java | 16 +- ...ubscriptionDestinationPropertiesTests.java | 30 +- ...tionEventSubscriptionDestinationTests.java | 30 +- .../CaCertificatesDeleteMockTests.java | 5 +- .../generated/ChannelInnerTests.java | 162 +- .../generated/ChannelPropertiesTests.java | 161 +- ...hannelUpdateParametersPropertiesTests.java | 72 +- .../ChannelUpdateParametersTests.java | 72 +- ...lsCreateOrUpdateWithResponseMockTests.java | 84 +- .../generated/ChannelsDeleteMockTests.java | 4 +- ...annelsGetFullUrlWithResponseMockTests.java | 8 +- .../ChannelsGetWithResponseMockTests.java | 34 +- ...annelsListByPartnerNamespaceMockTests.java | 37 +- .../generated/ChannelsListResultTests.java | 95 +- .../ChannelsUpdateWithResponseMockTests.java | 11 +- .../ClientCertificateAuthenticationTests.java | 18 +- .../generated/ClientGroupInnerTests.java | 14 +- .../generated/ClientGroupPropertiesTests.java | 20 +- .../ClientGroupsCreateOrUpdateMockTests.java | 16 +- .../ClientGroupsDeleteMockTests.java | 5 +- .../ClientGroupsGetWithResponseMockTests.java | 10 +- .../ClientGroupsListByNamespaceMockTests.java | 11 +- .../ClientGroupsListResultTests.java | 29 +- .../eventgrid/generated/ClientInnerTests.java | 38 +- .../generated/ClientPropertiesTests.java | 31 +- .../ClientsCreateOrUpdateMockTests.java | 24 +- .../generated/ClientsDeleteMockTests.java | 4 +- .../ClientsGetWithResponseMockTests.java | 17 +- .../ClientsListByNamespaceMockTests.java | 16 +- .../generated/ClientsListResultTests.java | 84 +- .../generated/ConfidentialComputeTests.java | 26 + .../generated/ConnectionStateTests.java | 26 +- .../CustomDomainConfigurationTests.java | 40 +- .../generated/CustomDomainIdentityTests.java | 19 +- ...inOwnershipValidationResultInnerTests.java | 114 +- ...JwtAuthenticationManagedIdentityTests.java | 16 +- ...ookAuthenticationManagedIdentityTests.java | 10 +- .../generated/DeadLetterDestinationTests.java | 2 +- ...DeliveryAttributeListResultInnerTests.java | 16 +- .../DeliveryAttributeMappingTests.java | 10 +- ...mainEventSubscriptionsDeleteMockTests.java | 4 +- ...liveryAttributesWithResponseMockTests.java | 8 +- ...ptionsGetFullUrlWithResponseMockTests.java | 8 +- .../eventgrid/generated/DomainInnerTests.java | 128 +- .../generated/DomainPropertiesTests.java | 78 +- ...opicEventSubscriptionsDeleteMockTests.java | 4 +- ...liveryAttributesWithResponseMockTests.java | 9 +- ...ptionsGetFullUrlWithResponseMockTests.java | 9 +- .../generated/DomainTopicInnerTests.java | 10 +- .../generated/DomainTopicPropertiesTests.java | 10 +- .../DomainTopicsDeleteMockTests.java | 4 +- .../DomainTopicsGetWithResponseMockTests.java | 6 +- .../DomainTopicsListByDomainMockTests.java | 6 +- .../DomainTopicsListResultTests.java | 18 +- .../DomainUpdateParameterPropertiesTests.java | 86 +- .../DomainUpdateParametersTests.java | 138 +- .../generated/DomainsDeleteMockTests.java | 4 +- ...tByResourceGroupWithResponseMockTests.java | 44 +- .../DomainsListByResourceGroupMockTests.java | 54 +- .../generated/DomainsListMockTests.java | 51 +- .../generated/DomainsListResultTests.java | 192 +- ...liveryAttributeMappingPropertiesTests.java | 10 +- .../DynamicDeliveryAttributeMappingTests.java | 15 +- ...ubscriptionDestinationPropertiesTests.java | 20 +- ...tHubEventSubscriptionDestinationTests.java | 23 +- .../EventSubscriptionDestinationTests.java | 2 +- .../EventSubscriptionFullUrlInnerTests.java | 13 +- .../EventSubscriptionsDeleteMockTests.java | 4 +- ...liveryAttributesWithResponseMockTests.java | 8 +- ...ptionsGetFullUrlWithResponseMockTests.java | 8 +- .../generated/EventTypeInfoTests.java | 45 +- .../generated/EventTypeInnerTests.java | 25 +- .../generated/EventTypePropertiesTests.java | 23 +- .../generated/EventTypesListResultTests.java | 33 +- .../generated/ExtendedLocationTests.java | 16 +- .../generated/ExtensionTopicInnerTests.java | 17 +- .../ExtensionTopicPropertiesTests.java | 17 +- ...tensionTopicsGetWithResponseMockTests.java | 10 +- .../FederatedIdentityCredentialInfoTests.java | 13 +- ...ubscriptionDestinationPropertiesTests.java | 21 +- ...tionEventSubscriptionDestinationTests.java | 20 +- .../generated/IdentityInfoTests.java | 37 +- .../generated/InboundIpRuleTests.java | 12 +- .../generated/InlineEventPropertiesTests.java | 28 +- .../generated/InputSchemaMappingTests.java | 2 +- .../generated/IssuerCertificateInfoTests.java | 22 +- .../eventgrid/generated/JsonFieldTests.java | 10 +- .../generated/JsonFieldWithDefaultTests.java | 18 +- ...JsonInputSchemaMappingPropertiesTests.java | 56 +- .../JsonInputSchemaMappingTests.java | 52 +- .../KeyEncryptionKeyIdentityTests.java | 31 + ...ubscriptionDestinationPropertiesTests.java | 24 +- ...lertEventSubscriptionDestinationTests.java | 16 +- .../generated/NamespaceSkuTests.java | 10 +- ...ubscriptionDestinationPropertiesTests.java | 10 +- ...opicEventSubscriptionDestinationTests.java | 10 +- ...opicEventSubscriptionsDeleteMockTests.java | 4 +- ...liveryAttributesWithResponseMockTests.java | 8 +- ...ptionsGetFullUrlWithResponseMockTests.java | 8 +- .../generated/NamespaceTopicInnerTests.java | 10 +- .../NamespaceTopicPropertiesTests.java | 10 +- ...ceTopicUpdateParameterPropertiesTests.java | 10 +- .../NamespaceTopicUpdateParametersTests.java | 11 +- ...amespaceTopicsCreateOrUpdateMockTests.java | 12 +- .../NamespaceTopicsDeleteMockTests.java | 4 +- ...mespaceTopicsGetWithResponseMockTests.java | 8 +- ...mespaceTopicsListByNamespaceMockTests.java | 8 +- .../NamespaceTopicsListResultTests.java | 32 +- .../generated/NamespacesDeleteMockTests.java | 4 +- .../generated/NamespacesListResultTests.java | 276 +- ...alidateCustomDomainOwnershipMockTests.java | 36 +- ...urityPerimeterConfigurationInnerTests.java | 151 +- ...terConfigurationIssuesPropertiesTests.java | 29 +- ...rityPerimeterConfigurationIssuesTests.java | 31 +- ...curityPerimeterConfigurationListTests.java | 88 +- ...ityPerimeterConfigurationProfileTests.java | 110 +- ...PerimeterConfigurationPropertiesTests.java | 169 +- ...onfigurationsGetWithResponseMockTests.java | 46 +- ...yPerimeterConfigurationsListMockTests.java | 45 +- ...meterConfigurationsReconcileMockTests.java | 42 +- .../NetworkSecurityPerimeterInfoTests.java | 20 +- ...meterProfileAccessRulePropertiesTests.java | 60 +- ...curityPerimeterProfileAccessRuleTests.java | 61 +- ...orkSecurityPerimeterSubscriptionTests.java | 13 +- .../generated/OperationInfoTests.java | 25 +- .../generated/OperationInnerTests.java | 39 +- .../generated/OperationsListMockTests.java | 16 +- .../generated/OperationsListResultTests.java | 53 +- .../PartnerClientAuthenticationTests.java | 2 +- ...urationUpdateParameterPropertiesTests.java | 10 +- ...nerConfigurationUpdateParametersTests.java | 16 +- .../PartnerConfigurationsDeleteMockTests.java | 4 +- .../PartnerDestinationInfoTests.java | 51 +- .../PartnerDestinationInnerTests.java | 55 +- .../PartnerDestinationPropertiesTests.java | 41 +- ...rtnerDestinationUpdateParametersTests.java | 13 +- ...inationsActivateWithResponseMockTests.java | 24 +- ...erDestinationsCreateOrUpdateMockTests.java | 38 +- .../PartnerDestinationsDeleteMockTests.java | 4 +- ...tByResourceGroupWithResponseMockTests.java | 24 +- ...tinationsListByResourceGroupMockTests.java | 24 +- .../PartnerDestinationsListMockTests.java | 24 +- .../PartnerDestinationsListResultTests.java | 95 +- .../generated/PartnerDetailsTests.java | 21 +- ...ubscriptionDestinationPropertiesTests.java | 10 +- ...tnerEventSubscriptionDestinationTests.java | 10 +- .../generated/PartnerNamespaceInnerTests.java | 42 +- .../PartnerNamespacePropertiesTests.java | 41 +- ...mespaceUpdateParameterPropertiesTests.java | 33 +- ...PartnerNamespaceUpdateParametersTests.java | 26 +- .../PartnerNamespacesDeleteMockTests.java | 4 +- ...tByResourceGroupWithResponseMockTests.java | 20 +- ...amespacesListByResourceGroupMockTests.java | 18 +- .../PartnerNamespacesListMockTests.java | 16 +- .../PartnerNamespacesListResultTests.java | 83 +- .../PartnerRegistrationInnerTests.java | 26 +- .../PartnerRegistrationPropertiesTests.java | 17 +- ...tnerRegistrationUpdateParametersTests.java | 14 +- ...rRegistrationsCreateOrUpdateMockTests.java | 22 +- .../PartnerRegistrationsDeleteMockTests.java | 4 +- ...tByResourceGroupWithResponseMockTests.java | 14 +- ...strationsListByResourceGroupMockTests.java | 14 +- .../PartnerRegistrationsListMockTests.java | 14 +- .../PartnerRegistrationsListResultTests.java | 60 +- ...opicEventSubscriptionsDeleteMockTests.java | 5 +- ...liveryAttributesWithResponseMockTests.java | 9 +- ...ptionsGetFullUrlWithResponseMockTests.java | 8 +- .../generated/PartnerTopicInfoTests.java | 85 +- .../generated/PartnerTopicInnerTests.java | 133 +- .../PartnerTopicPropertiesTests.java | 94 +- .../PartnerTopicUpdateParametersTests.java | 48 +- ...erTopicsActivateWithResponseMockTests.java | 42 +- ...csCreateOrUpdateWithResponseMockTests.java | 111 +- ...TopicsDeactivateWithResponseMockTests.java | 51 +- .../PartnerTopicsDeleteMockTests.java | 4 +- ...tByResourceGroupWithResponseMockTests.java | 51 +- ...nerTopicsListByResourceGroupMockTests.java | 55 +- .../generated/PartnerTopicsListMockTests.java | 52 +- .../PartnerTopicsListResultTests.java | 163 +- .../PartnerUpdateDestinationInfoTests.java | 2 +- .../PartnerUpdateTopicInfoTests.java | 51 +- .../PermissionBindingInnerTests.java | 22 +- .../PermissionBindingPropertiesTests.java | 28 +- ...issionBindingsCreateOrUpdateMockTests.java | 24 +- .../PermissionBindingsDeleteMockTests.java | 4 +- ...ssionBindingsGetWithResponseMockTests.java | 12 +- ...ssionBindingsListByNamespaceMockTests.java | 14 +- .../PermissionBindingsListResultTests.java | 44 +- .../generated/PlatformCapabilitiesTests.java | 28 + .../PrivateEndpointConnectionInnerTests.java | 45 +- ...vateEndpointConnectionListResultTests.java | 57 +- ...vateEndpointConnectionPropertiesTests.java | 45 +- ...ntConnectionsGetWithResponseMockTests.java | 18 +- ...intConnectionsListByResourceMockTests.java | 21 +- ...ateEndpointConnectionsUpdateMockTests.java | 27 +- .../generated/PrivateEndpointTests.java | 10 +- .../PrivateLinkResourceInnerTests.java | 38 +- .../PrivateLinkResourcePropertiesTests.java | 26 +- ...LinkResourcesGetWithResponseMockTests.java | 20 +- ...eLinkResourcesListByResourceMockTests.java | 21 +- .../PrivateLinkResourcesListResultTests.java | 55 +- .../generated/ResourceAssociationTests.java | 17 +- .../ResourceMoveChangeHistoryTests.java | 22 +- .../eventgrid/generated/ResourceSkuTests.java | 10 +- .../eventgrid/generated/RetryPolicyTests.java | 14 +- .../generated/RoutingIdentityInfoTests.java | 16 +- ...ubscriptionDestinationPropertiesTests.java | 18 +- ...ueueEventSubscriptionDestinationTests.java | 18 +- ...ubscriptionDestinationPropertiesTests.java | 20 +- ...opicEventSubscriptionDestinationTests.java | 20 +- ...bDeadLetterDestinationPropertiesTests.java | 15 +- ...StorageBlobDeadLetterDestinationTests.java | 14 +- ...ubscriptionDestinationPropertiesTests.java | 22 +- ...ueueEventSubscriptionDestinationTests.java | 22 +- .../SubscriptionFullUrlInnerTests.java | 13 +- .../SubscriptionsListResultTests.java | 116 +- ...opicEventSubscriptionsDeleteMockTests.java | 4 +- ...liveryAttributesWithResponseMockTests.java | 10 +- ...ptionsGetFullUrlWithResponseMockTests.java | 8 +- .../generated/SystemTopicInnerTests.java | 74 - .../generated/SystemTopicPropertiesTests.java | 29 - .../SystemTopicUpdateParametersTests.java | 41 +- .../SystemTopicsCreateOrUpdateMockTests.java | 79 - .../SystemTopicsDeleteMockTests.java | 4 +- ...tByResourceGroupWithResponseMockTests.java | 48 - ...temTopicsListByResourceGroupMockTests.java | 50 - .../generated/SystemTopicsListMockTests.java | 50 - .../SystemTopicsListResultTests.java | 134 - ...opicEventSubscriptionsDeleteMockTests.java | 4 +- ...liveryAttributesWithResponseMockTests.java | 8 +- ...ptionsGetFullUrlWithResponseMockTests.java | 9 +- .../eventgrid/generated/TopicInnerTests.java | 133 - .../generated/TopicPropertiesTests.java | 99 - .../generated/TopicSpaceInnerTests.java | 16 +- .../generated/TopicSpacePropertiesTests.java | 16 +- .../TopicSpacesCreateOrUpdateMockTests.java | 16 +- .../generated/TopicSpacesDeleteMockTests.java | 5 +- .../TopicSpacesGetWithResponseMockTests.java | 10 +- .../TopicSpacesListByNamespaceMockTests.java | 10 +- .../generated/TopicSpacesListResultTests.java | 31 +- ...TypeAdditionalEnforcedPermissionTests.java | 15 +- .../generated/TopicTypeInfoInnerTests.java | 58 +- .../generated/TopicTypePropertiesTests.java | 55 +- .../TopicTypesGetWithResponseMockTests.java | 22 +- .../TopicTypesListEventTypesMockTests.java | 14 +- .../generated/TopicTypesListMockTests.java | 22 +- .../generated/TopicTypesListResultTests.java | 97 +- .../TopicUpdateParameterPropertiesTests.java | 62 +- .../generated/TopicUpdateParametersTests.java | 153 +- .../generated/TopicsConfigurationTests.java | 69 +- ...tByResourceGroupWithResponseMockTests.java | 72 - .../TopicsListByResourceGroupMockTests.java | 77 - .../TopicsListEventTypesMockTests.java | 12 +- .../generated/TopicsListMockTests.java | 78 - .../generated/TopicsListResultTests.java | 211 - .../UpdateAutoScaleConfigurationTests.java | 32 + .../UpdateTopicsConfigurationInfoTests.java | 62 +- .../UserIdentityPropertiesTests.java | 18 +- .../generated/VerifiedPartnerInnerTests.java | 54 +- .../VerifiedPartnerPropertiesTests.java | 54 +- ...ifiedPartnersGetWithResponseMockTests.java | 28 +- .../VerifiedPartnersListMockTests.java | 29 +- .../VerifiedPartnersListResultTests.java | 107 +- .../WebhookAuthenticationSettingsTests.java | 34 +- ...ubscriptionDestinationPropertiesTests.java | 43 +- ...hookEventSubscriptionDestinationTests.java | 46 +- .../WebhookPartnerDestinationInfoTests.java | 73 +- ...hookPartnerDestinationPropertiesTests.java | 16 +- ...hookUpdatePartnerDestinationInfoTests.java | 16 +- .../tsp-location.yaml | 4 + 994 files changed, 22998 insertions(+), 38934 deletions(-) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/CaCertificatesListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/ChannelsListResult.java (67%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/ClientGroupsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/ClientsListResult.java (67%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/DomainTopicsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/DomainsListResult.java (67%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/EventSubscriptionsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/EventTypesListResult.java (76%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/NamespaceTopicsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/NamespacesListResult.java (67%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/NetworkSecurityPerimeterConfigurationList.java (65%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/OperationsListResult.java (72%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/PartnerConfigurationsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/PartnerDestinationsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/PartnerNamespacesListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/PartnerRegistrationsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/PartnerTopicsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/PermissionBindingsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/PrivateEndpointConnectionListResult.java (65%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/PrivateLinkResourcesListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/SubscriptionsListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/SystemTopicsListResult.java (67%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/TopicSpacesListResult.java (66%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/TopicTypesListResult.java (76%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/TopicsListResult.java (67%) rename sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/{ => implementation}/models/VerifiedPartnersListResult.java (65%) create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AutoScaleConfiguration.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialCompute.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialComputeMode.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomerManagedKeyEncryption.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpAddressType.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryption.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionIdentityType.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyIdentity.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyStatus.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PlatformCapabilities.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateAutoScaleConfiguration.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/azure-resourcemanager-eventgrid_metadata.json create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AutoScaleConfigurationTests.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ConfidentialComputeTests.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/KeyEncryptionKeyIdentityTests.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PlatformCapabilitiesTests.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/SystemTopicsCreateOrUpdateMockTests.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/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/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/TopicsListMockTests.java delete mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListResultTests.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UpdateAutoScaleConfigurationTests.java create mode 100644 sdk/eventgrid/azure-resourcemanager-eventgrid/tsp-location.yaml diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md index 82144eed72212..6886fe40a9ee5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md @@ -1,14 +1,793 @@ # Release History -## 1.3.0-beta.2 (Unreleased) +## 1.3.0-beta.2 (2026-10-09) -### 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 api-version 2026-06-15-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.EventSubscriptionsListResult` was removed + +#### `models.PrivateEndpointConnectionListResult` was removed + +#### `models.SubscriptionsListResult` was removed + +#### `models.NamespaceTopicsListResult` was removed + +#### `models.OperationsListResult` was removed + +#### `models.DomainsListResult` was removed + +#### `models.TopicSpacesListResult` was removed + +#### `models.TopicsListResult` was removed + +#### `models.DomainTopicsListResult` was removed + +#### `models.ChannelsListResult` was removed + +#### `models.CaCertificatesListResult` was removed + +#### `models.VerifiedPartnersListResult` was removed + +#### `models.NetworkSecurityPerimeterConfigurationList` was removed + +#### `models.EventTypesListResult` was removed + +#### `models.NamespacesListResult` was removed + +#### `models.PartnerConfigurationsListResult` was removed + +#### `models.PrivateLinkResourcesListResult` was removed + +#### `models.PermissionBindingsListResult` was removed + +#### `models.ClientsListResult` was removed + +#### `models.PartnerNamespacesListResult` was removed + +#### `models.ClientGroupsListResult` was removed + +#### `models.PartnerRegistrationsListResult` was removed + +#### `models.SystemTopicsListResult` was removed + +#### `models.TopicTypesListResult` was removed + +#### `models.PartnerTopicsListResult` was removed + +#### `models.PartnerDestinationsListResult` was removed + +#### `models.PartnerDestinationInfo` was modified + +* `validate()` was removed + +#### `models.PartnerUpdateDestinationInfo` was modified + +* `validate()` was removed + +#### `models.PrivateEndpoint` was modified + +* `validate()` was removed + +#### `models.StringNotBeginsWithAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.ConnectionState` was modified + +* `validate()` was removed + +#### `models.StringEndsWithFilter` was modified + +* `validate()` was removed + +#### `models.InlineEventProperties` was modified + +* `validate()` was removed + +#### `models.WebhookEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.StringEndsWithAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.NumberInRangeAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.IsNotNullAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.BoolEqualsFilter` was modified + +* `validate()` was removed + +#### `models.UpdateTopicSpacesConfigurationInfo` was modified + +* `validate()` was removed + +#### `models.DeliveryConfiguration` was modified + +* `validate()` was removed + +#### `models.PartnerConfigurationUpdateParameters` was modified + +* `validate()` was removed + +#### `models.UpdateTopicsConfigurationInfo` was modified + +* `validate()` was removed + +#### `models.StringNotEndsWithFilter` was modified + +* `validate()` was removed + +#### `models.ServiceBusQueueEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.UserIdentityProperties` was modified + +* `validate()` was removed + +#### `models.TopicUpdateParameters` was modified + +* `validate()` was removed + +#### `models.IsNullOrUndefinedAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.NumberLessThanFilter` was modified + +* `validate()` was removed + +#### `models.StringNotBeginsWithFilter` was modified + +* `validate()` was removed + +#### `models.PartnerDestination$Definition` was modified + +* `withPartnerRegistrationImmutableId(java.util.UUID)` was removed + +#### `models.PartnerTopic$Definition` was modified + +* `withPartnerRegistrationImmutableId(java.util.UUID)` was removed + +#### `models.StringContainsFilter` was modified + +* `validate()` was removed + +#### `models.Filter` was modified + +* `validate()` was removed + +#### `models.ResourceSku` was modified + +* `validate()` was removed + +#### `models.StringNotInFilter` was modified + +* `validate()` was removed + +#### `models.PartnerClientAuthentication` was modified + +* `validate()` was removed + +#### `models.ClientCertificateAuthentication` was modified + +* `validate()` was removed + +#### `models.RoutingEnrichments` was modified + +* `validate()` was removed + +#### `models.WebhookAuthenticationSettings` was modified + +* `validate()` was removed + +#### `models.NumberNotInFilter` was modified + +* `validate()` was removed + +#### `models.StringBeginsWithAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.TopicsConfiguration` was modified + +* `validate()` was removed + +#### `models.DeliveryAttributeMapping` was modified + +* `validate()` was removed + +#### `models.DomainUpdateParameters` was modified + +* `validate()` was removed + +#### `models.PartnerRegistration$Definition` was modified + +* `withPartnerRegistrationImmutableId(java.util.UUID)` was removed + +#### `models.StringNotEndsWithAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.NumberGreaterThanAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.StringBeginsWithFilter` was modified + +* `validate()` was removed + +#### `models.NetworkSecurityPerimeterConfigurationIssues` was modified + +* `NetworkSecurityPerimeterConfigurationIssues()` was changed to private access +* `withSuggestedResourceIds(java.util.List)` was removed +* `validate()` was removed +* `withName(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withIssueType(models.NetworkSecurityPerimeterConfigurationIssueType)` was removed +* `withSuggestedAccessRules(java.util.List)` was removed +* `withSeverity(models.NetworkSecurityPerimeterConfigurationIssueSeverity)` was removed + +#### `models.BoolEqualsAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.StringNotInAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.NumberLessThanAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.StringInFilter` was modified + +* `validate()` was removed + +#### `models.TopicSpacesConfiguration` was modified + +* `validate()` was removed + +#### `models.StaticDeliveryAttributeMapping` was modified + +* `validate()` was removed + +#### `models.EventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.DeliveryWithResourceIdentity` was modified + +* `validate()` was removed + +#### `models.NamespaceSku` was modified + +* `validate()` was removed + +#### `models.PartnerDestination` was modified + +* `java.util.UUID partnerRegistrationImmutableId()` -> `java.lang.String partnerRegistrationImmutableId()` + +#### `models.AzureFunctionEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.DeadLetterDestination` was modified + +* `validate()` was removed + +#### `models.DynamicDeliveryAttributeMapping` was modified + +* `validate()` was removed + +#### `models.NumberInFilter` was modified + +* `validate()` was removed + +#### `models.PartnerRegistration` was modified + +* `java.util.UUID partnerRegistrationImmutableId()` -> `java.lang.String partnerRegistrationImmutableId()` + +#### `models.StorageBlobDeadLetterDestination` was modified + +* `validate()` was removed + +#### `models.EncodedIssuerCertificateInfo` was modified + +* `validate()` was removed + +#### `models.JsonField` was modified + +* `validate()` was removed + +#### `models.CustomJwtAuthenticationSettings` was modified + +* `validate()` was removed + +#### `models.NetworkSecurityPerimeterConfigurationProfile` was modified + +* `NetworkSecurityPerimeterConfigurationProfile()` was changed to private access +* `withAccessRulesVersion(java.lang.String)` was removed +* `withDiagnosticSettingsVersion(java.lang.String)` was removed +* `validate()` was removed +* `withEnabledLogCategories(java.util.List)` was removed +* `withAccessRules(java.util.List)` was removed +* `withName(java.lang.String)` was removed + +#### `models.NumberLessThanOrEqualsFilter` was modified + +* `validate()` was removed + +#### `models.PartnerTopicInfo` was modified + +* `validate()` was removed + +#### `models.StaticStringRoutingEnrichment` was modified + +* `validate()` was removed + +#### `models.ResourceMoveChangeHistory` was modified + +* `validate()` was removed + +#### `models.CustomDomainConfiguration` was modified + +* `validate()` was removed + +#### `models.StringNotContainsFilter` was modified + +* `validate()` was removed + +#### `models.PartnerTopic` was modified + +* `java.util.UUID partnerRegistrationImmutableId()` -> `java.lang.String partnerRegistrationImmutableId()` + +#### `models.WebhookPartnerDestinationInfo` was modified + +* `validate()` was removed + +#### `models.PartnerNamespaceRegenerateKeyRequest` was modified + +* `validate()` was removed + +#### `models.PartnerAuthorization` was modified + +* `validate()` was removed + +#### `models.NumberGreaterThanOrEqualsFilter` was modified + +* `validate()` was removed + +#### `models.RetryPolicy` was modified + +* `validate()` was removed + +#### `models.JsonInputSchemaMapping` was modified + +* `validate()` was removed + +#### `models.DynamicRoutingEnrichment` was modified + +* `validate()` was removed + +#### `models.EventSubscriptionIdentity` was modified -### Other Changes +* `validate()` was removed + +#### `models.CustomJwtAuthenticationManagedIdentity` was modified + +* `validate()` was removed + +#### `models.EventSubscriptionFilter` was modified + +* `validate()` was removed + +#### `models.PartnerUpdateTopicInfo` was modified + +* `validate()` was removed + +#### `models.InboundIpRule` was modified + +* `validate()` was removed + +#### `models.PartnerEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.DeadLetterWithResourceIdentity` was modified + +* `validate()` was removed + +#### `models.StorageQueueEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.IsNotNullFilter` was modified + +* `validate()` was removed + +#### `models.OperationInfo` was modified + +* `OperationInfo()` was changed to private access +* `withProvider(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `validate()` was removed + +#### `models.StringInAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.ClientAuthenticationSettings` was modified + +* `validate()` was removed + +#### `models.QueueInfo` was modified + +* `validate()` was removed + +#### `models.PartnerTopicUpdateParameters` was modified + +* `validate()` was removed + +#### `models.PushInfo` was modified + +* `validate()` was removed + +#### `models.PartnerDetails` was modified + +* `PartnerDetails()` was changed to private access +* `withSetupUri(java.lang.String)` was removed +* `validate()` was removed +* `withDescription(java.lang.String)` was removed +* `withLongDescription(java.lang.String)` was removed + +#### `models.ResourceAssociation` was modified + +* `ResourceAssociation()` was changed to private access +* `withName(java.lang.String)` was removed +* `withAccessMode(models.NetworkSecurityPerimeterAssociationAccessMode)` was removed +* `validate()` was removed + +#### `models.PartnerDestinationUpdateParameters` was modified + +* `validate()` was removed + +#### `models.StringContainsAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.FiltersConfiguration` was modified + +* `validate()` was removed + +#### `models.DomainRegenerateKeyRequest` was modified + +* `validate()` was removed + +#### `models.NumberNotInRangeAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.NamespaceUpdateParameters` was modified + +* `validate()` was removed + +#### `models.NumberGreaterThanFilter` was modified + +* `validate()` was removed + +#### `models.TopicTypeAdditionalEnforcedPermission` was modified + +* `TopicTypeAdditionalEnforcedPermission()` was changed to private access +* `validate()` was removed +* `withIsDataAction(java.lang.Boolean)` was removed +* `withPermissionName(java.lang.String)` was removed + +#### `models.IdentityInfo` was modified + +* `validate()` was removed + +#### `models.NumberNotInAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.MonitorAlertEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.EventTypeInfo` was modified + +* `validate()` was removed + +#### `models.ServiceBusTopicEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.WebhookUpdatePartnerDestinationInfo` was modified + +* `validate()` was removed + +#### `models.CustomWebhookAuthenticationManagedIdentity` was modified + +* `validate()` was removed + +#### `models.RoutingIdentityInfo` was modified + +* `validate()` was removed + +#### `models.SystemTopicUpdateParameters` was modified + +* `validate()` was removed + +#### `models.NamespaceTopicEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.PartnerNamespaceUpdateParameters` was modified + +* `validate()` was removed + +#### `models.AdvancedFilter` was modified + +* `validate()` was removed + +#### `models.FederatedIdentityCredentialInfo` was modified + +* `java.util.UUID federatedClientId()` -> `java.lang.String federatedClientId()` +* `validate()` was removed +* `withFederatedClientId(java.util.UUID)` was removed + +#### `models.NetworkSecurityPerimeterSubscription` was modified + +* `NetworkSecurityPerimeterSubscription()` was changed to private access +* `withId(java.lang.String)` was removed +* `validate()` was removed + +#### `models.SubscriptionUpdateParameters` was modified + +* `validate()` was removed + +#### `models.NetworkSecurityPerimeterProfileAccessRule` was modified + +* `NetworkSecurityPerimeterProfileAccessRule()` was changed to private access +* `withName(java.lang.String)` was removed +* `withSubscriptions(java.util.List)` was removed +* `withType(java.lang.String)` was removed +* `withEmailAddresses(java.util.List)` was removed +* `validate()` was removed +* `withAddressPrefixes(java.util.List)` was removed +* `withNetworkSecurityPerimeters(java.util.List)` was removed +* `withPhoneNumbers(java.util.List)` was removed +* `withDirection(models.NetworkSecurityPerimeterProfileAccessRuleDirection)` was removed +* `withFullyQualifiedArmId(java.lang.String)` was removed +* `withFullyQualifiedDomainNames(java.util.List)` was removed + +#### `models.NamespaceTopicUpdateParameters` was modified + +* `validate()` was removed + +#### `models.TopicRegenerateKeyRequest` was modified + +* `validate()` was removed + +#### `models.PartnerRegistrationUpdateParameters` was modified + +* `validate()` was removed + +#### `models.CustomDomainIdentity` was modified + +* `validate()` was removed + +#### `models.NetworkSecurityPerimeterInfo` was modified + +* `NetworkSecurityPerimeterInfo()` was changed to private access +* `withId(java.lang.String)` was removed +* `withLocation(java.lang.String)` was removed +* `validate()` was removed +* `withPerimeterGuid(java.lang.String)` was removed + +#### `models.StaticRoutingEnrichment` was modified + +* `validate()` was removed + +#### `models.AzureADPartnerClientAuthentication` was modified + +* `validate()` was removed + +#### `models.NumberGreaterThanOrEqualsAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.HybridConnectionEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.NumberInRangeFilter` was modified + +* `validate()` was removed + +#### `models.IsNullOrUndefinedFilter` was modified + +* `validate()` was removed + +#### `models.InputSchemaMapping` was modified + +* `validate()` was removed + +#### `models.ChannelUpdateParameters` was modified + +* `validate()` was removed + +#### `models.StringNotContainsAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.EventHubEventSubscriptionDestination` was modified + +* `validate()` was removed + +#### `models.IssuerCertificateInfo` was modified + +* `validate()` was removed + +#### `models.NamespaceRegenerateKeyRequest` was modified + +* `validate()` was removed + +#### `models.NumberLessThanOrEqualsAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.NumberNotInRangeFilter` was modified + +* `validate()` was removed + +#### `models.ExtendedLocation` was modified + +* `validate()` was removed + +#### `models.JsonFieldWithDefault` was modified + +* `validate()` was removed + +#### `models.VerifiedPartner` was modified + +* `java.util.UUID partnerRegistrationImmutableId()` -> `java.lang.String partnerRegistrationImmutableId()` + +#### `models.Partner` was modified + +* `java.util.UUID partnerRegistrationImmutableId()` -> `java.lang.String partnerRegistrationImmutableId()` +* `validate()` was removed +* `withPartnerRegistrationImmutableId(java.util.UUID)` was removed + +#### `models.NumberInAdvancedFilter` was modified + +* `validate()` was removed + +#### `models.EventSubscriptionUpdateParameters` was modified + +* `validate()` was removed + +### Features Added + +* `models.ConfidentialCompute` was added + +* `models.PlatformCapabilities` was added + +* `models.IpAddressType` was added + +* `models.ConfidentialComputeMode` was added + +* `models.AutoScaleConfiguration` was added + +* `models.KeyEncryptionKeyIdentity` was added + +* `models.KeyEncryption` was added + +* `models.KeyEncryptionIdentityType` was added + +* `models.CustomerManagedKeyEncryption` was added + +* `models.KeyEncryptionKeyStatus` was added + +* `models.UpdateAutoScaleConfiguration` was added + +#### `models.SystemTopic` was modified + +* `encryption()` was added +* `platformCapabilities()` was added + +#### `models.PartnerDestination$Definition` was modified + +* `withPartnerRegistrationImmutableId(java.lang.String)` was added + +#### `models.PartnerTopic$Definition` was modified + +* `withPartnerRegistrationImmutableId(java.lang.String)` was added + +#### `models.Namespace` was modified + +* `ipAddressType()` was added +* `autoScaleConfiguration()` was added + +#### `models.Topic$Definition` was modified + +* `withPlatformCapabilities(models.PlatformCapabilities)` was added +* `withEncryption(models.KeyEncryption)` was added + +#### `models.PrivateEndpointConnection` was modified + +* `systemData()` was added + +#### `models.PartnerRegistration$Definition` was modified + +* `withPartnerRegistrationImmutableId(java.lang.String)` was added + +#### `models.EventType` was modified + +* `systemData()` was added + +#### `models.TlsVersion` was modified + +* `ONE_THREE` was added + +#### `models.WebhookPartnerDestinationInfo` was modified + +* `resourceMoveChangeHistory()` was added + +#### `models.Topic` was modified + +* `encryption()` was added +* `platformCapabilities()` was added + +#### `models.Namespace$Definition` was modified + +* `withIpAddressType(models.IpAddressType)` was added +* `withAutoScaleConfiguration(models.AutoScaleConfiguration)` was added + +#### `models.SystemTopic$Definition` was modified + +* `withPlatformCapabilities(models.PlatformCapabilities)` was added +* `withEncryption(models.KeyEncryption)` was added + +#### `models.Namespace$Update` was modified + +* `withIpAddressType(models.IpAddressType)` was added +* `withAutoScaleConfiguration(models.UpdateAutoScaleConfiguration)` was added + +#### `models.NamespaceUpdateParameters` was modified + +* `autoScaleConfiguration()` was added +* `withIpAddressType(models.IpAddressType)` was added +* `ipAddressType()` was added +* `withAutoScaleConfiguration(models.UpdateAutoScaleConfiguration)` was added + +#### `models.FederatedIdentityCredentialInfo` was modified + +* `withFederatedClientId(java.lang.String)` was added + +#### `models.TopicTypeInfo` was modified + +* `systemData()` was added + +#### `models.Partner` was modified + +* `withPartnerRegistrationImmutableId(java.lang.String)` was added + +#### `models.NetworkSecurityPerimeterConfiguration` was modified + +* `systemData()` was added ## 1.3.0-beta.1 (2025-07-25) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md index 215cd75236e64..d41feebe50ede 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-2025-04-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 api-version 2026-06-15-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.3.0-beta.1 + 1.3.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md index ce5fd937bb72f..8c8b8e7238f69 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md @@ -281,9 +281,7 @@ */ public final class CaCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * CaCertificates_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/CaCertificates_CreateOrUpdate.json */ /** * Sample code: CaCertificates_CreateOrUpdate. @@ -309,9 +307,7 @@ public final class CaCertificatesCreateOrUpdateSamples { */ public final class CaCertificatesDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * CaCertificates_Delete.json + * x-ms-original-file: 2026-06-15-preview/CaCertificates_Delete.json */ /** * Sample code: CaCertificates_Delete. @@ -334,9 +330,7 @@ public final class CaCertificatesDeleteSamples { */ public final class CaCertificatesGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * CaCertificates_Get.json + * x-ms-original-file: 2026-06-15-preview/CaCertificates_Get.json */ /** * Sample code: CaCertificates_Get. @@ -359,9 +353,7 @@ public final class CaCertificatesGetSamples { */ public final class CaCertificatesListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * CaCertificates_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/CaCertificates_ListByNamespace.json */ /** * Sample code: CaCertificates_ListByNamespace. @@ -387,9 +379,7 @@ import java.time.OffsetDateTime; */ public final class ChannelsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Channels_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/Channels_CreateOrUpdate.json */ /** * Sample code: Channels_CreateOrUpdate. @@ -420,9 +410,7 @@ public final class ChannelsCreateOrUpdateSamples { */ public final class ChannelsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Delete. - * json + * x-ms-original-file: 2026-06-15-preview/Channels_Delete.json */ /** * Sample code: Channels_Delete. @@ -445,9 +433,7 @@ public final class ChannelsDeleteSamples { */ public final class ChannelsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Get. - * json + * x-ms-original-file: 2026-06-15-preview/Channels_Get.json */ /** * Sample code: Channels_Get. @@ -470,9 +456,7 @@ public final class ChannelsGetSamples { */ public final class ChannelsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Channels_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/Channels_GetFullUrl.json */ /** * Sample code: Channels_GetFullUrl. @@ -495,9 +479,7 @@ public final class ChannelsGetFullUrlSamples { */ public final class ChannelsListByPartnerNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Channels_ListByPartnerNamespace.json + * x-ms-original-file: 2026-06-15-preview/Channels_ListByPartnerNamespace.json */ /** * Sample code: Channels_ListByPartnerNamespace. @@ -523,9 +505,7 @@ import java.time.OffsetDateTime; */ public final class ChannelsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Update. - * json + * x-ms-original-file: 2026-06-15-preview/Channels_Update.json */ /** * Sample code: Channels_Update. @@ -550,9 +530,7 @@ public final class ChannelsUpdateSamples { */ public final class ClientGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * ClientGroups_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/ClientGroups_CreateOrUpdate.json */ /** * Sample code: ClientGroups_CreateOrUpdate. @@ -578,9 +556,7 @@ public final class ClientGroupsCreateOrUpdateSamples { */ public final class ClientGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * ClientGroups_Delete.json + * x-ms-original-file: 2026-06-15-preview/ClientGroups_Delete.json */ /** * Sample code: ClientGroups_Delete. @@ -602,9 +578,7 @@ public final class ClientGroupsDeleteSamples { */ public final class ClientGroupsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_Get - * .json + * x-ms-original-file: 2026-06-15-preview/ClientGroups_Get.json */ /** * Sample code: ClientGroups_Get. @@ -627,9 +601,7 @@ public final class ClientGroupsGetSamples { */ public final class ClientGroupsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * ClientGroups_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/ClientGroups_ListByNamespace.json */ /** * Sample code: ClientGroups_ListByNamespace. @@ -660,9 +632,7 @@ import java.util.Map; */ public final class ClientsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Clients_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/Clients_CreateOrUpdate.json */ /** * Sample code: Clients_CreateOrUpdate. @@ -707,9 +677,7 @@ public final class ClientsCreateOrUpdateSamples { */ public final class ClientsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Delete. - * json + * x-ms-original-file: 2026-06-15-preview/Clients_Delete.json */ /** * Sample code: Clients_Delete. @@ -731,8 +699,7 @@ public final class ClientsDeleteSamples { */ public final class ClientsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Get.json + * x-ms-original-file: 2026-06-15-preview/Clients_Get.json */ /** * Sample code: Clients_Get. @@ -755,9 +722,7 @@ public final class ClientsGetSamples { */ public final class ClientsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Clients_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/Clients_ListByNamespace.json */ /** * Sample code: Clients_ListByNamespace. @@ -782,9 +747,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class DomainEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/DomainEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainEventSubscriptions_CreateOrUpdate. @@ -814,9 +777,7 @@ public final class DomainEventSubscriptionsCreateOrUpdateSamples { */ public final class DomainEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/DomainEventSubscriptions_Delete.json */ /** * Sample code: DomainEventSubscriptions_Delete. @@ -838,9 +799,7 @@ public final class DomainEventSubscriptionsDeleteSamples { */ public final class DomainEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/DomainEventSubscriptions_Get.json */ /** * Sample code: DomainEventSubscriptions_Get. @@ -862,9 +821,7 @@ public final class DomainEventSubscriptionsGetSamples { */ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/DomainEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainEventSubscriptions_GetDeliveryAttributes. @@ -888,9 +845,7 @@ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { */ public final class DomainEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/DomainEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainEventSubscriptions_GetFullUrl. @@ -914,9 +869,7 @@ public final class DomainEventSubscriptionsGetFullUrlSamples { */ public final class DomainEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_List.json + * x-ms-original-file: 2026-06-15-preview/DomainEventSubscriptions_List.json */ /** * Sample code: DomainEventSubscriptions_List. @@ -943,9 +896,7 @@ import java.util.Arrays; */ public final class DomainEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/DomainEventSubscriptions_Update.json */ /** * Sample code: DomainEventSubscriptions_Update. @@ -979,9 +930,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/DomainTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainTopicEventSubscriptions_CreateOrUpdate. @@ -1011,9 +960,7 @@ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class DomainTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/DomainTopicEventSubscriptions_Delete.json */ /** * Sample code: DomainTopicEventSubscriptions_Delete. @@ -1037,9 +984,7 @@ public final class DomainTopicEventSubscriptionsDeleteSamples { */ public final class DomainTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/DomainTopicEventSubscriptions_Get.json */ /** * Sample code: DomainTopicEventSubscriptions_Get. @@ -1062,9 +1007,7 @@ public final class DomainTopicEventSubscriptionsGetSamples { */ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainTopicEventSubscriptions_GetDeliveryAttributes. @@ -1088,9 +1031,7 @@ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/DomainTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainTopicEventSubscriptions_GetFullUrl. @@ -1114,9 +1055,7 @@ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { */ public final class DomainTopicEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_List.json + * x-ms-original-file: 2026-06-15-preview/DomainTopicEventSubscriptions_List.json */ /** * Sample code: DomainTopicEventSubscriptions_List. @@ -1143,9 +1082,7 @@ import java.util.Arrays; */ public final class DomainTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/DomainTopicEventSubscriptions_Update.json */ /** * Sample code: DomainTopicEventSubscriptions_Update. @@ -1176,9 +1113,7 @@ public final class DomainTopicEventSubscriptionsUpdateSamples { */ public final class DomainTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/DomainTopics_CreateOrUpdate.json */ /** * Sample code: DomainTopics_CreateOrUpdate. @@ -1200,9 +1135,7 @@ public final class DomainTopicsCreateOrUpdateSamples { */ public final class DomainTopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopics_Delete.json + * x-ms-original-file: 2026-06-15-preview/DomainTopics_Delete.json */ /** * Sample code: DomainTopics_Delete. @@ -1224,9 +1157,7 @@ public final class DomainTopicsDeleteSamples { */ public final class DomainTopicsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_Get - * .json + * x-ms-original-file: 2026-06-15-preview/DomainTopics_Get.json */ /** * Sample code: DomainTopics_Get. @@ -1248,9 +1179,7 @@ public final class DomainTopicsGetSamples { */ public final class DomainTopicsListByDomainSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopics_ListByDomain.json + * x-ms-original-file: 2026-06-15-preview/DomainTopics_ListByDomain.json */ /** * Sample code: DomainTopics_ListByDomain. @@ -1279,9 +1208,7 @@ import java.util.Map; */ public final class DomainsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/Domains_CreateOrUpdate.json */ /** * Sample code: Domains_CreateOrUpdate. @@ -1323,9 +1250,7 @@ public final class DomainsCreateOrUpdateSamples { */ public final class DomainsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Delete. - * json + * x-ms-original-file: 2026-06-15-preview/Domains_Delete.json */ /** * Sample code: Domains_Delete. @@ -1346,8 +1271,7 @@ public final class DomainsDeleteSamples { */ public final class DomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Get.json + * x-ms-original-file: 2026-06-15-preview/Domains_Get.json */ /** * Sample code: Domains_Get. @@ -1369,9 +1293,7 @@ public final class DomainsGetByResourceGroupSamples { */ public final class DomainsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/Domains_ListBySubscription.json */ /** * Sample code: Domains_ListBySubscription. @@ -1392,9 +1314,7 @@ public final class DomainsListSamples { */ public final class DomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/Domains_ListByResourceGroup.json */ /** * Sample code: Domains_ListByResourceGroup. @@ -1415,9 +1335,7 @@ public final class DomainsListByResourceGroupSamples { */ public final class DomainsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/Domains_ListSharedAccessKeys.json */ /** * Sample code: Domains_ListSharedAccessKeys. @@ -1441,9 +1359,7 @@ import com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest; */ public final class DomainsRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/Domains_RegenerateKey.json */ /** * Sample code: Domains_RegenerateKey. @@ -1474,9 +1390,7 @@ import java.util.Map; */ public final class DomainsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Update. - * json + * x-ms-original-file: 2026-06-15-preview/Domains_Update.json */ /** * Sample code: Domains_Update. @@ -1528,9 +1442,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class EventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination. @@ -1552,9 +1464,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForSubscription.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForSubscription. @@ -1573,8 +1483,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination. @@ -1599,9 +1508,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForResource.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResource. @@ -1622,9 +1529,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic. @@ -1646,9 +1551,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResourceGroup. @@ -1668,9 +1571,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination. @@ -1696,8 +1597,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination. @@ -1725,8 +1625,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination. @@ -1752,8 +1651,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination. @@ -1779,8 +1677,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination. @@ -1814,9 +1711,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { */ public final class EventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_DeleteForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_DeleteForCustomTopic.json */ /** * Sample code: EventSubscriptions_DeleteForCustomTopic. @@ -1832,9 +1727,7 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_DeleteForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_DeleteForResourceGroup.json */ /** * Sample code: EventSubscriptions_DeleteForResourceGroup. @@ -1849,9 +1742,7 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_DeleteForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_DeleteForSubscription.json */ /** * Sample code: EventSubscriptions_DeleteForSubscription. @@ -1866,9 +1757,7 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_DeleteForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_DeleteForResource.json */ /** * Sample code: EventSubscriptions_DeleteForResource. @@ -1893,9 +1782,7 @@ public final class EventSubscriptionsDeleteSamples { */ public final class EventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_HybridConnectionDestination. @@ -1911,9 +1798,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination. @@ -1929,9 +1814,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetForResourceGroup. @@ -1946,9 +1829,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_EventHubDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_EventHubDestination. @@ -1964,9 +1845,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForSubscription.json */ /** * Sample code: EventSubscriptions_GetForSubscription. @@ -1981,9 +1860,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_WebhookDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_WebhookDestination. @@ -1999,9 +1876,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_AzureFunctionDestination. @@ -2017,9 +1892,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic. @@ -2035,9 +1908,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_StorageQueueDestination. @@ -2053,9 +1924,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForResource.json */ /** * Sample code: EventSubscriptions_GetForResource. @@ -2070,9 +1939,7 @@ public final class EventSubscriptionsGetSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination. @@ -2097,9 +1964,7 @@ public final class EventSubscriptionsGetSamples { */ public final class EventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: EventSubscriptions_GetDeliveryAttributes. @@ -2124,9 +1989,7 @@ public final class EventSubscriptionsGetDeliveryAttributesSamples { */ public final class EventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetFullUrlForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetFullUrlForResource.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResource. @@ -2142,9 +2005,7 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetFullUrlForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetFullUrlForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResourceGroup. @@ -2159,9 +2020,7 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetFullUrlForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetFullUrlForSubscription.json */ /** * Sample code: EventSubscriptions_GetFullUrlForSubscription. @@ -2176,9 +2035,7 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetFullUrlForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetFullUrlForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetFullUrlForCustomTopic. @@ -2203,9 +2060,7 @@ public final class EventSubscriptionsGetFullUrlSamples { */ public final class EventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListGlobalBySubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListGlobalBySubscription.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscription. @@ -2227,9 +2082,7 @@ public final class EventSubscriptionsListSamples { */ public final class EventSubscriptionsListByDomainTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListByDomainTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListByDomainTopic.json */ /** * Sample code: EventSubscriptions_ListByDomainTopic. @@ -2252,9 +2105,7 @@ public final class EventSubscriptionsListByDomainTopicSamples { */ public final class EventSubscriptionsListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListByResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListByResource.json */ /** * Sample code: EventSubscriptions_ListByResource. @@ -2277,9 +2128,7 @@ public final class EventSubscriptionsListByResourceSamples { */ public final class EventSubscriptionsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListGlobalByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListGlobalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroup. @@ -2301,9 +2150,7 @@ public final class EventSubscriptionsListByResourceGroupSamples { */ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListGlobalByResourceGroupForTopicType.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroupForTopicType. @@ -2327,9 +2174,7 @@ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSample */ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListGlobalBySubscriptionForTopicType.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscriptionForTopicType. @@ -2353,9 +2198,7 @@ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples */ public final class EventSubscriptionsListRegionalByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListRegionalByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListRegionalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroup. @@ -2378,9 +2221,7 @@ public final class EventSubscriptionsListRegionalByResourceGroupSamples { */ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListRegionalByResourceGroupForTopicType.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroupForTopicType. @@ -2404,9 +2245,7 @@ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamp */ public final class EventSubscriptionsListRegionalBySubscriptionSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListRegionalBySubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListRegionalBySubscription.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscription. @@ -2429,9 +2268,7 @@ public final class EventSubscriptionsListRegionalBySubscriptionSamples { */ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListRegionalBySubscriptionForTopicType.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscriptionForTopicType. @@ -2467,9 +2304,7 @@ import java.util.Arrays; */ public final class EventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_EventHubDestination. @@ -2494,9 +2329,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination. @@ -2523,9 +2356,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_WebhookDestination. @@ -2549,9 +2380,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination. @@ -2580,9 +2409,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination. @@ -2607,9 +2434,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination. @@ -2634,9 +2459,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination. @@ -2663,9 +2486,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic. @@ -2689,9 +2510,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForResource.json */ /** * Sample code: EventSubscriptions_UpdateForResource. @@ -2715,9 +2534,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_UpdateForResourceGroup. @@ -2741,9 +2558,7 @@ public final class EventSubscriptionsUpdateSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForSubscription.json */ /** * Sample code: EventSubscriptions_UpdateForSubscription. @@ -2775,9 +2590,7 @@ public final class EventSubscriptionsUpdateSamples { */ public final class ExtensionTopicsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * ExtensionTopics_Get.json + * x-ms-original-file: 2026-06-15-preview/ExtensionTopics_Get.json */ /** * Sample code: ExtensionTopics_Get. @@ -2807,9 +2620,7 @@ import java.time.Duration; */ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: NamespaceTopicEventSubscriptions_CreateOrUpdate. @@ -2839,9 +2650,7 @@ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class NamespaceTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopicEventSubscriptions_Delete.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Delete. @@ -2865,9 +2674,7 @@ public final class NamespaceTopicEventSubscriptionsDeleteSamples { */ public final class NamespaceTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopicEventSubscriptions_Get.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Get. @@ -2891,9 +2698,7 @@ public final class NamespaceTopicEventSubscriptionsGetSamples { */ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: NamespaceTopicEventSubscriptions_GetDeliveryAttributes. @@ -2917,9 +2722,7 @@ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples */ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: NamespaceTopicEventSubscriptions_GetFullUrl. @@ -2943,9 +2746,7 @@ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { */ public final class NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json */ /** * Sample code: NamespaceTopicEventSubscriptions_ListByNamespaceTopic. @@ -2976,9 +2777,7 @@ import java.time.Duration; */ public final class NamespaceTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopicEventSubscriptions_Update.json */ /** * Sample code: NamespaceTopicEventSubscriptions_Update. @@ -3013,9 +2812,7 @@ import com.azure.resourcemanager.eventgrid.models.PublisherType; */ public final class NamespaceTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopics_CreateOrUpdate.json */ /** * Sample code: NamespaceTopics_CreateOrUpdate. @@ -3042,9 +2839,7 @@ public final class NamespaceTopicsCreateOrUpdateSamples { */ public final class NamespaceTopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_Delete.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopics_Delete.json */ /** * Sample code: NamespaceTopics_Delete. @@ -3066,9 +2861,7 @@ public final class NamespaceTopicsDeleteSamples { */ public final class NamespaceTopicsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_Get.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopics_Get.json */ /** * Sample code: NamespaceTopics_Get. @@ -3091,9 +2884,7 @@ public final class NamespaceTopicsGetSamples { */ public final class NamespaceTopicsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopics_ListByNamespace.json */ /** * Sample code: NamespaceTopics_ListByNamespace. @@ -3115,9 +2906,7 @@ public final class NamespaceTopicsListByNamespaceSamples { */ public final class NamespaceTopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopics_ListSharedAccessKeys.json */ /** * Sample code: NamespaceTopics_ListSharedAccessKeys. @@ -3143,9 +2932,7 @@ import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; */ public final class NamespaceTopicsRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopics_RegenerateKey.json */ /** * Sample code: NamespaceTopics_RegenerateKey. @@ -3170,9 +2957,7 @@ import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; */ public final class NamespaceTopicsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_Update.json + * x-ms-original-file: 2026-06-15-preview/NamespaceTopics_Update.json */ /** * Sample code: NamespaceTopics_Update. @@ -3192,6 +2977,7 @@ public final class NamespaceTopicsUpdateSamples { ### Namespaces_CreateOrUpdate ```java +import com.azure.resourcemanager.eventgrid.models.IpAddressType; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState; import java.util.HashMap; @@ -3202,9 +2988,7 @@ import java.util.Map; */ public final class NamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_CreateOrUpdate.json */ /** * Sample code: Namespaces_CreateOrUpdate. @@ -3221,6 +3005,7 @@ public final class NamespacesCreateOrUpdateSamples { .withState(TopicSpacesConfigurationState.ENABLED) .withRouteTopicResourceId( "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampleTopic1")) + .withIpAddressType(IpAddressType.DUAL_STACK) .create(); } @@ -3246,9 +3031,7 @@ public final class NamespacesCreateOrUpdateSamples { */ public final class NamespacesDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_Delete.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_Delete.json */ /** * Sample code: Namespaces_Delete. @@ -3269,9 +3052,7 @@ public final class NamespacesDeleteSamples { */ public final class NamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_Get. - * json + * x-ms-original-file: 2026-06-15-preview/Namespaces_Get.json */ /** * Sample code: Namespaces_Get. @@ -3293,9 +3074,7 @@ public final class NamespacesGetByResourceGroupSamples { */ public final class NamespacesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_ListBySubscription.json */ /** * Sample code: Namespaces_ListBySubscription. @@ -3316,9 +3095,7 @@ public final class NamespacesListSamples { */ public final class NamespacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_ListByResourceGroup.json */ /** * Sample code: Namespaces_ListByResourceGroup. @@ -3339,9 +3116,7 @@ public final class NamespacesListByResourceGroupSamples { */ public final class NamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_ListSharedAccessKeys.json */ /** * Sample code: Namespaces_ListSharedAccessKeys. @@ -3365,9 +3140,7 @@ import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; */ public final class NamespacesRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_RegenerateKey.json */ /** * Sample code: Namespaces_RegenerateKey. @@ -3386,6 +3159,7 @@ public final class NamespacesRegenerateKeySamples { ### Namespaces_Update ```java +import com.azure.resourcemanager.eventgrid.models.IpAddressType; import com.azure.resourcemanager.eventgrid.models.Namespace; import java.util.HashMap; import java.util.Map; @@ -3395,9 +3169,7 @@ import java.util.Map; */ public final class NamespacesUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_Update.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_Update.json */ /** * Sample code: Namespaces_Update. @@ -3408,7 +3180,7 @@ public final class NamespacesUpdateSamples { Namespace resource = manager.namespaces() .getByResourceGroupWithResponse("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("tag1", "value1Updated")).apply(); + resource.update().withTags(mapOf("tag1", "value1Updated")).withIpAddressType(IpAddressType.DUAL_STACK).apply(); } // Use "Map.of" if available @@ -3433,9 +3205,7 @@ public final class NamespacesUpdateSamples { */ public final class NamespacesValidateCustomDomainOwnershipSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_ValidateCustomDomainOwnership.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_ValidateCustomDomainOwnership.json */ /** * Sample code: Namespaces_ValidateCustomDomainOwnership. @@ -3460,9 +3230,7 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResour */ public final class NetworkSecurityPerimeterConfigurationsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_Get.json + * x-ms-original-file: 2026-06-15-preview/NetworkSecurityPerimeterConfigurations_Get.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_Get. @@ -3488,9 +3256,7 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResour */ public final class NetworkSecurityPerimeterConfigurationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_List.json + * x-ms-original-file: 2026-06-15-preview/NetworkSecurityPerimeterConfigurations_List.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_List. @@ -3516,9 +3282,7 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResour */ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_Reconcile.json + * x-ms-original-file: 2026-06-15-preview/NetworkSecurityPerimeterConfigurations_Reconcile.json */ /** * Sample code: NetworkSecurityPerimeterConfigurations_Reconcile. @@ -3542,9 +3306,7 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Operations_List. - * json + * x-ms-original-file: 2026-06-15-preview/Operations_List.json */ /** * Sample code: Operations_List. @@ -3562,16 +3324,13 @@ public final class OperationsListSamples { ```java import com.azure.resourcemanager.eventgrid.models.Partner; import java.time.OffsetDateTime; -import java.util.UUID; /** * Samples for PartnerConfigurations AuthorizePartner. */ public final class PartnerConfigurationsAuthorizePartnerSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_AuthorizePartner.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_AuthorizePartner.json */ /** * Sample code: PartnerConfigurations_AuthorizePartner. @@ -3582,8 +3341,7 @@ public final class PartnerConfigurationsAuthorizePartnerSamples { partnerConfigurationsAuthorizePartner(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.partnerConfigurations() .authorizePartnerWithResponse("examplerg", - new Partner() - .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) + new Partner().withPartnerRegistrationImmutableId("941892bc-f5d0-4d1c-8fb5-477570fc2b71") .withPartnerName("Contoso.Finance") .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), com.azure.core.util.Context.NONE); @@ -3599,16 +3357,13 @@ import com.azure.resourcemanager.eventgrid.models.Partner; import com.azure.resourcemanager.eventgrid.models.PartnerAuthorization; import java.time.OffsetDateTime; import java.util.Arrays; -import java.util.UUID; /** * Samples for PartnerConfigurations CreateOrUpdate. */ public final class PartnerConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_CreateOrUpdate.json */ /** * Sample code: PartnerConfigurations_CreateOrUpdate. @@ -3619,20 +3374,15 @@ public final class PartnerConfigurationsCreateOrUpdateSamples { partnerConfigurationsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.partnerConfigurations() .createOrUpdate("examplerg", - new PartnerConfigurationInner() - .withPartnerAuthorization(new PartnerAuthorization().withDefaultMaximumExpirationTimeInDays(10) - .withAuthorizedPartnersList(Arrays.asList( - new Partner() - .withPartnerRegistrationImmutableId( - UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) - .withPartnerName("Contoso.Finance") - .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), - new Partner() - .withPartnerRegistrationImmutableId( - UUID.fromString("5362bdb6-ce3e-4d0d-9a5b-3eb92c8aab38")) - .withPartnerName("fabrikam.HR") - .withAuthorizationExpirationTimeInUtc( - OffsetDateTime.parse("2022-02-20T01:00:00.142Z"))))), + new PartnerConfigurationInner().withPartnerAuthorization(new PartnerAuthorization() + .withDefaultMaximumExpirationTimeInDays(10) + .withAuthorizedPartnersList(Arrays.asList( + new Partner().withPartnerRegistrationImmutableId("941892bc-f5d0-4d1c-8fb5-477570fc2b71") + .withPartnerName("Contoso.Finance") + .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), + new Partner().withPartnerRegistrationImmutableId("5362bdb6-ce3e-4d0d-9a5b-3eb92c8aab38") + .withPartnerName("fabrikam.HR") + .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-02-20T01:00:00.142Z"))))), com.azure.core.util.Context.NONE); } } @@ -3646,9 +3396,7 @@ public final class PartnerConfigurationsCreateOrUpdateSamples { */ public final class PartnerConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_Delete.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_Delete.json */ /** * Sample code: PartnerConfigurations_Delete. @@ -3669,9 +3417,7 @@ public final class PartnerConfigurationsDeleteSamples { */ public final class PartnerConfigurationsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_Get.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_Get.json */ /** * Sample code: PartnerConfigurations_Get. @@ -3692,9 +3438,7 @@ public final class PartnerConfigurationsGetByResourceGroupSamples { */ public final class PartnerConfigurationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_ListBySubscription.json */ /** * Sample code: PartnerConfigurations_ListBySubscription. @@ -3716,9 +3460,7 @@ public final class PartnerConfigurationsListSamples { */ public final class PartnerConfigurationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_ListByResourceGroup.json */ /** * Sample code: PartnerConfigurations_ListByResourceGroup. @@ -3737,16 +3479,13 @@ public final class PartnerConfigurationsListByResourceGroupSamples { ```java import com.azure.resourcemanager.eventgrid.models.Partner; import java.time.OffsetDateTime; -import java.util.UUID; /** * Samples for PartnerConfigurations UnauthorizePartner. */ public final class PartnerConfigurationsUnauthorizePartnerSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_UnauthorizePartner.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_UnauthorizePartner.json */ /** * Sample code: PartnerConfigurations_UnauthorizePartner. @@ -3757,8 +3496,7 @@ public final class PartnerConfigurationsUnauthorizePartnerSamples { partnerConfigurationsUnauthorizePartner(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.partnerConfigurations() .unauthorizePartnerWithResponse("examplerg", - new Partner() - .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) + new Partner().withPartnerRegistrationImmutableId("941892bc-f5d0-4d1c-8fb5-477570fc2b71") .withPartnerName("Contoso.Finance") .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), com.azure.core.util.Context.NONE); @@ -3778,9 +3516,7 @@ import java.util.Map; */ public final class PartnerConfigurationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_Update.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_Update.json */ /** * Sample code: PartnerConfigurations_Update. @@ -3817,9 +3553,7 @@ public final class PartnerConfigurationsUpdateSamples { */ public final class PartnerDestinationsActivateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_Activate.json + * x-ms-original-file: 2026-06-15-preview/PartnerDestinations_Activate.json */ /** * Sample code: PartnerDestinations_Activate. @@ -3837,16 +3571,13 @@ public final class PartnerDestinationsActivateSamples { ```java import java.time.OffsetDateTime; -import java.util.UUID; /** * Samples for PartnerDestinations CreateOrUpdate. */ public final class PartnerDestinationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerDestinations_CreateOrUpdate.json */ /** * Sample code: PartnerDestinations_CreateOrUpdate. @@ -3858,7 +3589,7 @@ public final class PartnerDestinationsCreateOrUpdateSamples { .define("examplePartnerDestinationName1") .withRegion("westus2") .withExistingResourceGroup("examplerg") - .withPartnerRegistrationImmutableId(UUID.fromString("0bd70ee2-7d95-447e-ab1f-c4f320019404")) + .withPartnerRegistrationImmutableId("0bd70ee2-7d95-447e-ab1f-c4f320019404") .withEndpointServiceContext("This is an example") .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-14T19:33:43.430Z")) .withEndpointBaseUrl("https://www.example/endpoint") @@ -3876,9 +3607,7 @@ public final class PartnerDestinationsCreateOrUpdateSamples { */ public final class PartnerDestinationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_Delete.json + * x-ms-original-file: 2026-06-15-preview/PartnerDestinations_Delete.json */ /** * Sample code: PartnerDestinations_Delete. @@ -3900,9 +3629,7 @@ public final class PartnerDestinationsDeleteSamples { */ public final class PartnerDestinationsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_Get.json + * x-ms-original-file: 2026-06-15-preview/PartnerDestinations_Get.json */ /** * Sample code: PartnerDestinations_Get. @@ -3925,9 +3652,7 @@ public final class PartnerDestinationsGetByResourceGroupSamples { */ public final class PartnerDestinationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/PartnerDestinations_ListBySubscription.json */ /** * Sample code: PartnerDestinations_ListBySubscription. @@ -3949,9 +3674,7 @@ public final class PartnerDestinationsListSamples { */ public final class PartnerDestinationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/PartnerDestinations_ListByResourceGroup.json */ /** * Sample code: PartnerDestinations_ListByResourceGroup. @@ -3977,9 +3700,7 @@ import java.util.Map; */ public final class PartnerDestinationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_Update.json + * x-ms-original-file: 2026-06-15-preview/PartnerDestinations_Update.json */ /** * Sample code: PartnerDestinations_Update. @@ -4019,9 +3740,7 @@ import java.util.Map; */ public final class PartnerNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerNamespaces_CreateOrUpdate.json */ /** * Sample code: PartnerNamespaces_CreateOrUpdate. @@ -4061,9 +3780,7 @@ public final class PartnerNamespacesCreateOrUpdateSamples { */ public final class PartnerNamespacesDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_Delete.json + * x-ms-original-file: 2026-06-15-preview/PartnerNamespaces_Delete.json */ /** * Sample code: PartnerNamespaces_Delete. @@ -4085,9 +3802,7 @@ public final class PartnerNamespacesDeleteSamples { */ public final class PartnerNamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_Get.json + * x-ms-original-file: 2026-06-15-preview/PartnerNamespaces_Get.json */ /** * Sample code: PartnerNamespaces_Get. @@ -4110,9 +3825,7 @@ public final class PartnerNamespacesGetByResourceGroupSamples { */ public final class PartnerNamespacesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/PartnerNamespaces_ListBySubscription.json */ /** * Sample code: PartnerNamespaces_ListBySubscription. @@ -4134,9 +3847,7 @@ public final class PartnerNamespacesListSamples { */ public final class PartnerNamespacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/PartnerNamespaces_ListByResourceGroup.json */ /** * Sample code: PartnerNamespaces_ListByResourceGroup. @@ -4158,9 +3869,7 @@ public final class PartnerNamespacesListByResourceGroupSamples { */ public final class PartnerNamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/PartnerNamespaces_ListSharedAccessKeys.json */ /** * Sample code: PartnerNamespaces_ListSharedAccessKeys. @@ -4186,9 +3895,7 @@ import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyR */ public final class PartnerNamespacesRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/PartnerNamespaces_RegenerateKey.json */ /** * Sample code: PartnerNamespaces_RegenerateKey. @@ -4216,9 +3923,7 @@ import java.util.Map; */ public final class PartnerNamespacesUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_Update.json + * x-ms-original-file: 2026-06-15-preview/PartnerNamespaces_Update.json */ /** * Sample code: PartnerNamespaces_Update. @@ -4258,9 +3963,7 @@ import java.util.Map; */ public final class PartnerRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerRegistrations_CreateOrUpdate.json */ /** * Sample code: PartnerRegistrations_CreateOrUpdate. @@ -4300,9 +4003,7 @@ public final class PartnerRegistrationsCreateOrUpdateSamples { */ public final class PartnerRegistrationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_Delete.json + * x-ms-original-file: 2026-06-15-preview/PartnerRegistrations_Delete.json */ /** * Sample code: PartnerRegistrations_Delete. @@ -4324,9 +4025,7 @@ public final class PartnerRegistrationsDeleteSamples { */ public final class PartnerRegistrationsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_Get.json + * x-ms-original-file: 2026-06-15-preview/PartnerRegistrations_Get.json */ /** * Sample code: PartnerRegistrations_Get. @@ -4349,9 +4048,7 @@ public final class PartnerRegistrationsGetByResourceGroupSamples { */ public final class PartnerRegistrationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/PartnerRegistrations_ListBySubscription.json */ /** * Sample code: PartnerRegistrations_ListBySubscription. @@ -4373,9 +4070,7 @@ public final class PartnerRegistrationsListSamples { */ public final class PartnerRegistrationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/PartnerRegistrations_ListByResourceGroup.json */ /** * Sample code: PartnerRegistrations_ListByResourceGroup. @@ -4401,9 +4096,7 @@ import java.util.Map; */ public final class PartnerRegistrationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_Update.json + * x-ms-original-file: 2026-06-15-preview/PartnerRegistrations_Update.json */ /** * Sample code: PartnerRegistrations_Update. @@ -4444,9 +4137,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: PartnerTopicEventSubscriptions_CreateOrUpdate. @@ -4476,9 +4167,7 @@ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class PartnerTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopicEventSubscriptions_Delete.json */ /** * Sample code: PartnerTopicEventSubscriptions_Delete. @@ -4501,9 +4190,7 @@ public final class PartnerTopicEventSubscriptionsDeleteSamples { */ public final class PartnerTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopicEventSubscriptions_Get.json */ /** * Sample code: PartnerTopicEventSubscriptions_Get. @@ -4526,9 +4213,7 @@ public final class PartnerTopicEventSubscriptionsGetSamples { */ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetDeliveryAttributes. @@ -4552,9 +4237,7 @@ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetFullUrl. @@ -4578,9 +4261,7 @@ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { */ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_ListByPartnerTopic.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ /** * Sample code: PartnerTopicEventSubscriptions_ListByPartnerTopic. @@ -4608,9 +4289,7 @@ import java.util.Arrays; */ public final class PartnerTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopicEventSubscriptions_Update.json */ /** * Sample code: PartnerTopicEventSubscriptions_Update. @@ -4641,9 +4320,7 @@ public final class PartnerTopicEventSubscriptionsUpdateSamples { */ public final class PartnerTopicsActivateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Activate.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_Activate.json */ /** * Sample code: PartnerTopics_Activate. @@ -4661,16 +4338,13 @@ public final class PartnerTopicsActivateSamples { ```java import java.time.OffsetDateTime; -import java.util.UUID; /** * Samples for PartnerTopics CreateOrUpdate. */ public final class PartnerTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_CreateOrUpdate.json */ /** * Sample code: PartnerTopics_CreateOrUpdate. @@ -4682,7 +4356,7 @@ public final class PartnerTopicsCreateOrUpdateSamples { .define("examplePartnerTopicName1") .withRegion("westus2") .withExistingResourceGroup("examplerg") - .withPartnerRegistrationImmutableId(UUID.fromString("6f541064-031d-4cc8-9ec3-a3b4fc0f7185")) + .withPartnerRegistrationImmutableId("6f541064-031d-4cc8-9ec3-a3b4fc0f7185") .withSource("ContosoCorp.Accounts.User1") .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-23T23:06:13.109Z")) .withPartnerTopicFriendlyDescription("Example description") @@ -4700,9 +4374,7 @@ public final class PartnerTopicsCreateOrUpdateSamples { */ public final class PartnerTopicsDeactivateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Deactivate.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_Deactivate.json */ /** * Sample code: PartnerTopics_Deactivate. @@ -4724,9 +4396,7 @@ public final class PartnerTopicsDeactivateSamples { */ public final class PartnerTopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Delete.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_Delete.json */ /** * Sample code: PartnerTopics_Delete. @@ -4747,9 +4417,7 @@ public final class PartnerTopicsDeleteSamples { */ public final class PartnerTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Get.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_Get.json */ /** * Sample code: PartnerTopics_Get. @@ -4771,9 +4439,7 @@ public final class PartnerTopicsGetByResourceGroupSamples { */ public final class PartnerTopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_ListBySubscription.json */ /** * Sample code: PartnerTopics_ListBySubscription. @@ -4794,9 +4460,7 @@ public final class PartnerTopicsListSamples { */ public final class PartnerTopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_ListByResourceGroup.json */ /** * Sample code: PartnerTopics_ListByResourceGroup. @@ -4821,9 +4485,7 @@ import java.util.Map; */ public final class PartnerTopicsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Update.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_Update.json */ /** * Sample code: PartnerTopics_Update. @@ -4861,9 +4523,7 @@ import com.azure.resourcemanager.eventgrid.models.PermissionType; */ public final class PermissionBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PermissionBindings_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PermissionBindings_CreateOrUpdate.json */ /** * Sample code: PermissionBindings_CreateOrUpdate. @@ -4890,9 +4550,7 @@ public final class PermissionBindingsCreateOrUpdateSamples { */ public final class PermissionBindingsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PermissionBindings_Delete.json + * x-ms-original-file: 2026-06-15-preview/PermissionBindings_Delete.json */ /** * Sample code: PermissionBindings_Delete. @@ -4915,9 +4573,7 @@ public final class PermissionBindingsDeleteSamples { */ public final class PermissionBindingsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PermissionBindings_Get.json + * x-ms-original-file: 2026-06-15-preview/PermissionBindings_Get.json */ /** * Sample code: PermissionBindings_Get. @@ -4940,9 +4596,7 @@ public final class PermissionBindingsGetSamples { */ public final class PermissionBindingsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PermissionBindings_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/PermissionBindings_ListByNamespace.json */ /** * Sample code: PermissionBindings_ListByNamespace. @@ -4966,9 +4620,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateEndpointConnections_Delete.json + * x-ms-original-file: 2026-06-15-preview/PrivateEndpointConnections_Delete.json */ /** * Sample code: PrivateEndpointConnections_Delete. @@ -4993,9 +4645,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateEndpointConnections_Get.json + * x-ms-original-file: 2026-06-15-preview/PrivateEndpointConnections_Get.json */ /** * Sample code: PrivateEndpointConnections_Get. @@ -5020,9 +4670,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare */ public final class PrivateEndpointConnectionsListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateEndpointConnections_ListByResource.json + * x-ms-original-file: 2026-06-15-preview/PrivateEndpointConnections_ListByResource.json */ /** * Sample code: PrivateEndpointConnections_ListByResource. @@ -5051,9 +4699,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateEndpointConnections_Update.json + * x-ms-original-file: 2026-06-15-preview/PrivateEndpointConnections_Update.json */ /** * Sample code: PrivateEndpointConnections_Update. @@ -5081,9 +4727,7 @@ public final class PrivateEndpointConnectionsUpdateSamples { */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateLinkResources_Get.json + * x-ms-original-file: 2026-06-15-preview/PrivateLinkResources_Get.json */ /** * Sample code: PrivateLinkResources_Get. @@ -5105,9 +4749,7 @@ public final class PrivateLinkResourcesGetSamples { */ public final class PrivateLinkResourcesListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateLinkResources_ListByResource.json + * x-ms-original-file: 2026-06-15-preview/PrivateLinkResources_ListByResource.json */ /** * Sample code: PrivateLinkResources_ListByResource. @@ -5134,9 +4776,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/SystemTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: SystemTopicEventSubscriptions_CreateOrUpdate. @@ -5166,9 +4806,7 @@ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { */ public final class SystemTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/SystemTopicEventSubscriptions_Delete.json */ /** * Sample code: SystemTopicEventSubscriptions_Delete. @@ -5191,9 +4829,7 @@ public final class SystemTopicEventSubscriptionsDeleteSamples { */ public final class SystemTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/SystemTopicEventSubscriptions_Get.json */ /** * Sample code: SystemTopicEventSubscriptions_Get. @@ -5216,9 +4852,7 @@ public final class SystemTopicEventSubscriptionsGetSamples { */ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: SystemTopicEventSubscriptions_GetDeliveryAttributes. @@ -5242,9 +4876,7 @@ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/SystemTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: SystemTopicEventSubscriptions_GetFullUrl. @@ -5268,9 +4900,7 @@ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { */ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_ListBySystemTopic.json + * x-ms-original-file: 2026-06-15-preview/SystemTopicEventSubscriptions_ListBySystemTopic.json */ /** * Sample code: SystemTopicEventSubscriptions_ListBySystemTopic. @@ -5298,9 +4928,7 @@ import java.util.Arrays; */ public final class SystemTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/SystemTopicEventSubscriptions_Update.json */ /** * Sample code: SystemTopicEventSubscriptions_Update. @@ -5326,6 +4954,17 @@ public final class SystemTopicEventSubscriptionsUpdateSamples { ### SystemTopics_CreateOrUpdate ```java +import com.azure.resourcemanager.eventgrid.models.ConfidentialCompute; +import com.azure.resourcemanager.eventgrid.models.ConfidentialComputeMode; +import com.azure.resourcemanager.eventgrid.models.CustomerManagedKeyEncryption; +import com.azure.resourcemanager.eventgrid.models.IdentityInfo; +import com.azure.resourcemanager.eventgrid.models.IdentityType; +import com.azure.resourcemanager.eventgrid.models.KeyEncryption; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionIdentityType; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionKeyIdentity; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; +import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5334,9 +4973,7 @@ import java.util.Map; */ public final class SystemTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/SystemTopics_CreateOrUpdate.json */ /** * Sample code: SystemTopics_CreateOrUpdate. @@ -5346,12 +4983,24 @@ public final class SystemTopicsCreateOrUpdateSamples { public static void systemTopicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.systemTopics() .define("exampleSystemTopic1") - .withRegion("westus2") + .withRegion("centraluseuap") .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id", + new UserIdentityProperties()))) .withSource( "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") .withTopicType("microsoft.storage.storageaccounts") + .withEncryption(new KeyEncryption().withCustomerManagedKeyEncryption( + Arrays.asList(new CustomerManagedKeyEncryption().withKeyEncryptionKeyUrl("fakeTokenPlaceholder") + .withKeyEncryptionKeyIdentity(new KeyEncryptionKeyIdentity() + .withType(KeyEncryptionIdentityType.USER_ASSIGNED) + .withUserAssignedIdentityResourceId( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id"))))) + .withPlatformCapabilities(new PlatformCapabilities() + .withConfidentialCompute(new ConfidentialCompute().withMode(ConfidentialComputeMode.ENABLED))) .create(); } @@ -5377,9 +5026,7 @@ public final class SystemTopicsCreateOrUpdateSamples { */ public final class SystemTopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_Delete.json + * x-ms-original-file: 2026-06-15-preview/SystemTopics_Delete.json */ /** * Sample code: SystemTopics_Delete. @@ -5400,9 +5047,7 @@ public final class SystemTopicsDeleteSamples { */ public final class SystemTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_Get - * .json + * x-ms-original-file: 2026-06-15-preview/SystemTopics_Get.json */ /** * Sample code: SystemTopics_Get. @@ -5424,9 +5069,7 @@ public final class SystemTopicsGetByResourceGroupSamples { */ public final class SystemTopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/SystemTopics_ListBySubscription.json */ /** * Sample code: SystemTopics_ListBySubscription. @@ -5447,9 +5090,7 @@ public final class SystemTopicsListSamples { */ public final class SystemTopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/SystemTopics_ListByResourceGroup.json */ /** * Sample code: SystemTopics_ListByResourceGroup. @@ -5474,9 +5115,7 @@ import java.util.Map; */ public final class SystemTopicsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_Update.json + * x-ms-original-file: 2026-06-15-preview/SystemTopics_Update.json */ /** * Sample code: SystemTopics_Update. @@ -5516,9 +5155,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin */ public final class TopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/TopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: TopicEventSubscriptions_CreateOrUpdate. @@ -5548,9 +5185,7 @@ public final class TopicEventSubscriptionsCreateOrUpdateSamples { */ public final class TopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/TopicEventSubscriptions_Delete.json */ /** * Sample code: TopicEventSubscriptions_Delete. @@ -5572,9 +5207,7 @@ public final class TopicEventSubscriptionsDeleteSamples { */ public final class TopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/TopicEventSubscriptions_Get.json */ /** * Sample code: TopicEventSubscriptions_Get. @@ -5596,9 +5229,7 @@ public final class TopicEventSubscriptionsGetSamples { */ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/TopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: TopicEventSubscriptions_GetDeliveryAttributes. @@ -5622,9 +5253,7 @@ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { */ public final class TopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/TopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: TopicEventSubscriptions_GetFullUrl. @@ -5647,9 +5276,7 @@ public final class TopicEventSubscriptionsGetFullUrlSamples { */ public final class TopicEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_List.json + * x-ms-original-file: 2026-06-15-preview/TopicEventSubscriptions_List.json */ /** * Sample code: TopicEventSubscriptions_List. @@ -5676,9 +5303,7 @@ import java.util.Arrays; */ public final class TopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/TopicEventSubscriptions_Update.json */ /** * Sample code: TopicEventSubscriptions_Update. @@ -5710,9 +5335,7 @@ import java.util.Arrays; */ public final class TopicSpacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicSpaces_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/TopicSpaces_CreateOrUpdate.json */ /** * Sample code: TopicSpaces_CreateOrUpdate. @@ -5737,9 +5360,7 @@ public final class TopicSpacesCreateOrUpdateSamples { */ public final class TopicSpacesDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicSpaces_Delete.json + * x-ms-original-file: 2026-06-15-preview/TopicSpaces_Delete.json */ /** * Sample code: TopicSpaces_Delete. @@ -5761,9 +5382,7 @@ public final class TopicSpacesDeleteSamples { */ public final class TopicSpacesGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_Get. - * json + * x-ms-original-file: 2026-06-15-preview/TopicSpaces_Get.json */ /** * Sample code: TopicSpaces_Get. @@ -5786,9 +5405,7 @@ public final class TopicSpacesGetSamples { */ public final class TopicSpacesListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicSpaces_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/TopicSpaces_ListByNamespace.json */ /** * Sample code: TopicSpaces_ListByNamespace. @@ -5810,9 +5427,7 @@ public final class TopicSpacesListByNamespaceSamples { */ public final class TopicTypesGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_Get. - * json + * x-ms-original-file: 2026-06-15-preview/TopicTypes_Get.json */ /** * Sample code: TopicTypes_Get. @@ -5833,9 +5448,7 @@ public final class TopicTypesGetSamples { */ public final class TopicTypesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_List. - * json + * x-ms-original-file: 2026-06-15-preview/TopicTypes_List.json */ /** * Sample code: TopicTypes_List. @@ -5856,9 +5469,7 @@ public final class TopicTypesListSamples { */ public final class TopicTypesListEventTypesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicTypes_ListEventTypes.json + * x-ms-original-file: 2026-06-15-preview/TopicTypes_ListEventTypes.json */ /** * Sample code: TopicTypes_ListEventTypes. @@ -5874,12 +5485,19 @@ public final class TopicTypesListEventTypesSamples { ### Topics_CreateOrUpdate ```java +import com.azure.resourcemanager.eventgrid.models.ConfidentialCompute; +import com.azure.resourcemanager.eventgrid.models.ConfidentialComputeMode; +import com.azure.resourcemanager.eventgrid.models.CustomerManagedKeyEncryption; import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.IdentityInfo; +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.KeyEncryption; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionIdentityType; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionKeyIdentity; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; import com.azure.resourcemanager.eventgrid.models.ResourceKind; +import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5889,9 +5507,7 @@ import java.util.Map; */ public final class TopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/Topics_CreateOrUpdate.json */ /** * Sample code: Topics_CreateOrUpdate. @@ -5904,17 +5520,23 @@ public final class TopicsCreateOrUpdateSamples { .withRegion("westus2") .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("12.18.30.15").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("12.18.176.1").withAction(IpActionType.ALLOW))) + .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id", + new UserIdentityProperties()))) + .withEncryption(new KeyEncryption().withCustomerManagedKeyEncryption( + Arrays.asList(new CustomerManagedKeyEncryption().withKeyEncryptionKeyUrl("fakeTokenPlaceholder") + .withKeyEncryptionKeyIdentity(new KeyEncryptionKeyIdentity() + .withType(KeyEncryptionIdentityType.USER_ASSIGNED) + .withUserAssignedIdentityResourceId( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id"))))) + .withPlatformCapabilities(new PlatformCapabilities() + .withConfidentialCompute(new ConfidentialCompute().withMode(ConfidentialComputeMode.ENABLED))) .create(); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_CreateOrUpdateForAzureArc.json + * x-ms-original-file: 2026-06-15-preview/Topics_CreateOrUpdateForAzureArc.json */ /** * Sample code: Topics_CreateOrUpdateForAzureArc. @@ -5957,9 +5579,7 @@ public final class TopicsCreateOrUpdateSamples { */ public final class TopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Delete. - * json + * x-ms-original-file: 2026-06-15-preview/Topics_Delete.json */ /** * Sample code: Topics_Delete. @@ -5980,8 +5600,7 @@ public final class TopicsDeleteSamples { */ public final class TopicsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Get.json + * x-ms-original-file: 2026-06-15-preview/Topics_Get.json */ /** * Sample code: Topics_Get. @@ -6002,9 +5621,7 @@ public final class TopicsGetByResourceGroupSamples { */ public final class TopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/Topics_ListBySubscription.json */ /** * Sample code: Topics_ListBySubscription. @@ -6025,9 +5642,7 @@ public final class TopicsListSamples { */ public final class TopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/Topics_ListByResourceGroup.json */ /** * Sample code: Topics_ListByResourceGroup. @@ -6048,9 +5663,7 @@ public final class TopicsListByResourceGroupSamples { */ public final class TopicsListEventTypesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_ListEventTypes.json + * x-ms-original-file: 2026-06-15-preview/Topics_ListEventTypes.json */ /** * Sample code: Topics_ListEventTypes. @@ -6073,9 +5686,7 @@ public final class TopicsListEventTypesSamples { */ public final class TopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/Topics_ListSharedAccessKeys.json */ /** * Sample code: Topics_ListSharedAccessKeys. @@ -6099,9 +5710,7 @@ import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; */ public final class TopicsRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/Topics_RegenerateKey.json */ /** * Sample code: Topics_RegenerateKey. @@ -6132,9 +5741,7 @@ import java.util.Map; */ public final class TopicsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Update. - * json + * x-ms-original-file: 2026-06-15-preview/Topics_Update.json */ /** * Sample code: Topics_Update. @@ -6176,9 +5783,7 @@ public final class TopicsUpdateSamples { */ public final class VerifiedPartnersGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * VerifiedPartners_Get.json + * x-ms-original-file: 2026-06-15-preview/VerifiedPartners_Get.json */ /** * Sample code: VerifiedPartners_Get. @@ -6199,9 +5804,7 @@ public final class VerifiedPartnersGetSamples { */ public final class VerifiedPartnersListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * VerifiedPartners_List.json + * x-ms-original-file: 2026-06-15-preview/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 1c471be5055e8..a6c12dd5d4c0d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -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-2025-04-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 api-version 2026-06-15-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java index 3313a96c14cff..f1ca4edb11f16 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid; @@ -101,10 +101,16 @@ * Azure EventGrid Management Client. */ public final class EventGridManager { + private Operations operations; + private CaCertificates caCertificates; + private Namespaces namespaces; + private Channels channels; + private PartnerNamespaces partnerNamespaces; + private ClientGroups clientGroups; private Clients clients; @@ -113,32 +119,22 @@ public final class EventGridManager { private DomainTopics domainTopics; - private DomainTopicEventSubscriptions domainTopicEventSubscriptions; + private EventSubscriptions eventSubscriptions; private TopicEventSubscriptions topicEventSubscriptions; private DomainEventSubscriptions domainEventSubscriptions; - private EventSubscriptions eventSubscriptions; - private SystemTopicEventSubscriptions systemTopicEventSubscriptions; - private NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions; - private PartnerTopicEventSubscriptions partnerTopicEventSubscriptions; - private Namespaces namespaces; - private NamespaceTopics namespaceTopics; - private Operations operations; - private PartnerConfigurations partnerConfigurations; private PartnerDestinations partnerDestinations; - private PartnerNamespaces partnerNamespaces; - private PartnerRegistrations partnerRegistrations; private PartnerTopics partnerTopics; @@ -159,10 +155,14 @@ public final class EventGridManager { private TopicSpaces topicSpaces; - private TopicTypes topicTypes; - private VerifiedPartners verifiedPartners; + private DomainTopicEventSubscriptions domainTopicEventSubscriptions; + + private NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions; + + private TopicTypes topicTypes; + private final EventGridManagementClient clientObject; private EventGridManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -378,6 +378,18 @@ public EventGridManager authenticate(TokenCredential credential, AzureProfile pr } } + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * Gets the resource collection API of CaCertificates. It manages CaCertificate. * @@ -390,6 +402,18 @@ public CaCertificates caCertificates() { return caCertificates; } + /** + * Gets the resource collection API of Namespaces. It manages Namespace. + * + * @return Resource collection API of Namespaces. + */ + public Namespaces namespaces() { + if (this.namespaces == null) { + this.namespaces = new NamespacesImpl(clientObject.getNamespaces(), this); + } + return namespaces; + } + /** * Gets the resource collection API of Channels. It manages Channel. * @@ -402,6 +426,18 @@ public Channels channels() { return channels; } + /** + * Gets the resource collection API of PartnerNamespaces. It manages PartnerNamespace. + * + * @return Resource collection API of PartnerNamespaces. + */ + public PartnerNamespaces partnerNamespaces() { + if (this.partnerNamespaces == null) { + this.partnerNamespaces = new PartnerNamespacesImpl(clientObject.getPartnerNamespaces(), this); + } + return partnerNamespaces; + } + /** * Gets the resource collection API of ClientGroups. It manages ClientGroup. * @@ -451,16 +487,15 @@ public DomainTopics domainTopics() { } /** - * Gets the resource collection API of DomainTopicEventSubscriptions. + * Gets the resource collection API of EventSubscriptions. It manages EventSubscription. * - * @return Resource collection API of DomainTopicEventSubscriptions. + * @return Resource collection API of EventSubscriptions. */ - public DomainTopicEventSubscriptions domainTopicEventSubscriptions() { - if (this.domainTopicEventSubscriptions == null) { - this.domainTopicEventSubscriptions - = new DomainTopicEventSubscriptionsImpl(clientObject.getDomainTopicEventSubscriptions(), this); + public EventSubscriptions eventSubscriptions() { + if (this.eventSubscriptions == null) { + this.eventSubscriptions = new EventSubscriptionsImpl(clientObject.getEventSubscriptions(), this); } - return domainTopicEventSubscriptions; + return eventSubscriptions; } /** @@ -489,18 +524,6 @@ public DomainEventSubscriptions domainEventSubscriptions() { return domainEventSubscriptions; } - /** - * Gets the resource collection API of EventSubscriptions. It manages EventSubscription. - * - * @return Resource collection API of EventSubscriptions. - */ - public EventSubscriptions eventSubscriptions() { - if (this.eventSubscriptions == null) { - this.eventSubscriptions = new EventSubscriptionsImpl(clientObject.getEventSubscriptions(), this); - } - return eventSubscriptions; - } - /** * Gets the resource collection API of SystemTopicEventSubscriptions. * @@ -514,19 +537,6 @@ public SystemTopicEventSubscriptions systemTopicEventSubscriptions() { return systemTopicEventSubscriptions; } - /** - * Gets the resource collection API of NamespaceTopicEventSubscriptions. It manages Subscription. - * - * @return Resource collection API of NamespaceTopicEventSubscriptions. - */ - public NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions() { - if (this.namespaceTopicEventSubscriptions == null) { - this.namespaceTopicEventSubscriptions - = new NamespaceTopicEventSubscriptionsImpl(clientObject.getNamespaceTopicEventSubscriptions(), this); - } - return namespaceTopicEventSubscriptions; - } - /** * Gets the resource collection API of PartnerTopicEventSubscriptions. * @@ -540,18 +550,6 @@ public PartnerTopicEventSubscriptions partnerTopicEventSubscriptions() { return partnerTopicEventSubscriptions; } - /** - * Gets the resource collection API of Namespaces. It manages Namespace. - * - * @return Resource collection API of Namespaces. - */ - public Namespaces namespaces() { - if (this.namespaces == null) { - this.namespaces = new NamespacesImpl(clientObject.getNamespaces(), this); - } - return namespaces; - } - /** * Gets the resource collection API of NamespaceTopics. It manages NamespaceTopic. * @@ -564,18 +562,6 @@ public NamespaceTopics namespaceTopics() { return namespaceTopics; } - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** * Gets the resource collection API of PartnerConfigurations. * @@ -600,18 +586,6 @@ public PartnerDestinations partnerDestinations() { return partnerDestinations; } - /** - * Gets the resource collection API of PartnerNamespaces. It manages PartnerNamespace. - * - * @return Resource collection API of PartnerNamespaces. - */ - public PartnerNamespaces partnerNamespaces() { - if (this.partnerNamespaces == null) { - this.partnerNamespaces = new PartnerNamespacesImpl(clientObject.getPartnerNamespaces(), this); - } - return partnerNamespaces; - } - /** * Gets the resource collection API of PartnerRegistrations. It manages PartnerRegistration. * @@ -734,18 +708,6 @@ public TopicSpaces topicSpaces() { return topicSpaces; } - /** - * Gets the resource collection API of TopicTypes. - * - * @return Resource collection API of TopicTypes. - */ - public TopicTypes topicTypes() { - if (this.topicTypes == null) { - this.topicTypes = new TopicTypesImpl(clientObject.getTopicTypes(), this); - } - return topicTypes; - } - /** * Gets the resource collection API of VerifiedPartners. * @@ -758,6 +720,44 @@ public VerifiedPartners verifiedPartners() { return verifiedPartners; } + /** + * Gets the resource collection API of DomainTopicEventSubscriptions. + * + * @return Resource collection API of DomainTopicEventSubscriptions. + */ + public DomainTopicEventSubscriptions domainTopicEventSubscriptions() { + if (this.domainTopicEventSubscriptions == null) { + this.domainTopicEventSubscriptions + = new DomainTopicEventSubscriptionsImpl(clientObject.getDomainTopicEventSubscriptions(), this); + } + return domainTopicEventSubscriptions; + } + + /** + * Gets the resource collection API of NamespaceTopicEventSubscriptions. It manages Subscription. + * + * @return Resource collection API of NamespaceTopicEventSubscriptions. + */ + public NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions() { + if (this.namespaceTopicEventSubscriptions == null) { + this.namespaceTopicEventSubscriptions + = new NamespaceTopicEventSubscriptionsImpl(clientObject.getNamespaceTopicEventSubscriptions(), this); + } + return namespaceTopicEventSubscriptions; + } + + /** + * Gets the resource collection API of TopicTypes. + * + * @return Resource collection API of TopicTypes. + */ + public TopicTypes topicTypes() { + if (this.topicTypes == null) { + this.topicTypes = new TopicTypesImpl(clientObject.getTopicTypes(), this); + } + return topicTypes; + } + /** * Gets wrapped service client EventGridManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/CaCertificatesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/CaCertificatesClient.java index 3422fbc6a0c2b..4756973e376a2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/CaCertificatesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/CaCertificatesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -22,14 +22,16 @@ public interface CaCertificatesClient { * * Get properties of a CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate along with {@link Response}. + * @return a CA certificate. + * + * Get properties of a CA certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String namespaceName, @@ -40,13 +42,15 @@ Response getWithResponse(String resourceGroupName, String na * * Get properties of a CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate. + * @return a CA certificate. + * + * Get properties of a CA certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) CaCertificateInner get(String resourceGroupName, String namespaceName, String caCertificateName); @@ -56,9 +60,9 @@ Response getWithResponse(String resourceGroupName, String na * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,9 +78,9 @@ SyncPoller, CaCertificateInner> beginCreateOrUpda * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,9 +97,9 @@ SyncPoller, CaCertificateInner> beginCreateOrUpda * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -111,9 +115,9 @@ CaCertificateInner createOrUpdate(String resourceGroupName, String namespaceName * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,7 +134,7 @@ CaCertificateInner createOrUpdate(String resourceGroupName, String namespaceName * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -147,7 +151,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. @@ -165,7 +169,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,7 +184,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. @@ -196,12 +200,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List CA Certificate operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -211,7 +215,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -224,7 +228,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List CA Certificate operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java index b4588dd0ed432..d19a74af05435 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -24,14 +24,16 @@ public interface ChannelsClient { * * Get properties of a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel along with {@link Response}. + * @return a channel. + * + * Get properties of a channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, @@ -42,13 +44,15 @@ Response getWithResponse(String resourceGroupName, String partnerN * * Get properties of a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel. + * @return a channel. + * + * Get properties of a channel. */ @ServiceMethod(returns = ReturnType.SINGLE) ChannelInner get(String resourceGroupName, String partnerNamespaceName, String channelName); @@ -58,7 +62,7 @@ Response getWithResponse(String resourceGroupName, String partnerN * * Synchronously creates or updates a new channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelInfo Channel information. @@ -77,7 +81,7 @@ Response createOrUpdateWithResponse(String resourceGroupName, Stri * * Synchronously creates or updates a new channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelInfo Channel information. @@ -91,113 +95,113 @@ ChannelInner createOrUpdate(String resourceGroupName, String partnerNamespaceNam ChannelInner channelInfo); /** - * Delete a channel. + * Update a Channel. * - * Delete an existing channel. + * Synchronously updates a channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. + * @param channelUpdateParameters Channel update information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, - String channelName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, + ChannelUpdateParameters channelUpdateParameters, Context context); /** - * Delete a channel. + * Update a Channel. * - * Delete an existing channel. + * Synchronously updates a channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @param context The context to associate with this operation. + * @param channelUpdateParameters Channel update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, - String channelName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String partnerNamespaceName, String channelName, + ChannelUpdateParameters channelUpdateParameters); /** * Delete a channel. * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerNamespaceName, String channelName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, + String channelName); /** * Delete a channel. * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, + String channelName, Context context); /** - * Update a Channel. + * Delete a channel. * - * Synchronously updates a channel with the specified parameters. + * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters, Context context); + void delete(String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Update a Channel. + * Delete a channel. * - * Synchronously updates a channel with the specified parameters. + * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update(String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters); + void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** * List channels. * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -212,7 +216,7 @@ void update(String resourceGroupName, String partnerNamespaceName, String channe * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -236,14 +240,16 @@ PagedIterable listByPartnerNamespace(String resourceGroupName, Str * * Get the full endpoint URL of a partner destination channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the Channel. + * @param channelName Name of the channel. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel along with {@link Response}. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getFullUrlWithResponse(String resourceGroupName, @@ -254,13 +260,15 @@ Response getFullUrlWithResponse(String resourceGr * * Get the full endpoint URL of a partner destination channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the Channel. + * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel. */ @ServiceMethod(returns = ReturnType.SINGLE) EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerNamespaceName, String channelName); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientGroupsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientGroupsClient.java index 0020115f109eb..4525e395a3bc5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientGroupsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -22,14 +22,16 @@ public interface ClientGroupsClient { * * Get properties of a client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group along with {@link Response}. + * @return a client group. + * + * Get properties of a client group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String namespaceName, String clientGroupName, @@ -40,13 +42,15 @@ Response getWithResponse(String resourceGroupName, String name * * Get properties of a client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group. + * @return a client group. + * + * Get properties of a client group. */ @ServiceMethod(returns = ReturnType.SINGLE) ClientGroupInner get(String resourceGroupName, String namespaceName, String clientGroupName); @@ -56,9 +60,9 @@ Response getWithResponse(String resourceGroupName, String name * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,9 +78,9 @@ SyncPoller, ClientGroupInner> beginCreateOrUpdate(S * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,9 +97,9 @@ SyncPoller, ClientGroupInner> beginCreateOrUpdate(S * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -111,9 +115,9 @@ ClientGroupInner createOrUpdate(String resourceGroupName, String namespaceName, * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,7 +134,7 @@ ClientGroupInner createOrUpdate(String resourceGroupName, String namespaceName, * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -147,7 +151,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. @@ -165,7 +169,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,7 +184,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. @@ -196,12 +200,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client Group operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -211,7 +215,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -224,7 +228,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client Group operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientsClient.java index 3b23a0b766282..59fe239453e72 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -22,14 +22,16 @@ public interface ClientsClient { * * Get properties of a client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client along with {@link Response}. + * @return a client. + * + * Get properties of a client along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String namespaceName, String clientName, @@ -40,13 +42,15 @@ Response getWithResponse(String resourceGroupName, String namespace * * Get properties of a client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client. + * @return a client. + * + * Get properties of a client. */ @ServiceMethod(returns = ReturnType.SINGLE) ClientInner get(String resourceGroupName, String namespaceName, String clientName); @@ -56,9 +60,9 @@ Response getWithResponse(String resourceGroupName, String namespace * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,9 +78,9 @@ SyncPoller, ClientInner> beginCreateOrUpdate(String reso * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,9 +97,9 @@ SyncPoller, ClientInner> beginCreateOrUpdate(String reso * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -111,9 +115,9 @@ ClientInner createOrUpdate(String resourceGroupName, String namespaceName, Strin * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,7 +134,7 @@ ClientInner createOrUpdate(String resourceGroupName, String namespaceName, Strin * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,7 +150,7 @@ ClientInner createOrUpdate(String resourceGroupName, String namespaceName, Strin * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. @@ -164,7 +168,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,7 +183,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. @@ -195,12 +199,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -210,7 +214,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -223,7 +227,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java index 5acf6db8cfc7f..262669386374f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -20,54 +20,21 @@ * An instance of this class provides access to all the operations defined in DomainEventSubscriptionsClient. */ public interface DomainEventSubscriptionsClient { - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, - String eventSubscriptionName); - /** * Get an event subscription of a domain. * * Get properties of an event subscription of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a domain along with {@link Response}. + * @return an event subscription of a domain. + * + * Get properties of an event subscription of a domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String domainName, @@ -78,13 +45,15 @@ Response getWithResponse(String resourceGroupName, Strin * * Get properties of an event subscription of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a domain. + * @return an event subscription of a domain. + * + * Get properties of an event subscription of a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) EventSubscriptionInner get(String resourceGroupName, String domainName, String eventSubscriptionName); @@ -94,10 +63,9 @@ Response getWithResponse(String resourceGroupName, Strin * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -113,10 +81,9 @@ SyncPoller, EventSubscriptionInner> beginCrea * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,10 +100,9 @@ SyncPoller, EventSubscriptionInner> beginCrea * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -152,10 +118,9 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainNam * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,80 +132,14 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainNam EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, - String eventSubscriptionName); - - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, - String eventSubscriptionName, Context context); - - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String domainName, String eventSubscriptionName); - - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context); - /** * Update an event subscription for a domain. * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -257,9 +156,9 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,9 +176,9 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -295,9 +194,9 @@ EventSubscriptionInner update(String resourceGroupName, String domainName, Strin * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,45 +209,77 @@ EventSubscriptionInner update(String resourceGroupName, String domainName, Strin EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription for domain. + * Delete an event subscription for a domain. * - * Get the full endpoint URL for an event subscription for domain. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, + String eventSubscriptionName); + + /** + * Delete an event subscription for a domain. + * + * Delete an existing event subscription for a domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for domain along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse(String resourceGroupName, String domainName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Get full URL of an event subscription for domain. + * Delete an event subscription for a domain. * - * Get the full endpoint URL for an event subscription for domain. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName); + void delete(String resourceGroupName, String domainName, String eventSubscriptionName); + + /** + * Delete an event subscription for a domain. + * + * Delete an existing event subscription for a domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** * List all event subscriptions for a specific domain. * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -363,7 +294,7 @@ Response getFullUrlWithResponse(String resourceGr * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -381,4 +312,81 @@ Response getFullUrlWithResponse(String resourceGr @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String domainName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, + String eventSubscriptionName); + + /** + * Get full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFullUrlWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName, Context context); + + /** + * Get full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java index 30d395925e878..33ae86ebaeb2c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -20,49 +20,12 @@ * An instance of this class provides access to all the operations defined in DomainTopicEventSubscriptionsClient. */ public interface DomainTopicEventSubscriptionsClient { - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName); - /** * Get a nested event subscription for domain topic. * * Get properties of a nested event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription to be found. @@ -70,7 +33,9 @@ DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a nested event subscription for a domain topic along with {@link Response}. + * @return a nested event subscription for domain topic. + * + * Get properties of a nested event subscription for a domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String domainName, String topicName, @@ -81,14 +46,16 @@ Response getWithResponse(String resourceGroupName, Strin * * Get properties of a nested event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a nested event subscription for a domain topic. + * @return a nested event subscription for domain topic. + * + * Get properties of a nested event subscription for a domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) EventSubscriptionInner get(String resourceGroupName, String domainName, String topicName, @@ -99,11 +66,10 @@ EventSubscriptionInner get(String resourceGroupName, String domainName, String t * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -120,11 +86,10 @@ SyncPoller, EventSubscriptionInner> beginCrea * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,11 +107,10 @@ SyncPoller, EventSubscriptionInner> beginCrea * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -162,11 +126,10 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainNam * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,232 +142,277 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainNam String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName); + SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, Context context); + SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); + EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, + EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName); /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, Context context); /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); + void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Get full URL of a nested event subscription for domain topic. + * List all nested event subscriptions for a specific domain topic. * - * Get the full endpoint URL for a nested event subscription for domain topic. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String domainName, String topicName); + + /** + * List all nested event subscriptions for a specific domain topic. + * + * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String domainName, String topicName, + String filter, Integer top, Context context); /** - * Get full URL of a nested event subscription for domain topic. + * Get delivery attributes for an event subscription for domain topic. * - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get all delivery attributes for an event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for a nested event subscription for domain topic. + * @return delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName); + Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, Context context); /** - * List all nested event subscriptions for a specific domain topic. + * Get delivery attributes for an event subscription for domain topic. * - * List all event subscriptions that have been created for a specific domain topic. + * Get all delivery attributes for an event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String domainName, String topicName); + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName); /** - * List all nested event subscriptions for a specific domain topic. + * Get full URL of a nested event subscription for domain topic. * - * List all event subscriptions that have been created for a specific domain topic. + * Get the full endpoint URL for a nested event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String domainName, String topicName, - String filter, Integer top, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFullUrlWithResponse(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName, Context context); + + /** + * Get full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java index ee60797fb26a1..ec6c47f62167a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -22,14 +22,16 @@ public interface DomainTopicsClient { * * Get properties of a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain topic along with {@link Response}. + * @return a domain topic. + * + * Get properties of a domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String domainName, String domainTopicName, @@ -40,13 +42,15 @@ Response getWithResponse(String resourceGroupName, String doma * * Get properties of a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain topic. + * @return a domain topic. + * + * Get properties of a domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) DomainTopicInner get(String resourceGroupName, String domainName, String domainTopicName); @@ -56,9 +60,9 @@ Response getWithResponse(String resourceGroupName, String doma * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -73,9 +77,9 @@ SyncPoller, DomainTopicInner> beginCreateOrUpdate(S * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -91,9 +95,9 @@ SyncPoller, DomainTopicInner> beginCreateOrUpdate(S * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -107,9 +111,9 @@ SyncPoller, DomainTopicInner> beginCreateOrUpdate(S * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -125,9 +129,9 @@ DomainTopicInner createOrUpdate(String resourceGroupName, String domainName, Str * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -141,9 +145,9 @@ DomainTopicInner createOrUpdate(String resourceGroupName, String domainName, Str * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -159,9 +163,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -174,9 +178,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -190,8 +194,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -205,8 +209,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java index 0ebd4df482d58..8454bd2e1a403 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -25,13 +25,15 @@ public interface DomainsClient { * * Get properties of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain along with {@link Response}. + * @return a domain. + * + * Get properties of a domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context); @@ -41,12 +43,14 @@ public interface DomainsClient { * * Get properties of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain. + * @return a domain. + * + * Get properties of a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) DomainInner getByResourceGroup(String resourceGroupName, String domainName); @@ -56,7 +60,7 @@ public interface DomainsClient { * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,7 +77,7 @@ SyncPoller, DomainInner> beginCreateOrUpdate(String reso * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @param context The context to associate with this operation. @@ -91,7 +95,7 @@ SyncPoller, DomainInner> beginCreateOrUpdate(String reso * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -107,7 +111,7 @@ SyncPoller, DomainInner> beginCreateOrUpdate(String reso * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @param context The context to associate with this operation. @@ -120,27 +124,30 @@ SyncPoller, DomainInner> beginCreateOrUpdate(String reso DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo, Context context); /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String domainName); + SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters); /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -148,62 +155,65 @@ SyncPoller, DomainInner> beginCreateOrUpdate(String reso * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, Context context); + SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters, Context context); /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String domainName); + DomainInner update(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters); /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String domainName, Context context); + DomainInner update(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters, + Context context); /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String domainName); /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -211,60 +221,57 @@ SyncPoller, DomainInner> beginUpdate(String resourceGrou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, Context context); /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DomainInner update(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters); + void delete(String resourceGroupName, String domainName); /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DomainInner update(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters, - Context context); + void delete(String resourceGroupName, String domainName, Context context); /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -279,28 +286,26 @@ DomainInner update(String resourceGroupName, String domainName, DomainUpdatePara * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -315,15 +320,14 @@ DomainInner update(String resourceGroupName, String domainName, DomainUpdatePara * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * List keys for a domain. * * List the two keys used to publish to a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -340,7 +344,7 @@ Response listSharedAccessKeysWithResponse(String re * * List the two keys used to publish to a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -355,7 +359,7 @@ Response listSharedAccessKeysWithResponse(String re * * Regenerate a shared access key for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -373,7 +377,7 @@ Response regenerateKeyWithResponse(String resourceG * * Regenerate a shared access key for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java index 6c64aea9724dc..2b94d5abfe3e2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -12,27 +12,26 @@ */ public interface EventGridManagementClient { /** - * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,6 +46,13 @@ public interface EventGridManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the CaCertificatesClient object to access its operations. * @@ -54,6 +60,13 @@ public interface EventGridManagementClient { */ CaCertificatesClient getCaCertificates(); + /** + * Gets the NamespacesClient object to access its operations. + * + * @return the NamespacesClient object. + */ + NamespacesClient getNamespaces(); + /** * Gets the ChannelsClient object to access its operations. * @@ -61,6 +74,13 @@ public interface EventGridManagementClient { */ ChannelsClient getChannels(); + /** + * Gets the PartnerNamespacesClient object to access its operations. + * + * @return the PartnerNamespacesClient object. + */ + PartnerNamespacesClient getPartnerNamespaces(); + /** * Gets the ClientGroupsClient object to access its operations. * @@ -90,11 +110,11 @@ public interface EventGridManagementClient { DomainTopicsClient getDomainTopics(); /** - * Gets the DomainTopicEventSubscriptionsClient object to access its operations. + * Gets the EventSubscriptionsClient object to access its operations. * - * @return the DomainTopicEventSubscriptionsClient object. + * @return the EventSubscriptionsClient object. */ - DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions(); + EventSubscriptionsClient getEventSubscriptions(); /** * Gets the TopicEventSubscriptionsClient object to access its operations. @@ -110,13 +130,6 @@ public interface EventGridManagementClient { */ DomainEventSubscriptionsClient getDomainEventSubscriptions(); - /** - * Gets the EventSubscriptionsClient object to access its operations. - * - * @return the EventSubscriptionsClient object. - */ - EventSubscriptionsClient getEventSubscriptions(); - /** * Gets the SystemTopicEventSubscriptionsClient object to access its operations. * @@ -124,13 +137,6 @@ public interface EventGridManagementClient { */ SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions(); - /** - * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. - * - * @return the NamespaceTopicEventSubscriptionsClient object. - */ - NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions(); - /** * Gets the PartnerTopicEventSubscriptionsClient object to access its operations. * @@ -138,13 +144,6 @@ public interface EventGridManagementClient { */ PartnerTopicEventSubscriptionsClient getPartnerTopicEventSubscriptions(); - /** - * Gets the NamespacesClient object to access its operations. - * - * @return the NamespacesClient object. - */ - NamespacesClient getNamespaces(); - /** * Gets the NamespaceTopicsClient object to access its operations. * @@ -152,13 +151,6 @@ public interface EventGridManagementClient { */ NamespaceTopicsClient getNamespaceTopics(); - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the PartnerConfigurationsClient object to access its operations. * @@ -173,13 +165,6 @@ public interface EventGridManagementClient { */ PartnerDestinationsClient getPartnerDestinations(); - /** - * Gets the PartnerNamespacesClient object to access its operations. - * - * @return the PartnerNamespacesClient object. - */ - PartnerNamespacesClient getPartnerNamespaces(); - /** * Gets the PartnerRegistrationsClient object to access its operations. * @@ -251,16 +236,30 @@ public interface EventGridManagementClient { TopicSpacesClient getTopicSpaces(); /** - * Gets the TopicTypesClient object to access its operations. + * Gets the VerifiedPartnersClient object to access its operations. * - * @return the TopicTypesClient object. + * @return the VerifiedPartnersClient object. */ - TopicTypesClient getTopicTypes(); + VerifiedPartnersClient getVerifiedPartners(); /** - * Gets the VerifiedPartnersClient object to access its operations. + * Gets the DomainTopicEventSubscriptionsClient object to access its operations. * - * @return the VerifiedPartnersClient object. + * @return the DomainTopicEventSubscriptionsClient object. */ - VerifiedPartnersClient getVerifiedPartners(); + DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions(); + + /** + * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. + * + * @return the NamespaceTopicEventSubscriptionsClient object. + */ + NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions(); + + /** + * Gets the TopicTypesClient object to access its operations. + * + * @return the TopicTypesClient object. + */ + TopicTypesClient getTopicTypes(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java index 1bf427df48757..3ed035b3fec89 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -21,70 +21,98 @@ */ public interface EventSubscriptionsClient { /** - * Get delivery attributes for an event subscription. + * List all global event subscriptions under an Azure subscription and resource group. * - * Get all delivery attributes for an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse(String scope, - String eventSubscriptionName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * Get delivery attributes for an event subscription. + * List all event subscriptions for a specific domain topic. * - * Get all delivery attributes for an event subscription. + * List all event subscriptions that have been created for a specific domain topic. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDomainTopic(String resourceGroupName, String domainName, + String topicName); + + /** + * List all event subscriptions for a specific domain topic. + * + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDomainTopic(String resourceGroupName, String domainName, + String topicName, String filter, Integer top, Context context); /** * Get an event subscription. * * Get properties of an event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param scope undefined. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription along with {@link Response}. + * @return an event subscription. + * + * Get properties of an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String scope, String eventSubscriptionName, Context context); @@ -94,19 +122,14 @@ Response getDeliveryAttributesWithResponse(Str * * Get properties of an event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param scope undefined. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription. + * @return an event subscription. + * + * Get properties of an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) EventSubscriptionInner get(String scope, String eventSubscriptionName); @@ -117,16 +140,8 @@ Response getDeliveryAttributesWithResponse(Str * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified * scope. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -143,16 +158,8 @@ SyncPoller, EventSubscriptionInner> beginCrea * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified * scope. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,16 +177,8 @@ SyncPoller, EventSubscriptionInner> beginCrea * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified * scope. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -196,16 +195,8 @@ EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified * scope. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,108 +208,13 @@ EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription. - * - * Delete an existing event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName); - - /** - * Delete an event subscription. - * - * Delete an existing event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName, Context context); - - /** - * Delete an event subscription. - * - * Delete an existing event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String scope, String eventSubscriptionName); - - /** - * Delete an event subscription. - * - * Delete an existing event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String scope, String eventSubscriptionName, Context context); - /** * Update an event subscription. * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -334,15 +230,8 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -360,15 +249,8 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -384,15 +266,8 @@ EventSubscriptionInner update(String scope, String eventSubscriptionName, * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -405,50 +280,64 @@ EventSubscriptionInner update(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription. + * Delete an event subscription. * - * Get the full endpoint URL for an event subscription. + * Delete an existing event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName); + + /** + * Delete an event subscription. + * + * Delete an existing event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName, Context context); + + /** + * Delete an event subscription. + * + * Delete an existing event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse(String scope, String eventSubscriptionName, - Context context); + void delete(String scope, String eventSubscriptionName); /** - * Get full URL of an event subscription. + * Delete an event subscription. * - * Get the full endpoint URL for an event subscription. + * Delete an existing event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName); + void delete(String scope, String eventSubscriptionName, Context context); /** * Get an aggregated list of all global event subscriptions under an Azure subscription. @@ -457,7 +346,10 @@ Response getFullUrlWithResponse(String scope, Str * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -478,31 +370,41 @@ Response getFullUrlWithResponse(String scope, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Integer top, Context context); /** - * List all global event subscriptions for a topic type. + * List all event subscriptions. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions that have been created for a specific resource. * - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName); + PagedIterable listByResource(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName); /** - * List all global event subscriptions for a topic type. + * List all event subscriptions. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all event subscriptions that have been created for a specific resource. * - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -517,29 +419,101 @@ Response getFullUrlWithResponse(String scope, Str * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName, String filter, - Integer top, Context context); + PagedIterable listByResource(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName, String filter, Integer top, Context context); /** - * List all global event subscriptions under an Azure subscription and resource group. + * Get delivery attributes for an event subscription. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * Get all delivery attributes for an event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeliveryAttributesWithResponse(String scope, + String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * Get all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName); + + /** + * Get full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFullUrlWithResponse(String scope, String eventSubscriptionName, + Context context); + + /** + * Get full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName); + + /** + * List all global event subscriptions for a topic type. + * + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName); /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions for a topic type. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -554,15 +528,15 @@ PagedIterable listGlobalBySubscriptionForTopicType(Strin * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName, String filter, + Integer top, Context context); /** * List all global event subscriptions under a resource group for a topic type. * * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -578,7 +552,7 @@ PagedIterable listGlobalByResourceGroupForTopicType(Stri * * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -602,7 +576,7 @@ PagedIterable listGlobalByResourceGroupForTopicType(Stri * * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. + * @param location The location name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -616,7 +590,7 @@ PagedIterable listGlobalByResourceGroupForTopicType(Stri * * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -639,8 +613,8 @@ PagedIterable listRegionalBySubscription(String location * * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -654,8 +628,8 @@ PagedIterable listRegionalBySubscription(String location * * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -678,7 +652,7 @@ PagedIterable listRegionalByResourceGroup(String resourc * * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param location Name of the location. + * @param location The location name. * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -693,7 +667,7 @@ PagedIterable listRegionalByResourceGroup(String resourc * * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param location Name of the location. + * @param location The location name. * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -718,8 +692,8 @@ PagedIterable listRegionalBySubscriptionForTopicType(Str * List all event subscriptions from the given location under a specific Azure subscription and resource group and * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -736,8 +710,8 @@ PagedIterable listRegionalByResourceGroupForTopicType(St * List all event subscriptions from the given location under a specific Azure subscription and resource group and * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -755,90 +729,4 @@ PagedIterable listRegionalByResourceGroupForTopicType(St @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName, String location, String topicTypeName, String filter, Integer top, Context context); - - /** - * List all event subscriptions. - * - * List all event subscriptions that have been created for a specific resource. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResource(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName); - - /** - * List all event subscriptions. - * - * List all event subscriptions that have been created for a specific resource. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResource(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName, String filter, Integer top, Context context); - - /** - * List all event subscriptions for a specific domain topic. - * - * List all event subscriptions that have been created for a specific domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDomainTopic(String resourceGroupName, String domainName, - String topicName); - - /** - * List all event subscriptions for a specific domain topic. - * - * List all event subscriptions that have been created for a specific domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDomainTopic(String resourceGroupName, String domainName, - String topicName, String filter, Integer top, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java index ebf2418b955bc..d2012bdb3002c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -19,17 +19,14 @@ public interface ExtensionTopicsClient { * * Get the properties of an extension topic. * - * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, - * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an extension topic along with {@link Response}. + * @return properties of an extension topic. + * + * Get the properties of an extension topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String scope, Context context); @@ -39,16 +36,13 @@ public interface ExtensionTopicsClient { * * Get the properties of an extension topic. * - * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, - * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an extension topic. + * @return properties of an extension topic. + * + * Get the properties of an extension topic. */ @ServiceMethod(returns = ReturnType.SINGLE) ExtensionTopicInner get(String scope); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicEventSubscriptionsClient.java index bb65166c9317b..5da212ad4ae2e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicEventSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -25,7 +25,7 @@ public interface NamespaceTopicEventSubscriptionsClient { * * Get properties of an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param eventSubscriptionName Name of the event subscription to be found. @@ -33,7 +33,9 @@ public interface NamespaceTopicEventSubscriptionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic along with {@link Response}. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String namespaceName, String topicName, @@ -44,14 +46,16 @@ Response getWithResponse(String resourceGroupName, String nam * * Get properties of an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic. */ @ServiceMethod(returns = ReturnType.SINGLE) SubscriptionInner get(String resourceGroupName, String namespaceName, String topicName, @@ -63,11 +67,10 @@ SubscriptionInner get(String resourceGroupName, String namespaceName, String top * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,11 +88,10 @@ SyncPoller, SubscriptionInner> beginCreateOrUpdate * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @param context The context to associate with this operation. @@ -109,11 +111,10 @@ SyncPoller, SubscriptionInner> beginCreateOrUpdate * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,11 +132,10 @@ SubscriptionInner createOrUpdate(String resourceGroupName, String namespaceName, * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @param context The context to associate with this operation. @@ -149,162 +149,162 @@ SubscriptionInner createOrUpdate(String resourceGroupName, String namespaceName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo, Context context); /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName); + SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, + String namespaceName, String topicName, String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, Context context); + SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, + String namespaceName, String topicName, String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); + SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, - Context context); + SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, - String namespaceName, String topicName, String eventSubscriptionName, - SubscriptionUpdateParameters eventSubscriptionUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName); /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, - String namespaceName, String topicName, String eventSubscriptionName, - SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, Context context); /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters); + void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); + void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, + Context context); /** * List event subscriptions of a namespace topic. * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -321,7 +321,7 @@ PagedIterable listByNamespaceTopic(String resourceGroupName, * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -346,15 +346,17 @@ PagedIterable listByNamespaceTopic(String resourceGroupName, * * Get all delivery attributes for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic along with {@link Response}. + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDeliveryAttributesWithResponse(String resourceGroupName, @@ -365,14 +367,16 @@ Response getDeliveryAttributesWithResponse(Str * * Get all delivery attributes for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic. + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic. */ @ServiceMethod(returns = ReturnType.SINGLE) DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String namespaceName, @@ -383,15 +387,17 @@ DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, * * Get the full endpoint URL for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getFullUrlWithResponse(String resourceGroupName, String namespaceName, @@ -402,14 +408,16 @@ Response getFullUrlWithResponse(String resourceGroupNa * * Get the full endpoint URL for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic. + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic. */ @ServiceMethod(returns = ReturnType.SINGLE) SubscriptionFullUrlInner getFullUrl(String resourceGroupName, String namespaceName, String topicName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicsClient.java index 74535baeebb2e..8a9f6e2ce3c3f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -25,14 +25,16 @@ public interface NamespaceTopicsClient { * * Get properties of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic along with {@link Response}. + * @return a namespace topic. + * + * Get properties of a namespace topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String namespaceName, String topicName, @@ -43,13 +45,15 @@ Response getWithResponse(String resourceGroupName, String n * * Get properties of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic. + * @return a namespace topic. + * + * Get properties of a namespace topic. */ @ServiceMethod(returns = ReturnType.SINGLE) NamespaceTopicInner get(String resourceGroupName, String namespaceName, String topicName); @@ -59,7 +63,7 @@ Response getWithResponse(String resourceGroupName, String n * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -77,7 +81,7 @@ SyncPoller, NamespaceTopicInner> beginCreateOrUp * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -96,7 +100,7 @@ SyncPoller, NamespaceTopicInner> beginCreateOrUp * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -114,7 +118,7 @@ NamespaceTopicInner createOrUpdate(String resourceGroupName, String namespaceNam * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -129,151 +133,151 @@ NamespaceTopicInner createOrUpdate(String resourceGroupName, String namespaceNam NamespaceTopicInner namespaceTopicInfo, Context context); /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of namespace topic details. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName); + SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, + String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters); /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of namespace topic details. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, + SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, + String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, Context context); /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return namespace topic details. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String namespaceName, String topicName); + NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters); /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return namespace topic details. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String namespaceName, String topicName, Context context); + NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, Context context); /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace topic details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, - String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName); /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace topic details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, - String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, Context context); /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details. */ @ServiceMethod(returns = ReturnType.SINGLE) - NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, - NamespaceTopicUpdateParameters namespaceTopicUpdateParameters); + void delete(String resourceGroupName, String namespaceName, String topicName); /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details. */ @ServiceMethod(returns = ReturnType.SINGLE) - NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, - NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, Context context); + void delete(String resourceGroupName, String namespaceName, String topicName, Context context); /** * List namespace topics under a namespace. * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -288,7 +292,7 @@ NamespaceTopicInner update(String resourceGroupName, String namespaceName, Strin * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -312,9 +316,9 @@ PagedIterable listByNamespace(String resourceGroupName, Str * * List the two keys used to publish to a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -330,9 +334,9 @@ Response listSharedAccessKeysWithResponse(String res * * List the two keys used to publish to a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -346,9 +350,9 @@ Response listSharedAccessKeysWithResponse(String res * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -365,9 +369,9 @@ SyncPoller, TopicSharedAccessKeysInner> b * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -385,9 +389,9 @@ SyncPoller, TopicSharedAccessKeysInner> b * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -403,9 +407,9 @@ TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String namesp * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespacesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespacesClient.java index 2a3c90b42c5b8..634de3c3a11f1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespacesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -26,13 +26,15 @@ public interface NamespacesClient { * * Get properties of a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace along with {@link Response}. + * @return a namespace. + * + * Get properties of a namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, @@ -43,12 +45,14 @@ Response getByResourceGroupWithResponse(String resourceGroupName * * Get properties of a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace. + * @return a namespace. + * + * Get properties of a namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) NamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName); @@ -58,7 +62,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -75,7 +79,7 @@ SyncPoller, NamespaceInner> beginCreateOrUpdate(Strin * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @param context The context to associate with this operation. @@ -93,7 +97,7 @@ SyncPoller, NamespaceInner> beginCreateOrUpdate(Strin * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -109,7 +113,7 @@ SyncPoller, NamespaceInner> beginCreateOrUpdate(Strin * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @param context The context to associate with this operation. @@ -123,152 +127,155 @@ NamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, Na Context context); /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of namespace resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName); + SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters); /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of namespace resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, Context context); + SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, Context context); /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return namespace resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String namespaceName); + NamespaceInner update(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters); /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return namespace resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String namespaceName, Context context); + NamespaceInner update(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, Context context); /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName); /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, Context context); /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - NamespaceInner update(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters); + void delete(String resourceGroupName, String namespaceName); /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - NamespaceInner update(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters, Context context); + void delete(String resourceGroupName, String namespaceName, Context context); /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -283,28 +290,26 @@ NamespaceInner update(String resourceGroupName, String namespaceName, * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -319,15 +324,14 @@ NamespaceInner update(String resourceGroupName, String namespaceName, * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * List keys for a namespace. * * List the two keys used to publish to a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,7 +348,7 @@ Response listSharedAccessKeysWithResponse(String * * List the two keys used to publish to a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -359,8 +363,8 @@ Response listSharedAccessKeysWithResponse(String * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -376,8 +380,8 @@ SyncPoller, NamespaceSharedAccessKeys * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -395,8 +399,8 @@ SyncPoller, NamespaceSharedAccessKeys * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -412,8 +416,8 @@ NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, String na * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -430,8 +434,8 @@ NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, String na * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -446,8 +450,8 @@ NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, String na * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -463,8 +467,8 @@ NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, String na * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -479,8 +483,8 @@ CustomDomainOwnershipValidationResultInner validateCustomDomainOwnership(String * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NetworkSecurityPerimeterConfigurationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NetworkSecurityPerimeterConfigurationsClient.java index c3f2db6d09fd8..7285715d118a6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NetworkSecurityPerimeterConfigurationsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NetworkSecurityPerimeterConfigurationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -24,16 +24,18 @@ public interface NetworkSecurityPerimeterConfigurationsClient { * * Get a specific network security perimeter configuration with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response}. + * @return a specific network security perimeter configuration. + * + * Get a specific network security perimeter configuration with a topic or domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, @@ -45,30 +47,73 @@ Response getWithResponse(String reso * * Get a specific network security perimeter configuration with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain. + * @return a specific network security perimeter configuration. + * + * Get a specific network security perimeter configuration with a topic or domain. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName); + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName); + + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context); + /** * Reconcile a specific network security perimeter configuration for a given network security perimeter association. * * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,9 +132,9 @@ NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. @@ -109,9 +154,9 @@ NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,9 +175,9 @@ NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. @@ -145,41 +190,4 @@ NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName, Context context); - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName); - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java index ea64505b9fa0f..b90092e3657f3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java index 6b1ae5ac888ea..d4b038eb2d389 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -24,12 +24,14 @@ public interface PartnerConfigurationsClient { * * Get properties of a partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner configuration along with {@link Response}. + * @return a partner configuration. + * + * Get properties of a partner configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, Context context); @@ -39,11 +41,13 @@ public interface PartnerConfigurationsClient { * * Get properties of a partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner configuration. + * @return a partner configuration. + * + * Get properties of a partner configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) PartnerConfigurationInner getByResourceGroup(String resourceGroupName); @@ -53,7 +57,7 @@ public interface PartnerConfigurationsClient { * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -69,7 +73,7 @@ public interface PartnerConfigurationsClient { * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,7 +90,7 @@ SyncPoller, PartnerConfigurationInner> beg * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,7 +106,7 @@ PartnerConfigurationInner createOrUpdate(String resourceGroupName, * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,133 +119,133 @@ PartnerConfigurationInner createOrUpdate(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo, Context context); /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of partner configuration information. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName); + SyncPoller, PartnerConfigurationInner> beginUpdate(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of partner configuration information. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, Context context); + SyncPoller, PartnerConfigurationInner> beginUpdate(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context); /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName); + PartnerConfigurationInner update(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, Context context); + PartnerConfigurationInner update(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context); /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of partner configuration information. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerConfigurationInner> beginUpdate(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName); /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of partner configuration information. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerConfigurationInner> beginUpdate(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, Context context); /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerConfigurationInner update(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); + void delete(String resourceGroupName); /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerConfigurationInner update(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context); + void delete(String resourceGroupName, Context context); /** * List partner configurations under a resource group. * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -255,7 +259,7 @@ PartnerConfigurationInner update(String resourceGroupName, * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -303,7 +307,7 @@ PartnerConfigurationInner update(String resourceGroupName, * * Authorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be authorized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,7 +324,7 @@ Response authorizePartnerWithResponse(String resource * * Authorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be authorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -335,7 +339,7 @@ Response authorizePartnerWithResponse(String resource * * Unauthorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be unauthorized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -352,7 +356,7 @@ Response unauthorizePartnerWithResponse(String resour * * Unauthorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be unauthorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java index d53d678fb09a0..6aaa3c681869d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -23,13 +23,15 @@ public interface PartnerDestinationsClient { * * Get properties of a partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. + * @return a partner destination. + * + * Get properties of a partner destination along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, @@ -40,12 +42,14 @@ Response getByResourceGroupWithResponse(String resource * * Get properties of a partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination. + * @return a partner destination. + * + * Get properties of a partner destination. */ @ServiceMethod(returns = ReturnType.SINGLE) PartnerDestinationInner getByResourceGroup(String resourceGroupName, String partnerDestinationName); @@ -55,7 +59,7 @@ Response getByResourceGroupWithResponse(String resource * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +76,7 @@ SyncPoller, PartnerDestinationInner> beginCr * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @param context The context to associate with this operation. @@ -91,7 +95,7 @@ SyncPoller, PartnerDestinationInner> beginCr * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -108,7 +112,7 @@ PartnerDestinationInner createOrUpdate(String resourceGroupName, String partnerD * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @param context The context to associate with this operation. @@ -122,154 +126,157 @@ PartnerDestinationInner createOrUpdate(String resourceGroupName, String partnerD PartnerDestinationInner partnerDestination, Context context); /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName); + SyncPoller, PartnerDestinationInner> beginUpdate(String resourceGroupName, + String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters); /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName, + SyncPoller, PartnerDestinationInner> beginUpdate(String resourceGroupName, + String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context); /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerDestinationName); + PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters); /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerDestinationName, Context context); + PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context); /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerDestinationInner> beginUpdate(String resourceGroupName, - String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName); /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerDestinationInner> beginUpdate(String resourceGroupName, - String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName, Context context); /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters); + void delete(String resourceGroupName, String partnerDestinationName); /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context); + void delete(String resourceGroupName, String partnerDestinationName, Context context); /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -284,28 +291,26 @@ PartnerDestinationInner update(String resourceGroupName, String partnerDestinati * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -320,15 +325,14 @@ PartnerDestinationInner update(String resourceGroupName, String partnerDestinati * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * Activate a partner destination. * * Activate a newly created partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -345,7 +349,7 @@ Response activateWithResponse(String resourceGroupName, * * Activate a newly created partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java index 13134f3aebf65..46a55494aa467 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -25,13 +25,15 @@ public interface PartnerNamespacesClient { * * Get properties of a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace along with {@link Response}. + * @return a partner namespace. + * + * Get properties of a partner namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, @@ -42,12 +44,14 @@ Response getByResourceGroupWithResponse(String resourceGr * * Get properties of a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace. + * @return a partner namespace. + * + * Get properties of a partner namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String partnerNamespaceName); @@ -57,7 +61,7 @@ Response getByResourceGroupWithResponse(String resourceGr * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -74,7 +78,7 @@ SyncPoller, PartnerNamespaceInner> beginCreate * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @param context The context to associate with this operation. @@ -92,7 +96,7 @@ SyncPoller, PartnerNamespaceInner> beginCreate * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -109,7 +113,7 @@ PartnerNamespaceInner createOrUpdate(String resourceGroupName, String partnerNam * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @param context The context to associate with this operation. @@ -123,27 +127,30 @@ PartnerNamespaceInner createOrUpdate(String resourceGroupName, String partnerNam PartnerNamespaceInner partnerNamespaceInfo, Context context); /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName); + SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, + String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters); /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -151,63 +158,67 @@ PartnerNamespaceInner createOrUpdate(String resourceGroupName, String partnerNam * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, + SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, + String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context); /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerNamespaceName); + PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, + PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters); /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerNamespaceName, Context context); + PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, + PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context); /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, - String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName); /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -215,62 +226,58 @@ SyncPoller, PartnerNamespaceInner> beginUpdate * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, - String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, Context context); /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters); + void delete(String resourceGroupName, String partnerNamespaceName); /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context); + void delete(String resourceGroupName, String partnerNamespaceName, Context context); /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -285,28 +292,26 @@ PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceNa * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -321,15 +326,14 @@ PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceNa * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * List keys for a partner namespace. * * List the two keys used to publish to a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -346,7 +350,7 @@ Response listSharedAccessKeysWithResponse * * List the two keys used to publish to a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -361,7 +365,7 @@ Response listSharedAccessKeysWithResponse * * Regenerate a shared access key for a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -379,7 +383,7 @@ Response regenerateKeyWithResponse(String * * Regenerate a shared access key for a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java index f5f19c21e213d..557850cf1e9b0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -23,13 +23,15 @@ public interface PartnerRegistrationsClient { * * Gets a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters along with {@link Response}. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, @@ -40,12 +42,14 @@ Response getByResourceGroupWithResponse(String resourc * * Gets a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters. */ @ServiceMethod(returns = ReturnType.SINGLE) PartnerRegistrationInner getByResourceGroup(String resourceGroupName, String partnerRegistrationName); @@ -55,7 +59,7 @@ Response getByResourceGroupWithResponse(String resourc * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +76,7 @@ SyncPoller, PartnerRegistrationInner> begin * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @param context The context to associate with this operation. @@ -91,7 +95,7 @@ SyncPoller, PartnerRegistrationInner> begin * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -108,7 +112,7 @@ PartnerRegistrationInner createOrUpdate(String resourceGroupName, String partner * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @param context The context to associate with this operation. @@ -122,27 +126,30 @@ PartnerRegistrationInner createOrUpdate(String resourceGroupName, String partner PartnerRegistrationInner partnerRegistrationInfo, Context context); /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName); + SyncPoller, PartnerRegistrationInner> beginUpdate(String resourceGroupName, + String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters); /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -150,63 +157,67 @@ PartnerRegistrationInner createOrUpdate(String resourceGroupName, String partner * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName, + SyncPoller, PartnerRegistrationInner> beginUpdate(String resourceGroupName, + String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context); /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerRegistrationName); + PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters); /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerRegistrationName, Context context); + PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context); /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerRegistrationInner> beginUpdate(String resourceGroupName, - String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName); /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -214,62 +225,58 @@ SyncPoller, PartnerRegistrationInner> begin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PartnerRegistrationInner> beginUpdate(String resourceGroupName, - String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName, Context context); /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters); + void delete(String resourceGroupName, String partnerRegistrationName); /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context); + void delete(String resourceGroupName, String partnerRegistrationName, Context context); /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -284,28 +291,26 @@ PartnerRegistrationInner update(String resourceGroupName, String partnerRegistra * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -320,6 +325,5 @@ PartnerRegistrationInner update(String resourceGroupName, String partnerRegistra * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java index 01eedcc338ba0..6a718cff6f10a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -25,14 +25,16 @@ public interface PartnerTopicEventSubscriptionsClient { * * Get properties of an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a partner topic along with {@link Response}. + * @return an event subscription of a partner topic. + * + * Get properties of an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String partnerTopicName, @@ -43,13 +45,15 @@ Response getWithResponse(String resourceGroupName, Strin * * Get properties of an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a partner topic. + * @return an event subscription of a partner topic. + * + * Get properties of an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) EventSubscriptionInner get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); @@ -60,10 +64,9 @@ Response getWithResponse(String resourceGroupName, Strin * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -80,10 +83,9 @@ SyncPoller, EventSubscriptionInner> beginCrea * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -102,10 +104,9 @@ SyncPoller, EventSubscriptionInner> beginCrea * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,10 +123,9 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String partnerTo * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,80 +137,14 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String partnerTo EventSubscriptionInner createOrUpdate(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName); - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName, Context context); - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); - /** * Update event subscription of a partner topic. * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -227,9 +161,9 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -247,9 +181,9 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -265,9 +199,9 @@ EventSubscriptionInner update(String resourceGroupName, String partnerTopicName, * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -280,46 +214,77 @@ EventSubscriptionInner update(String resourceGroupName, String partnerTopicName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription of a partner topic. + * Delete an event subscription of a partner topic. * - * Get the full endpoint URL for an event subscription of a partner topic. + * Delete an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName); + + /** + * Delete an event subscription of a partner topic. + * + * Delete an existing event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a partner topic along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse(String resourceGroupName, String partnerTopicName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Get full URL of an event subscription of a partner topic. + * Delete an event subscription of a partner topic. * - * Get the full endpoint URL for an event subscription of a partner topic. + * Delete an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName); + void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); + + /** + * Delete an event subscription of a partner topic. + * + * Delete an existing event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** * List event subscriptions of a partner topic. * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -334,7 +299,7 @@ EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partne * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -353,19 +318,60 @@ EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partne PagedIterable listByPartnerTopic(String resourceGroupName, String partnerTopicName, String filter, Integer top, Context context); + /** + * Get full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFullUrlWithResponse(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName, Context context); + + /** + * Get full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName); + /** * Get delivery attributes for an event subscription of a partner topic. * * Get all delivery attributes for an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a partner topic along with {@link Response}. + * @return delivery attributes for an event subscription of a partner topic. + * + * Get all delivery attributes for an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDeliveryAttributesWithResponse(String resourceGroupName, @@ -376,13 +382,15 @@ Response getDeliveryAttributesWithResponse(Str * * Get all delivery attributes for an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a partner topic. + * @return delivery attributes for an event subscription of a partner topic. + * + * Get all delivery attributes for an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String partnerTopicName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java index 614650735fc8c..88f2b45cae0a3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -23,13 +23,15 @@ public interface PartnerTopicsClient { * * Get properties of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic along with {@link Response}. + * @return a partner topic. + * + * Get properties of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String partnerTopicName, @@ -40,12 +42,14 @@ Response getByResourceGroupWithResponse(String resourceGroupN * * Get properties of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic. + * @return a partner topic. + * + * Get properties of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) PartnerTopicInner getByResourceGroup(String resourceGroupName, String partnerTopicName); @@ -55,7 +59,7 @@ Response getByResourceGroupWithResponse(String resourceGroupN * * Asynchronously creates a new partner topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. * @param context The context to associate with this operation. @@ -73,7 +77,7 @@ Response createOrUpdateWithResponse(String resourceGroupName, * * Asynchronously creates a new partner topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,117 +90,120 @@ PartnerTopicInner createOrUpdate(String resourceGroupName, String partnerTopicNa PartnerTopicInner partnerTopicInfo); /** - * Delete a partner topic. + * Update a partner topic. * - * Delete existing partner topic. + * Asynchronously updates a partner topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. + * @param partnerTopicUpdateParameters PartnerTopic update information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String partnerTopicName, + PartnerTopicUpdateParameters partnerTopicUpdateParameters, Context context); /** - * Delete a partner topic. + * Update a partner topic. * - * Delete existing partner topic. + * Asynchronously updates a partner topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. + * @param partnerTopicUpdateParameters PartnerTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + PartnerTopicInner update(String resourceGroupName, String partnerTopicName, + PartnerTopicUpdateParameters partnerTopicUpdateParameters); /** * Delete a partner topic. * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerTopicName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName); /** * Delete a partner topic. * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String partnerTopicName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, Context context); /** - * Update a partner topic. + * Delete a partner topic. * - * Asynchronously updates a partner topic with the specified parameters. + * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String partnerTopicName, - PartnerTopicUpdateParameters partnerTopicUpdateParameters, Context context); + void delete(String resourceGroupName, String partnerTopicName); /** - * Update a partner topic. + * Delete a partner topic. * - * Asynchronously updates a partner topic with the specified parameters. + * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerTopicInner update(String resourceGroupName, String partnerTopicName, - PartnerTopicUpdateParameters partnerTopicUpdateParameters); + void delete(String resourceGroupName, String partnerTopicName, Context context); /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -211,28 +218,26 @@ PartnerTopicInner update(String resourceGroupName, String partnerTopicName, * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -247,15 +252,14 @@ PartnerTopicInner update(String resourceGroupName, String partnerTopicName, * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * Activate a partner topic. * * Activate a newly created partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -272,7 +276,7 @@ Response activateWithResponse(String resourceGroupName, Strin * * Activate a newly created partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -287,7 +291,7 @@ Response activateWithResponse(String resourceGroupName, Strin * * Deactivate specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -304,7 +308,7 @@ Response deactivateWithResponse(String resourceGroupName, Str * * Deactivate specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PermissionBindingsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PermissionBindingsClient.java index 964b47f04ba2d..12e0d462d2deb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PermissionBindingsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PermissionBindingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -22,14 +22,16 @@ public interface PermissionBindingsClient { * * Get properties of a permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding along with {@link Response}. + * @return a permission binding. + * + * Get properties of a permission binding along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String namespaceName, @@ -40,13 +42,15 @@ Response getWithResponse(String resourceGroupName, Strin * * Get properties of a permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding. + * @return a permission binding. + * + * Get properties of a permission binding. */ @ServiceMethod(returns = ReturnType.SINGLE) PermissionBindingInner get(String resourceGroupName, String namespaceName, String permissionBindingName); @@ -56,9 +60,9 @@ Response getWithResponse(String resourceGroupName, Strin * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,9 +78,9 @@ SyncPoller, PermissionBindingInner> beginCrea * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,9 +98,9 @@ SyncPoller, PermissionBindingInner> beginCrea * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,9 +116,9 @@ PermissionBindingInner createOrUpdate(String resourceGroupName, String namespace * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +135,7 @@ PermissionBindingInner createOrUpdate(String resourceGroupName, String namespace * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +152,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. @@ -166,7 +170,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,7 +185,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. @@ -197,12 +201,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Permission Binding operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -212,7 +216,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -225,7 +229,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Permission Binding operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java index 539bd7a7beb39..60dfc81712d00 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -23,18 +23,21 @@ public interface PrivateEndpointConnectionsClient { * * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along - * with {@link Response}. + * @return a specific private endpoint connection. + * + * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, @@ -46,16 +49,19 @@ Response getWithResponse(String resourceGroupNam * * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace. + * @return a specific private endpoint connection. + * + * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionInner get(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, @@ -66,17 +72,19 @@ PrivateEndpointConnectionInner get(String resourceGroupName, PrivateEndpointConn * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -88,18 +96,20 @@ SyncPoller, PrivateEndpointConnection * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -112,17 +122,18 @@ SyncPoller, PrivateEndpointConnection * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionInner update(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, @@ -134,18 +145,19 @@ PrivateEndpointConnectionInner update(String resourceGroupName, PrivateEndpointC * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionInner update(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, @@ -157,12 +169,13 @@ PrivateEndpointConnectionInner update(String resourceGroupName, PrivateEndpointC * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -177,12 +190,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -199,12 +213,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -218,12 +233,13 @@ void delete(String resourceGroupName, PrivateEndpointConnectionsParentType paren * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -238,16 +254,16 @@ void delete(String resourceGroupName, PrivateEndpointConnectionsParentType paren * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated - * response with {@link PagedIterable}. + * @return result of the list of all private endpoint connections operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResource(String resourceGroupName, @@ -258,9 +274,9 @@ PagedIterable listByResource(String resourceGrou * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -274,8 +290,8 @@ PagedIterable listByResource(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated - * response with {@link PagedIterable}. + * @return result of the list of all private endpoint connections operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResource(String resourceGroupName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java index 4bd611196b7eb..ce634eb8ea5bf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -20,9 +20,9 @@ public interface PrivateLinkResourcesClient { * * Get properties of a private link resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace @@ -31,7 +31,9 @@ public interface PrivateLinkResourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a private link resource along with {@link Response}. + * @return a private link resource. + * + * Get properties of a private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String parentType, String parentName, @@ -42,9 +44,9 @@ Response getWithResponse(String resourceGroupName, Str * * Get properties of a private link resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace @@ -52,7 +54,9 @@ Response getWithResponse(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a private link resource. + * @return a private link resource. + * + * Get properties of a private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateLinkResourceInner get(String resourceGroupName, String parentType, String parentName, @@ -63,11 +67,11 @@ PrivateLinkResourceInner get(String resourceGroupName, String parentType, String * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -82,11 +86,11 @@ PagedIterable listByResource(String resourceGroupName, * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java index a7ca8e1f09f82..e88ecfac8aaa2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -20,54 +20,21 @@ * An instance of this class provides access to all the operations defined in SystemTopicEventSubscriptionsClient. */ public interface SystemTopicEventSubscriptionsClient { - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, - String eventSubscriptionName); - /** * Get an event subscription of a system topic. * * Get an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription along with {@link Response}. + * @return an event subscription of a system topic. + * + * Get an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String systemTopicName, @@ -78,13 +45,15 @@ Response getWithResponse(String resourceGroupName, Strin * * Get an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription. + * @return an event subscription of a system topic. + * + * Get an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) EventSubscriptionInner get(String resourceGroupName, String systemTopicName, String eventSubscriptionName); @@ -95,10 +64,9 @@ Response getWithResponse(String resourceGroupName, Strin * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -115,10 +83,9 @@ SyncPoller, EventSubscriptionInner> beginCrea * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,10 +104,9 @@ SyncPoller, EventSubscriptionInner> beginCrea * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -157,10 +123,9 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String systemTop * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,80 +137,14 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String systemTop EventSubscriptionInner createOrUpdate(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, - String eventSubscriptionName); - - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, Context context); - - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName); - - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); - /** * Update event subscription of a system topic. * * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -262,9 +161,9 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -282,9 +181,9 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -300,9 +199,9 @@ EventSubscriptionInner update(String resourceGroupName, String systemTopicName, * * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,46 +214,77 @@ EventSubscriptionInner update(String resourceGroupName, String systemTopicName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Get the full endpoint URL for an event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, + String eventSubscriptionName); + + /** + * Delete an event subscription of a system topic. + * + * Delete an existing event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a system topic along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse(String resourceGroupName, String systemTopicName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Get full URL of an event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Get the full endpoint URL for an event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a system topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String systemTopicName, - String eventSubscriptionName); + void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName); + + /** + * Delete an event subscription of a system topic. + * + * Delete an existing event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** * List event subscriptions of a system topic. * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -369,7 +299,7 @@ EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String system * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -387,4 +317,82 @@ EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String system @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeliveryAttributesWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, + String eventSubscriptionName); + + /** + * Get full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFullUrlWithResponse(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, Context context); + + /** + * Get full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String systemTopicName, + String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java index 375cd51043224..3a102aace8e93 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -23,13 +23,15 @@ public interface SystemTopicsClient { * * Get properties of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic along with {@link Response}. + * @return a system topic. + * + * Get properties of a system topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String systemTopicName, @@ -40,12 +42,14 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * * Get properties of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic. + * @return a system topic. + * + * Get properties of a system topic. */ @ServiceMethod(returns = ReturnType.SINGLE) SystemTopicInner getByResourceGroup(String resourceGroupName, String systemTopicName); @@ -55,7 +59,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +76,7 @@ SyncPoller, SystemTopicInner> beginCreateOrUpdate(S * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @param context The context to associate with this operation. @@ -90,7 +94,7 @@ SyncPoller, SystemTopicInner> beginCreateOrUpdate(S * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -106,7 +110,7 @@ SyncPoller, SystemTopicInner> beginCreateOrUpdate(S * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @param context The context to associate with this operation. @@ -120,152 +124,155 @@ SystemTopicInner createOrUpdate(String resourceGroupName, String systemTopicName Context context); /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName); + SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, + String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters); /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, Context context); + SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, + String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters, Context context); /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String systemTopicName); + SystemTopicInner update(String resourceGroupName, String systemTopicName, + SystemTopicUpdateParameters systemTopicUpdateParameters); /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String systemTopicName, Context context); + SystemTopicInner update(String resourceGroupName, String systemTopicName, + SystemTopicUpdateParameters systemTopicUpdateParameters, Context context); /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid System Topic. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, - String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName); /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid System Topic. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, - String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, Context context); /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - SystemTopicInner update(String resourceGroupName, String systemTopicName, - SystemTopicUpdateParameters systemTopicUpdateParameters); + void delete(String resourceGroupName, String systemTopicName); /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - SystemTopicInner update(String resourceGroupName, String systemTopicName, - SystemTopicUpdateParameters systemTopicUpdateParameters, Context context); + void delete(String resourceGroupName, String systemTopicName, Context context); /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -280,28 +287,26 @@ SystemTopicInner update(String resourceGroupName, String systemTopicName, * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -316,6 +321,5 @@ SystemTopicInner update(String resourceGroupName, String systemTopicName, * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java index 0c8a51d07300f..05cea46c1f0b6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -20,54 +20,21 @@ * An instance of this class provides access to all the operations defined in TopicEventSubscriptionsClient. */ public interface TopicEventSubscriptionsClient { - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse(String resourceGroupName, - String topicName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String topicName, - String eventSubscriptionName); - /** * Get an event subscription of a topic. * * Get properties of an event subscription of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a topic along with {@link Response}. + * @return an event subscription of a topic. + * + * Get properties of an event subscription of a topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String topicName, @@ -78,13 +45,15 @@ Response getWithResponse(String resourceGroupName, Strin * * Get properties of an event subscription of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a topic. + * @return an event subscription of a topic. + * + * Get properties of an event subscription of a topic. */ @ServiceMethod(returns = ReturnType.SINGLE) EventSubscriptionInner get(String resourceGroupName, String topicName, String eventSubscriptionName); @@ -94,10 +63,9 @@ Response getWithResponse(String resourceGroupName, Strin * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -113,10 +81,9 @@ SyncPoller, EventSubscriptionInner> beginCrea * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,10 +100,9 @@ SyncPoller, EventSubscriptionInner> beginCrea * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -152,10 +118,9 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String topicName * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,80 +132,14 @@ EventSubscriptionInner createOrUpdate(String resourceGroupName, String topicName EventSubscriptionInner createOrUpdate(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, - String eventSubscriptionName); - - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, - String eventSubscriptionName, Context context); - - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String topicName, String eventSubscriptionName); - - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context); - /** * Update an event subscription for a topic. * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -257,9 +156,9 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,9 +176,9 @@ SyncPoller, EventSubscriptionInner> beginUpda * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -295,9 +194,9 @@ EventSubscriptionInner update(String resourceGroupName, String topicName, String * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,45 +209,77 @@ EventSubscriptionInner update(String resourceGroupName, String topicName, String EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription for topic. + * Delete an event subscription for a topic. * - * Get the full endpoint URL for an event subscription for topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, + String eventSubscriptionName); + + /** + * Delete an event subscription for a topic. + * + * Delete an existing event subscription for a topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for topic along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse(String resourceGroupName, String topicName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * Get full URL of an event subscription for topic. + * Delete an event subscription for a topic. * - * Get the full endpoint URL for an event subscription for topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName); + void delete(String resourceGroupName, String topicName, String eventSubscriptionName); + + /** + * Delete an event subscription for a topic. + * + * Delete an existing event subscription for a topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** * List all event subscriptions for a specific topic. * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -363,7 +294,7 @@ Response getFullUrlWithResponse(String resourceGr * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -381,4 +312,81 @@ Response getFullUrlWithResponse(String resourceGr @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String topicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeliveryAttributesWithResponse(String resourceGroupName, + String topicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String topicName, + String eventSubscriptionName); + + /** + * Get full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFullUrlWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName, Context context); + + /** + * Get full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicSpacesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicSpacesClient.java index 07bbe795b7897..1b8e049717715 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicSpacesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicSpacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -22,14 +22,16 @@ public interface TopicSpacesClient { * * Get properties of a topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space along with {@link Response}. + * @return a topic space. + * + * Get properties of a topic space along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName, @@ -40,13 +42,15 @@ Response getWithResponse(String resourceGroupName, String names * * Get properties of a topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space. + * @return a topic space. + * + * Get properties of a topic space. */ @ServiceMethod(returns = ReturnType.SINGLE) TopicSpaceInner get(String resourceGroupName, String namespaceName, String topicSpaceName); @@ -56,9 +60,9 @@ Response getWithResponse(String resourceGroupName, String names * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,9 +78,9 @@ SyncPoller, TopicSpaceInner> beginCreateOrUpdate(Str * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,9 +97,9 @@ SyncPoller, TopicSpaceInner> beginCreateOrUpdate(Str * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -111,9 +115,9 @@ TopicSpaceInner createOrUpdate(String resourceGroupName, String namespaceName, S * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,7 +134,7 @@ TopicSpaceInner createOrUpdate(String resourceGroupName, String namespaceName, S * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -147,7 +151,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. @@ -165,7 +169,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,7 +184,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. @@ -196,12 +200,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Topic Space operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -211,7 +215,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -224,7 +228,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Topic Space operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java index c62abd8164d3c..275fb51375bee 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -17,59 +17,63 @@ */ public interface TopicTypesClient { /** - * List topic types. + * Get a topic type. * - * List all registered topic types. + * Get information about a topic type. * + * @param topicTypeName Name of the topic type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. + * @return a topic type. + * + * Get information about a topic type along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String topicTypeName, Context context); /** - * List topic types. + * Get a topic type. * - * List all registered topic types. + * Get information about a topic type. * - * @param context The context to associate with this operation. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. + * @return a topic type. + * + * Get information about a topic type. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + TopicTypeInfoInner get(String topicTypeName); /** - * Get a topic type. + * List topic types. * - * Get information about a topic type. + * List all registered topic types. * - * @param topicTypeName Name of the topic type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a topic type along with {@link Response}. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String topicTypeName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Get a topic type. + * List topic types. * - * Get information about a topic type. + * List all registered topic types. * - * @param topicTypeName Name of the topic type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a topic type. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - TopicTypeInfoInner get(String topicTypeName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** * List event types. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java index 9c2465185a9de..1ca443c04101c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -26,13 +26,15 @@ public interface TopicsClient { * * Get properties of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic along with {@link Response}. + * @return a topic. + * + * Get properties of a topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context); @@ -42,12 +44,14 @@ public interface TopicsClient { * * Get properties of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic. + * @return a topic. + * + * Get properties of a topic. */ @ServiceMethod(returns = ReturnType.SINGLE) TopicInner getByResourceGroup(String resourceGroupName, String topicName); @@ -57,7 +61,7 @@ public interface TopicsClient { * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -74,7 +78,7 @@ SyncPoller, TopicInner> beginCreateOrUpdate(String resour * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @param context The context to associate with this operation. @@ -92,7 +96,7 @@ SyncPoller, TopicInner> beginCreateOrUpdate(String resour * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -108,7 +112,7 @@ SyncPoller, TopicInner> beginCreateOrUpdate(String resour * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @param context The context to associate with this operation. @@ -121,27 +125,30 @@ SyncPoller, TopicInner> beginCreateOrUpdate(String resour TopicInner createOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo, Context context); /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String topicName); + SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters); /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -149,62 +156,65 @@ SyncPoller, TopicInner> beginCreateOrUpdate(String resour * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, Context context); + SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters, Context context); /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String topicName); + TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters); /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String topicName, Context context); + TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, + Context context); /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String topicName); /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -212,60 +222,57 @@ SyncPoller, TopicInner> beginUpdate(String resourceGroupN * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, Context context); /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters); + void delete(String resourceGroupName, String topicName); /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, - Context context); + void delete(String resourceGroupName, String topicName, Context context); /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -280,28 +287,26 @@ TopicInner update(String resourceGroupName, String topicName, TopicUpdateParamet * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -316,15 +321,14 @@ TopicInner update(String resourceGroupName, String topicName, TopicUpdateParamet * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * List keys for a topic. * * List the two keys used to publish to a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -341,7 +345,7 @@ Response listSharedAccessKeysWithResponse(String res * * List the two keys used to publish to a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -356,7 +360,7 @@ Response listSharedAccessKeysWithResponse(String res * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -373,7 +377,7 @@ Response listSharedAccessKeysWithResponse(String res * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -391,7 +395,7 @@ SyncPoller, TopicSharedAccessKeysInner> b * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -408,7 +412,7 @@ TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String topicN * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -426,8 +430,8 @@ TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String topicN * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -444,8 +448,8 @@ PagedIterable listEventTypes(String resourceGroupName, String pr * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java index 0258542160ec9..ff3e890b36c11 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent; @@ -25,7 +25,9 @@ public interface VerifiedPartnersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a verified partner along with {@link Response}. + * @return a verified partner. + * + * Get properties of a verified partner along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String verifiedPartnerName, Context context); @@ -39,7 +41,9 @@ public interface VerifiedPartnersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a verified partner. + * @return a verified partner. + * + * Get properties of a verified partner. */ @ServiceMethod(returns = ReturnType.SINGLE) VerifiedPartnerInner get(String verifiedPartnerName); @@ -51,7 +55,7 @@ public interface VerifiedPartnersClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners as paginated response with {@link PagedIterable}. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -72,7 +76,7 @@ public interface VerifiedPartnersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners as paginated response with {@link PagedIterable}. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Integer top, Context context); 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 6f8db1337325c..cc1278e4f3c31 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -81,14 +81,6 @@ public String azureActiveDirectoryApplicationIdOrUri() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 febd9779cd748..a9275e2f2f3b4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -129,17 +129,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deliveryAttributeMappings() != null) { - deliveryAttributeMappings().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 b8b449ecfdc86..64d3d1c7a0050 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -25,7 +25,7 @@ public final class CaCertificateInner extends ProxyResource { private CaCertificateProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -60,7 +60,7 @@ private CaCertificateProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -171,17 +171,6 @@ public CaCertificateProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 2c81bc1423a01..584d0c9470aad 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -117,14 +117,6 @@ public CaCertificateProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 a3e319eafce2e..a0395ccb2c99a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -29,7 +29,7 @@ public final class ChannelInner extends ProxyResource { private ChannelProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -64,7 +64,7 @@ private ChannelProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -273,17 +273,6 @@ public ChannelInner withExpirationTimeIfNotActivatedUtc(OffsetDateTime expiratio return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 3260f46876d3a..25539345f8b9f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -218,20 +218,6 @@ public ChannelProperties withExpirationTimeIfNotActivatedUtc(OffsetDateTime expi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (partnerTopicInfo() != null) { - partnerTopicInfo().validate(); - } - if (partnerDestinationInfo() != null) { - partnerDestinationInfo().validate(); - } - } - /** * {@inheritDoc} */ 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 3b090b6fcd07a..f28b4c823e198 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -114,20 +114,6 @@ public ChannelUpdateParametersProperties withPartnerTopicInfo(PartnerUpdateTopic return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (partnerDestinationInfo() != null) { - partnerDestinationInfo().validate(); - } - if (partnerTopicInfo() != null) { - partnerTopicInfo().validate(); - } - } - /** * {@inheritDoc} */ 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 8df3ba013b331..02b4f1c842ac8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -24,7 +24,7 @@ public final class ClientGroupInner extends ProxyResource { private ClientGroupProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -59,7 +59,7 @@ private ClientGroupProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -154,17 +154,6 @@ public ClientGroupProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 51ffba927019f..6ef4f9142aa56 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -90,14 +90,6 @@ public ClientGroupProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 ba0c340429351..9e7194a4cf363 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -27,7 +27,7 @@ public final class ClientInner extends ProxyResource { private ClientProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -62,7 +62,7 @@ private ClientProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -231,17 +231,6 @@ public ClientProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 0b46280361fa0..177efb9510e4f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -174,17 +174,6 @@ public ClientProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clientCertificateAuthentication() != null) { - clientCertificateAuthentication().validate(); - } - } - /** * {@inheritDoc} */ 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 410ab9de52982..ec3c080d0d90d 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Namespace custom domain ownership validation result. */ -@Fluent +@Immutable public final class CustomDomainOwnershipValidationResultInner implements JsonSerializable { /* @@ -32,7 +32,7 @@ public final class CustomDomainOwnershipValidationResultInner /** * Creates an instance of CustomDomainOwnershipValidationResultInner class. */ - public CustomDomainOwnershipValidationResultInner() { + private CustomDomainOwnershipValidationResultInner() { } /** @@ -45,19 +45,6 @@ public List customDomainsForTopicsConfiguration() { return this.customDomainsForTopicsConfiguration; } - /** - * Set the customDomainsForTopicsConfiguration property: List of custom domain configurations for the namespace - * under topics configuration. - * - * @param customDomainsForTopicsConfiguration the customDomainsForTopicsConfiguration value to set. - * @return the CustomDomainOwnershipValidationResultInner object itself. - */ - public CustomDomainOwnershipValidationResultInner - withCustomDomainsForTopicsConfiguration(List customDomainsForTopicsConfiguration) { - this.customDomainsForTopicsConfiguration = customDomainsForTopicsConfiguration; - return this; - } - /** * Get the customDomainsForTopicSpacesConfiguration property: List of custom domain configurations for the namespace * under topic spaces configuration. @@ -68,33 +55,6 @@ public List customDomainsForTopicSpacesConfiguration( return this.customDomainsForTopicSpacesConfiguration; } - /** - * Set the customDomainsForTopicSpacesConfiguration property: List of custom domain configurations for the namespace - * under topic spaces configuration. - * - * @param customDomainsForTopicSpacesConfiguration the customDomainsForTopicSpacesConfiguration value to set. - * @return the CustomDomainOwnershipValidationResultInner object itself. - */ - public CustomDomainOwnershipValidationResultInner withCustomDomainsForTopicSpacesConfiguration( - List customDomainsForTopicSpacesConfiguration) { - this.customDomainsForTopicSpacesConfiguration = customDomainsForTopicSpacesConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDomainsForTopicsConfiguration() != null) { - customDomainsForTopicsConfiguration().forEach(e -> e.validate()); - } - if (customDomainsForTopicSpacesConfiguration() != null) { - customDomainsForTopicSpacesConfiguration().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 697d57df9b6e3..77d02a7b9b2dc 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Result of the Get delivery attributes operation. */ -@Fluent +@Immutable public final class DeliveryAttributeListResultInner implements JsonSerializable { /* * A collection of DeliveryAttributeMapping @@ -26,7 +26,7 @@ public final class DeliveryAttributeListResultInner implements JsonSerializable< /** * Creates an instance of DeliveryAttributeListResultInner class. */ - public DeliveryAttributeListResultInner() { + private DeliveryAttributeListResultInner() { } /** @@ -38,28 +38,6 @@ public List value() { return this.value; } - /** - * Set the value property: A collection of DeliveryAttributeMapping. - * - * @param value the value value to set. - * @return the DeliveryAttributeListResultInner object itself. - */ - public DeliveryAttributeListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 0f9f605c571fa..92920b539d2de 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -45,7 +45,7 @@ public final class DomainInner extends Resource { private IdentityInfo identity; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -120,7 +120,7 @@ public DomainInner withIdentity(IdentityInfo identity) { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -512,23 +512,6 @@ public DomainInner withDataResidencyBoundary(DataResidencyBoundary dataResidency return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ 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 3ed5163185db5..496de119cfc75 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -437,26 +437,6 @@ public DomainProperties withDataResidencyBoundary(DataResidencyBoundary dataResi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (eventTypeInfo() != null) { - eventTypeInfo().validate(); - } - if (inputSchemaMapping() != null) { - inputSchemaMapping().validate(); - } - if (inboundIpRules() != null) { - inboundIpRules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 7e1daa31d8257..27dd657891cf2 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Shared access keys of the Domain. */ -@Fluent +@Immutable public final class DomainSharedAccessKeysInner implements JsonSerializable { /* * Shared access key1 for the domain. @@ -29,7 +29,7 @@ public final class DomainSharedAccessKeysInner implements JsonSerializable e.validate()); - } - if (eventTypeInfo() != null) { - eventTypeInfo().validate(); - } - } - /** * {@inheritDoc} */ 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 cd82a209c83d1..718628cc9d17d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -48,14 +48,6 @@ public DynamicDeliveryAttributeMappingProperties withSourceField(String sourceFi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 3e85fad351384..f231c28e9fa11 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -78,17 +78,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deliveryAttributeMappings() != null) { - deliveryAttributeMappings().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 9a748ceaf99f0..f6e3af9bcdb87 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Full endpoint URL of an event subscription. */ -@Fluent +@Immutable public final class EventSubscriptionFullUrlInner implements JsonSerializable { /* * The URL that represents the endpoint of the destination of an event subscription. @@ -24,7 +24,7 @@ public final class EventSubscriptionFullUrlInner implements JsonSerializable { /* * Display name of the event type. @@ -39,7 +39,7 @@ public final class EventTypeProperties implements JsonSerializable { /* * Description of the extension topic. @@ -29,7 +29,7 @@ public final class ExtensionTopicProperties implements JsonSerializable deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deliveryAttributeMappings() != null) { - deliveryAttributeMappings().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 4713e909cbe68..2216ed4c60330 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -175,32 +175,6 @@ public JsonInputSchemaMappingProperties withDataVersion(JsonFieldWithDefault dat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() != null) { - id().validate(); - } - if (topic() != null) { - topic().validate(); - } - if (eventTime() != null) { - eventTime().validate(); - } - if (eventType() != null) { - eventType().validate(); - } - if (subject() != null) { - subject().validate(); - } - if (dataVersion() != null) { - dataVersion().validate(); - } - } - /** * {@inheritDoc} */ 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 60d6e771a7aef..7540dc39fe039 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -116,14 +116,6 @@ public MonitorAlertEventSubscriptionDestinationProperties withActionGroups(List< return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 f5d936405af99..44b1e98eecc6a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -10,8 +10,10 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.eventgrid.models.AutoScaleConfiguration; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.IpAddressType; import com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.NamespaceSku; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; @@ -43,7 +45,7 @@ public final class NamespaceInner extends Resource { private IdentityInfo identity; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -118,7 +120,7 @@ public NamespaceInner withIdentity(IdentityInfo identity) { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -344,7 +346,8 @@ public NamespaceInner withInboundIpRules(List inboundIpRules) { /** * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this - * namespace. Only TLS version 1.2 is supported. + * namespace. The TlsVersion values are shared with topics and domains; for namespaces, only TLS version 1.2 is + * currently supported. * * @return the minimumTlsVersionAllowed value. */ @@ -354,7 +357,8 @@ public TlsVersion minimumTlsVersionAllowed() { /** * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this - * namespace. Only TLS version 1.2 is supported. + * namespace. The TlsVersion values are shared with topics and domains; for namespaces, only TLS version 1.2 is + * currently supported. * * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. * @return the NamespaceInner object itself. @@ -368,20 +372,49 @@ public NamespaceInner withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionA } /** - * Validates the instance. + * Get the ipAddressType property: IP address type for the namespace resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the ipAddressType value. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (sku() != null) { - sku().validate(); + public IpAddressType ipAddressType() { + return this.innerProperties() == null ? null : this.innerProperties().ipAddressType(); + } + + /** + * Set the ipAddressType property: IP address type for the namespace resource. + * + * @param ipAddressType the ipAddressType value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withIpAddressType(IpAddressType ipAddressType) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); } - if (identity() != null) { - identity().validate(); + this.innerProperties().withIpAddressType(ipAddressType); + return this; + } + + /** + * Get the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @return the autoScaleConfiguration value. + */ + public AutoScaleConfiguration autoScaleConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().autoScaleConfiguration(); + } + + /** + * Set the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @param autoScaleConfiguration the autoScaleConfiguration value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withAutoScaleConfiguration(AutoScaleConfiguration autoScaleConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); } + this.innerProperties().withAutoScaleConfiguration(autoScaleConfiguration); + return this; } /** 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 c10d12647a558..c931d902e7306 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -9,7 +9,9 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.eventgrid.models.AutoScaleConfiguration; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.IpAddressType; import com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.TlsVersion; @@ -67,10 +69,21 @@ public final class NamespaceProperties implements JsonSerializable inboundIpRules; /* - * Minimum TLS version of the publisher allowed to publish to this namespace. Only TLS version 1.2 is supported. + * Minimum TLS version of the publisher allowed to publish to this namespace. The TlsVersion values are shared with + * topics and domains; for namespaces, only TLS version 1.2 is currently supported. */ private TlsVersion minimumTlsVersionAllowed; + /* + * IP address type for the namespace resource. + */ + private IpAddressType ipAddressType; + + /* + * Auto-scale configuration for the namespace resource + */ + private AutoScaleConfiguration autoScaleConfiguration; + /** * Creates an instance of NamespaceProperties class. */ @@ -229,7 +242,8 @@ public NamespaceProperties withInboundIpRules(List inboundIpRules /** * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this - * namespace. Only TLS version 1.2 is supported. + * namespace. The TlsVersion values are shared with topics and domains; for namespaces, only TLS version 1.2 is + * currently supported. * * @return the minimumTlsVersionAllowed value. */ @@ -239,7 +253,8 @@ public TlsVersion minimumTlsVersionAllowed() { /** * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this - * namespace. Only TLS version 1.2 is supported. + * namespace. The TlsVersion values are shared with topics and domains; for namespaces, only TLS version 1.2 is + * currently supported. * * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. * @return the NamespaceProperties object itself. @@ -250,23 +265,43 @@ public NamespaceProperties withMinimumTlsVersionAllowed(TlsVersion minimumTlsVer } /** - * Validates the instance. + * Get the ipAddressType property: IP address type for the namespace resource. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: IP address type for the namespace resource. + * + * @param ipAddressType the ipAddressType value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (topicsConfiguration() != null) { - topicsConfiguration().validate(); - } - if (topicSpacesConfiguration() != null) { - topicSpacesConfiguration().validate(); - } - if (inboundIpRules() != null) { - inboundIpRules().forEach(e -> e.validate()); - } + * @return the autoScaleConfiguration value. + */ + public AutoScaleConfiguration autoScaleConfiguration() { + return this.autoScaleConfiguration; + } + + /** + * Set the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @param autoScaleConfiguration the autoScaleConfiguration value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withAutoScaleConfiguration(AutoScaleConfiguration autoScaleConfiguration) { + this.autoScaleConfiguration = autoScaleConfiguration; + return this; } /** @@ -286,6 +321,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("minimumTlsVersionAllowed", this.minimumTlsVersionAllowed == null ? null : this.minimumTlsVersionAllowed.toString()); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeJsonField("autoScaleConfiguration", this.autoScaleConfiguration); return jsonWriter.writeEndObject(); } @@ -327,6 +364,10 @@ public static NamespaceProperties fromJson(JsonReader jsonReader) throws IOExcep } else if ("minimumTlsVersionAllowed".equals(fieldName)) { deserializedNamespaceProperties.minimumTlsVersionAllowed = TlsVersion.fromString(reader.getString()); + } else if ("ipAddressType".equals(fieldName)) { + deserializedNamespaceProperties.ipAddressType = IpAddressType.fromString(reader.getString()); + } else if ("autoScaleConfiguration".equals(fieldName)) { + deserializedNamespaceProperties.autoScaleConfiguration = AutoScaleConfiguration.fromJson(reader); } else { reader.skipChildren(); } 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 b2ebff88181cd..e5966b50067aa 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Shared access keys of the Namespace. */ -@Fluent +@Immutable public final class NamespaceSharedAccessKeysInner implements JsonSerializable { /* * Shared access key1 for the namespace. @@ -29,7 +29,7 @@ public final class NamespaceSharedAccessKeysInner implements JsonSerializable inboundIpRules; + /* + * IP address type for the namespace resource. + */ + private IpAddressType ipAddressType; + + /* + * Auto-scale configuration for the namespace resource + */ + private UpdateAutoScaleConfiguration autoScaleConfiguration; + /** * Creates an instance of NamespaceUpdateParameterProperties class. */ @@ -144,20 +156,44 @@ public NamespaceUpdateParameterProperties withInboundIpRules(List } /** - * Validates the instance. + * Get the ipAddressType property: IP address type for the namespace resource. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: IP address type for the namespace resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (topicSpacesConfiguration() != null) { - topicSpacesConfiguration().validate(); - } - if (topicsConfiguration() != null) { - topicsConfiguration().validate(); - } - if (inboundIpRules() != null) { - inboundIpRules().forEach(e -> e.validate()); - } + * @param ipAddressType the ipAddressType value to set. + * @return the NamespaceUpdateParameterProperties object itself. + */ + public NamespaceUpdateParameterProperties withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @return the autoScaleConfiguration value. + */ + public UpdateAutoScaleConfiguration autoScaleConfiguration() { + return this.autoScaleConfiguration; + } + + /** + * Set the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @param autoScaleConfiguration the autoScaleConfiguration value to set. + * @return the NamespaceUpdateParameterProperties object itself. + */ + public NamespaceUpdateParameterProperties + withAutoScaleConfiguration(UpdateAutoScaleConfiguration autoScaleConfiguration) { + this.autoScaleConfiguration = autoScaleConfiguration; + return this; } /** @@ -172,6 +208,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); jsonWriter.writeArrayField("inboundIpRules", this.inboundIpRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeJsonField("autoScaleConfiguration", this.autoScaleConfiguration); return jsonWriter.writeEndObject(); } @@ -203,6 +241,12 @@ public static NamespaceUpdateParameterProperties fromJson(JsonReader jsonReader) } else if ("inboundIpRules".equals(fieldName)) { List inboundIpRules = reader.readArray(reader1 -> InboundIpRule.fromJson(reader1)); deserializedNamespaceUpdateParameterProperties.inboundIpRules = inboundIpRules; + } else if ("ipAddressType".equals(fieldName)) { + deserializedNamespaceUpdateParameterProperties.ipAddressType + = IpAddressType.fromString(reader.getString()); + } else if ("autoScaleConfiguration".equals(fieldName)) { + deserializedNamespaceUpdateParameterProperties.autoScaleConfiguration + = UpdateAutoScaleConfiguration.fromJson(reader); } else { reader.skipChildren(); } 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 5a2aeabea5c68..3d0d010bf568f 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +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; @@ -20,13 +21,18 @@ /** * Network security perimeter configuration. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterConfigurationInner extends ProxyResource { /* * Properties of the network security perimeter configuration. */ private NetworkSecurityPerimeterConfigurationProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -45,7 +51,7 @@ public final class NetworkSecurityPerimeterConfigurationInner extends ProxyResou /** * Creates an instance of NetworkSecurityPerimeterConfigurationInner class. */ - public NetworkSecurityPerimeterConfigurationInner() { + private NetworkSecurityPerimeterConfigurationInner() { } /** @@ -57,6 +63,15 @@ private NetworkSecurityPerimeterConfigurationProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -97,22 +112,6 @@ public NetworkSecurityPerimeterConfigProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Set the provisioningState property: Provisioning state to reflect configuration state and indicate status of nsp - * profile configuration retrieval. - * - * @param provisioningState the provisioningState value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner - withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - return this; - } - /** * Get the provisioningIssues property: Provisioning issues to reflect status when attempting to retrieve nsp * profile configuration. @@ -123,22 +122,6 @@ public List provisioningIssues() { return this.innerProperties() == null ? null : this.innerProperties().provisioningIssues(); } - /** - * Set the provisioningIssues property: Provisioning issues to reflect status when attempting to retrieve nsp - * profile configuration. - * - * @param provisioningIssues the provisioningIssues value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner - withProvisioningIssues(List provisioningIssues) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withProvisioningIssues(provisioningIssues); - return this; - } - /** * Get the networkSecurityPerimeter property: Perimeter info for nsp association. * @@ -148,21 +131,6 @@ public NetworkSecurityPerimeterInfo networkSecurityPerimeter() { return this.innerProperties() == null ? null : this.innerProperties().networkSecurityPerimeter(); } - /** - * Set the networkSecurityPerimeter property: Perimeter info for nsp association. - * - * @param networkSecurityPerimeter the networkSecurityPerimeter value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner - withNetworkSecurityPerimeter(NetworkSecurityPerimeterInfo networkSecurityPerimeter) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withNetworkSecurityPerimeter(networkSecurityPerimeter); - return this; - } - /** * Get the resourceAssociation property: Nsp association name and access mode of association. * @@ -172,20 +140,6 @@ public ResourceAssociation resourceAssociation() { return this.innerProperties() == null ? null : this.innerProperties().resourceAssociation(); } - /** - * Set the resourceAssociation property: Nsp association name and access mode of association. - * - * @param resourceAssociation the resourceAssociation value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner withResourceAssociation(ResourceAssociation resourceAssociation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withResourceAssociation(resourceAssociation); - return this; - } - /** * Get the profile property: Nsp profile configuration, access rules and diagnostic settings. * @@ -195,32 +149,6 @@ public NetworkSecurityPerimeterConfigurationProfile profile() { return this.innerProperties() == null ? null : this.innerProperties().profile(); } - /** - * Set the profile property: Nsp profile configuration, access rules and diagnostic settings. - * - * @param profile the profile value to set. - * @return the NetworkSecurityPerimeterConfigurationInner object itself. - */ - public NetworkSecurityPerimeterConfigurationInner - withProfile(NetworkSecurityPerimeterConfigurationProfile profile) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); - } - this.innerProperties().withProfile(profile); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -257,6 +185,8 @@ public static NetworkSecurityPerimeterConfigurationInner fromJson(JsonReader jso } else if ("properties".equals(fieldName)) { deserializedNetworkSecurityPerimeterConfigurationInner.innerProperties = NetworkSecurityPerimeterConfigurationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 21c95de41d805..c912afe28c811 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +17,7 @@ /** * Network security perimeter configuration issues properties. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterConfigurationIssuesProperties implements JsonSerializable { /* @@ -48,7 +48,7 @@ public final class NetworkSecurityPerimeterConfigurationIssuesProperties /** * Creates an instance of NetworkSecurityPerimeterConfigurationIssuesProperties class. */ - public NetworkSecurityPerimeterConfigurationIssuesProperties() { + private NetworkSecurityPerimeterConfigurationIssuesProperties() { } /** @@ -60,18 +60,6 @@ public NetworkSecurityPerimeterConfigurationIssueType issueType() { return this.issueType; } - /** - * Set the issueType property: Provisioning issue type. - * - * @param issueType the issueType value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties - withIssueType(NetworkSecurityPerimeterConfigurationIssueType issueType) { - this.issueType = issueType; - return this; - } - /** * Get the severity property: Provisioning issue severity. * @@ -81,18 +69,6 @@ public NetworkSecurityPerimeterConfigurationIssueSeverity severity() { return this.severity; } - /** - * Set the severity property: Provisioning issue severity. - * - * @param severity the severity value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties - withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity severity) { - this.severity = severity; - return this; - } - /** * Get the description property: Provisioning issue description. * @@ -102,17 +78,6 @@ public String description() { return this.description; } - /** - * Set the description property: Provisioning issue description. - * - * @param description the description value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties withDescription(String description) { - this.description = description; - return this; - } - /** * Get the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to * remediate the issue. @@ -123,19 +88,6 @@ public List suggestedResourceIds() { return this.suggestedResourceIds; } - /** - * Set the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to - * remediate the issue. - * - * @param suggestedResourceIds the suggestedResourceIds value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties - withSuggestedResourceIds(List suggestedResourceIds) { - this.suggestedResourceIds = suggestedResourceIds; - return this; - } - /** * Get the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. * @@ -145,26 +97,6 @@ public List suggestedAccessRules() { return this.suggestedAccessRules; } - /** - * Set the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. - * - * @param suggestedAccessRules the suggestedAccessRules value to set. - * @return the NetworkSecurityPerimeterConfigurationIssuesProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationIssuesProperties - withSuggestedAccessRules(List suggestedAccessRules) { - this.suggestedAccessRules = suggestedAccessRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 13357d6ae0558..91d6e039a02c8 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,7 +20,7 @@ /** * Network security perimeter configuration information to reflect latest association and nsp profile configuration. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterConfigurationProperties implements JsonSerializable { /* @@ -51,7 +51,7 @@ public final class NetworkSecurityPerimeterConfigurationProperties /** * Creates an instance of NetworkSecurityPerimeterConfigurationProperties class. */ - public NetworkSecurityPerimeterConfigurationProperties() { + private NetworkSecurityPerimeterConfigurationProperties() { } /** @@ -64,19 +64,6 @@ public NetworkSecurityPerimeterConfigProvisioningState provisioningState() { return this.provisioningState; } - /** - * Set the provisioningState property: Provisioning state to reflect configuration state and indicate status of nsp - * profile configuration retrieval. - * - * @param provisioningState the provisioningState value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - /** * Get the provisioningIssues property: Provisioning issues to reflect status when attempting to retrieve nsp * profile configuration. @@ -87,19 +74,6 @@ public List provisioningIssues() { return this.provisioningIssues; } - /** - * Set the provisioningIssues property: Provisioning issues to reflect status when attempting to retrieve nsp - * profile configuration. - * - * @param provisioningIssues the provisioningIssues value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withProvisioningIssues(List provisioningIssues) { - this.provisioningIssues = provisioningIssues; - return this; - } - /** * Get the networkSecurityPerimeter property: Perimeter info for nsp association. * @@ -109,18 +83,6 @@ public NetworkSecurityPerimeterInfo networkSecurityPerimeter() { return this.networkSecurityPerimeter; } - /** - * Set the networkSecurityPerimeter property: Perimeter info for nsp association. - * - * @param networkSecurityPerimeter the networkSecurityPerimeter value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withNetworkSecurityPerimeter(NetworkSecurityPerimeterInfo networkSecurityPerimeter) { - this.networkSecurityPerimeter = networkSecurityPerimeter; - return this; - } - /** * Get the resourceAssociation property: Nsp association name and access mode of association. * @@ -130,18 +92,6 @@ public ResourceAssociation resourceAssociation() { return this.resourceAssociation; } - /** - * Set the resourceAssociation property: Nsp association name and access mode of association. - * - * @param resourceAssociation the resourceAssociation value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withResourceAssociation(ResourceAssociation resourceAssociation) { - this.resourceAssociation = resourceAssociation; - return this; - } - /** * Get the profile property: Nsp profile configuration, access rules and diagnostic settings. * @@ -151,38 +101,6 @@ public NetworkSecurityPerimeterConfigurationProfile profile() { return this.profile; } - /** - * Set the profile property: Nsp profile configuration, access rules and diagnostic settings. - * - * @param profile the profile value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withProfile(NetworkSecurityPerimeterConfigurationProfile profile) { - this.profile = profile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (provisioningIssues() != null) { - provisioningIssues().forEach(e -> e.validate()); - } - if (networkSecurityPerimeter() != null) { - networkSecurityPerimeter().validate(); - } - if (resourceAssociation() != null) { - resourceAssociation().validate(); - } - if (profile() != null) { - profile().validate(); - } - } - /** * {@inheritDoc} */ 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 e2749f03cfbf5..0a6f58381df58 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -18,7 +18,7 @@ /** * Network security perimeter profile access rule properties. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterProfileAccessRuleProperties implements JsonSerializable { /* @@ -59,7 +59,7 @@ public final class NetworkSecurityPerimeterProfileAccessRuleProperties /** * Creates an instance of NetworkSecurityPerimeterProfileAccessRuleProperties class. */ - public NetworkSecurityPerimeterProfileAccessRuleProperties() { + private NetworkSecurityPerimeterProfileAccessRuleProperties() { } /** @@ -71,18 +71,6 @@ public NetworkSecurityPerimeterProfileAccessRuleDirection direction() { return this.direction; } - /** - * Set the direction property: NSP access rule direction. - * - * @param direction the direction value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties - withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection direction) { - this.direction = direction; - return this; - } - /** * Get the addressPrefixes property: Address prefixes. * @@ -92,17 +80,6 @@ public List addressPrefixes() { return this.addressPrefixes; } - /** - * Set the addressPrefixes property: Address prefixes. - * - * @param addressPrefixes the addressPrefixes value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties withAddressPrefixes(List addressPrefixes) { - this.addressPrefixes = addressPrefixes; - return this; - } - /** * Get the subscriptions property: List of subscriptions. * @@ -112,18 +89,6 @@ public List subscriptions() { return this.subscriptions; } - /** - * Set the subscriptions property: List of subscriptions. - * - * @param subscriptions the subscriptions value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties - withSubscriptions(List subscriptions) { - this.subscriptions = subscriptions; - return this; - } - /** * Get the networkSecurityPerimeters property: Network security perimeters. * @@ -133,18 +98,6 @@ public List networkSecurityPerimeters() { return this.networkSecurityPerimeters; } - /** - * Set the networkSecurityPerimeters property: Network security perimeters. - * - * @param networkSecurityPerimeters the networkSecurityPerimeters value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties - withNetworkSecurityPerimeters(List networkSecurityPerimeters) { - this.networkSecurityPerimeters = networkSecurityPerimeters; - return this; - } - /** * Get the fullyQualifiedDomainNames property: Fully qualified domain names. * @@ -154,18 +107,6 @@ public List fullyQualifiedDomainNames() { return this.fullyQualifiedDomainNames; } - /** - * Set the fullyQualifiedDomainNames property: Fully qualified domain names. - * - * @param fullyQualifiedDomainNames the fullyQualifiedDomainNames value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties - withFullyQualifiedDomainNames(List fullyQualifiedDomainNames) { - this.fullyQualifiedDomainNames = fullyQualifiedDomainNames; - return this; - } - /** * Get the emailAddresses property: List of email addresses. * @@ -175,17 +116,6 @@ public List emailAddresses() { return this.emailAddresses; } - /** - * Set the emailAddresses property: List of email addresses. - * - * @param emailAddresses the emailAddresses value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties withEmailAddresses(List emailAddresses) { - this.emailAddresses = emailAddresses; - return this; - } - /** * Get the phoneNumbers property: List of phone numbers. * @@ -195,31 +125,6 @@ public List phoneNumbers() { return this.phoneNumbers; } - /** - * Set the phoneNumbers property: List of phone numbers. - * - * @param phoneNumbers the phoneNumbers value to set. - * @return the NetworkSecurityPerimeterProfileAccessRuleProperties object itself. - */ - public NetworkSecurityPerimeterProfileAccessRuleProperties withPhoneNumbers(List phoneNumbers) { - this.phoneNumbers = phoneNumbers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subscriptions() != null) { - subscriptions().forEach(e -> e.validate()); - } - if (networkSecurityPerimeters() != null) { - networkSecurityPerimeters().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 f592aa6a40e7a..6595f4326679a 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Represents an operation returned by the GetOperations request. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * Name of the operation. @@ -45,7 +45,7 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -57,17 +57,6 @@ public String name() { return this.name; } - /** - * Set the name property: Name of the operation. - * - * @param name the name value to set. - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - /** * Get the display property: Display name of the operation. * @@ -77,17 +66,6 @@ public OperationInfo display() { return this.display; } - /** - * Set the display property: Display name of the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationInfo display) { - this.display = display; - return this; - } - /** * Get the origin property: Origin of the operation. * @@ -97,17 +75,6 @@ public String origin() { return this.origin; } - /** - * Set the origin property: Origin of the operation. - * - * @param origin the origin value to set. - * @return the OperationInner object itself. - */ - public OperationInner withOrigin(String origin) { - this.origin = origin; - return this; - } - /** * Get the isDataAction property: This Boolean is used to determine if the operation is a data plane action or not. * @@ -117,17 +84,6 @@ public Boolean isDataAction() { return this.isDataAction; } - /** - * Set the isDataAction property: This Boolean is used to determine if the operation is a data plane action or not. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationInner object itself. - */ - public OperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - /** * Get the properties property: Properties of the operation. * @@ -137,28 +93,6 @@ public Object properties() { return this.properties; } - /** - * Set the properties property: Properties of the operation. - * - * @param properties the properties value to set. - * @return the OperationInner object itself. - */ - public OperationInner withProperties(Object properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ 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 c0863cdfebccb..d838afefcdb62 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -26,9 +26,9 @@ public final class PartnerConfigurationInner extends ProxyResource { private PartnerConfigurationProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Tags of the resource. */ - private SystemData systemData; + private Map tags; /* * Location of the resource. @@ -36,9 +36,9 @@ public final class PartnerConfigurationInner extends ProxyResource { private String location; /* - * Tags of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private Map tags; + private SystemData systemData; /* * The type of the resource. @@ -71,12 +71,23 @@ private PartnerConfigurationProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the tags property: Tags of the resource. * - * @return the systemData value. + * @return the tags value. */ - public SystemData systemData() { - return this.systemData; + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Tags of the resource. + * + * @param tags the tags value to set. + * @return the PartnerConfigurationInner object itself. + */ + public PartnerConfigurationInner withTags(Map tags) { + this.tags = tags; + return this; } /** @@ -100,23 +111,12 @@ public PartnerConfigurationInner withLocation(String location) { } /** - * Get the tags property: Tags of the resource. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tags of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param tags the tags value to set. - * @return the PartnerConfigurationInner object itself. + * @return the systemData value. */ - public PartnerConfigurationInner withTags(Map tags) { - this.tags = tags; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -195,17 +195,6 @@ public PartnerConfigurationInner withProvisioningState(PartnerConfigurationProvi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -213,8 +202,8 @@ public void validate() { 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)); + jsonWriter.writeStringField("location", this.location); return jsonWriter.writeEndObject(); } @@ -243,13 +232,13 @@ public static PartnerConfigurationInner fromJson(JsonReader jsonReader) throws I } 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 if ("location".equals(fieldName)) { + deserializedPartnerConfigurationInner.location = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedPartnerConfigurationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 a76e9dc74a545..01b220841de9b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -75,17 +75,6 @@ public PartnerConfigurationProvisioningState provisioningState() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (partnerAuthorization() != null) { - partnerAuthorization().validate(); - } - } - /** * {@inheritDoc} */ 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 553ab5cf409be..5f9b4b9508554 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -52,14 +52,6 @@ public Integer defaultMaximumExpirationTimeInDays() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 ad6576d794973..7b96eb6fd1ec4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -15,7 +15,6 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; -import java.util.UUID; /** * Event Grid Partner Destination. @@ -28,7 +27,7 @@ public final class PartnerDestinationInner extends Resource { private PartnerDestinationProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -63,7 +62,7 @@ private PartnerDestinationProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -124,7 +123,7 @@ public PartnerDestinationInner withTags(Map tags) { * * @return the partnerRegistrationImmutableId value. */ - public UUID partnerRegistrationImmutableId() { + public String partnerRegistrationImmutableId() { return this.innerProperties() == null ? null : this.innerProperties().partnerRegistrationImmutableId(); } @@ -134,7 +133,7 @@ public UUID partnerRegistrationImmutableId() { * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. * @return the PartnerDestinationInner object itself. */ - public PartnerDestinationInner withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + public PartnerDestinationInner withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId) { if (this.innerProperties() == null) { this.innerProperties = new PartnerDestinationProperties(); } @@ -270,17 +269,6 @@ public PartnerDestinationInner withMessageForActivation(String messageForActivat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 e23129ce7ca83..e21d1bef010b2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -15,8 +15,6 @@ 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. @@ -26,7 +24,7 @@ public final class PartnerDestinationProperties implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedPartnerDestinationProperties.partnerRegistrationImmutableId = reader.getString(); } else if ("endpointServiceContext".equals(fieldName)) { deserializedPartnerDestinationProperties.endpointServiceContext = reader.getString(); } else if ("expirationTimeIfNotActivatedUtc".equals(fieldName)) { 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 2c5a9e1f01d7a..3a19f5897e53b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -50,14 +50,6 @@ public PartnerEventSubscriptionDestinationProperties withResourceId(String resou return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 78d62dda38e6b..11d6825b62d1e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -30,7 +30,7 @@ public final class PartnerNamespaceInner extends Resource { private PartnerNamespaceProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -65,7 +65,7 @@ private PartnerNamespaceProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -312,17 +312,6 @@ public PartnerNamespaceInner withPartnerTopicRoutingMode(PartnerTopicRoutingMode return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 9147478ecc756..08330fa308b4c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -258,20 +258,6 @@ public PartnerNamespaceProperties withPartnerTopicRoutingMode(PartnerTopicRoutin return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (inboundIpRules() != null) { - inboundIpRules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 042a0e53970ce..de73c81fdb105 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Shared access keys of the partner namespace. */ -@Fluent +@Immutable public final class PartnerNamespaceSharedAccessKeysInner implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class PartnerNamespaceSharedAccessKeysInner /** * Creates an instance of PartnerNamespaceSharedAccessKeysInner class. */ - public PartnerNamespaceSharedAccessKeysInner() { + private PartnerNamespaceSharedAccessKeysInner() { } /** @@ -42,17 +42,6 @@ public String key1() { return this.key1; } - /** - * Set the key1 property: Shared access key1 for the partner namespace. - * - * @param key1 the key1 value to set. - * @return the PartnerNamespaceSharedAccessKeysInner object itself. - */ - public PartnerNamespaceSharedAccessKeysInner withKey1(String key1) { - this.key1 = key1; - return this; - } - /** * Get the key2 property: Shared access key2 for the partner namespace. * @@ -62,25 +51,6 @@ public String key2() { return this.key2; } - /** - * Set the key2 property: Shared access key2 for the partner namespace. - * - * @param key2 the key2 value to set. - * @return the PartnerNamespaceSharedAccessKeysInner object itself. - */ - public PartnerNamespaceSharedAccessKeysInner withKey2(String key2) { - this.key2 = key2; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 d06739c6816a5..93e3eb800fdbf 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -149,17 +149,6 @@ public PartnerNamespaceUpdateParameterProperties withDisableLocalAuth(Boolean di return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (inboundIpRules() != null) { - inboundIpRules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 de3739dc71e7a..e96d87fe6ca38 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -13,7 +13,6 @@ import com.azure.resourcemanager.eventgrid.models.PartnerRegistrationProvisioningState; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Information about a partner registration. @@ -26,7 +25,7 @@ public final class PartnerRegistrationInner extends Resource { private PartnerRegistrationProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -61,7 +60,7 @@ private PartnerRegistrationProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -132,7 +131,7 @@ public PartnerRegistrationProvisioningState provisioningState() { * * @return the partnerRegistrationImmutableId value. */ - public UUID partnerRegistrationImmutableId() { + public String partnerRegistrationImmutableId() { return this.innerProperties() == null ? null : this.innerProperties().partnerRegistrationImmutableId(); } @@ -143,7 +142,7 @@ public UUID partnerRegistrationImmutableId() { * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. * @return the PartnerRegistrationInner object itself. */ - public PartnerRegistrationInner withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + public PartnerRegistrationInner withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId) { if (this.innerProperties() == null) { this.innerProperties = new PartnerRegistrationProperties(); } @@ -151,17 +150,6 @@ public PartnerRegistrationInner withPartnerRegistrationImmutableId(UUID partnerR return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 fc9338bb88c4e..3a2c1049b4972 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -11,8 +11,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventgrid.models.PartnerRegistrationProvisioningState; import java.io.IOException; -import java.util.Objects; -import java.util.UUID; /** * Properties of the partner registration. @@ -28,7 +26,7 @@ public final class PartnerRegistrationProperties implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedPartnerRegistrationProperties.partnerRegistrationImmutableId = reader.getString(); } else { reader.skipChildren(); } 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 c30705edf482f..9e9deaa3a4ca0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -17,7 +17,6 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; -import java.util.UUID; /** * Event Grid Partner Topic. @@ -30,14 +29,14 @@ public final class PartnerTopicInner extends Resource { private PartnerTopicProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Identity information for the Partner Topic resource. */ - private SystemData systemData; + private IdentityInfo identity; /* - * Identity information for the Partner Topic resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private IdentityInfo identity; + private SystemData systemData; /* * The type of the resource. @@ -69,15 +68,6 @@ private PartnerTopicProperties innerProperties() { return this.innerProperties; } - /** - * Get the systemData property: The system metadata relating to the Event Grid resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - /** * Get the identity property: Identity information for the Partner Topic resource. * @@ -98,6 +88,15 @@ public PartnerTopicInner withIdentity(IdentityInfo identity) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -151,7 +150,7 @@ public PartnerTopicInner withTags(Map tags) { * * @return the partnerRegistrationImmutableId value. */ - public UUID partnerRegistrationImmutableId() { + public String partnerRegistrationImmutableId() { return this.innerProperties() == null ? null : this.innerProperties().partnerRegistrationImmutableId(); } @@ -161,7 +160,7 @@ public UUID partnerRegistrationImmutableId() { * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. * @return the PartnerTopicInner object itself. */ - public PartnerTopicInner withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + public PartnerTopicInner withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId) { if (this.innerProperties() == null) { this.innerProperties = new PartnerTopicProperties(); } @@ -326,20 +325,6 @@ public PartnerTopicInner withMessageForActivation(String messageForActivation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ @@ -382,10 +367,10 @@ public static PartnerTopicInner fromJson(JsonReader jsonReader) throws IOExcepti 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 if ("systemData".equals(fieldName)) { + deserializedPartnerTopicInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 8178c77f2bcf6..fab831791a6c4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -16,8 +16,6 @@ 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. @@ -27,7 +25,7 @@ public final class PartnerTopicProperties implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedPartnerTopicProperties.partnerRegistrationImmutableId = reader.getString(); } else if ("source".equals(fieldName)) { deserializedPartnerTopicProperties.source = reader.getString(); } else if ("eventTypeInfo".equals(fieldName)) { 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 1de668e279cfb..a6d800aadc35d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -25,7 +25,7 @@ public final class PermissionBindingInner extends ProxyResource { private PermissionBindingProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -60,7 +60,7 @@ private PermissionBindingProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -203,17 +203,6 @@ public PermissionBindingProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 c00bab1ee85dd..ad4850511e4d3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -144,14 +144,6 @@ public PermissionBindingProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 5c008d637338c..7825aeef3c40d 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,7 +17,7 @@ import java.util.List; /** - * The PrivateEndpointConnection model. + * Concrete proxy resource types can be created by aliasing this type using a specific property type. */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { @@ -25,6 +26,11 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { */ private PrivateEndpointConnectionProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -55,6 +61,15 @@ private PrivateEndpointConnectionProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -178,17 +193,6 @@ public PrivateEndpointConnectionInner withProvisioningState(ResourceProvisioning return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,6 +229,8 @@ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) thr } else if ("properties".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.innerProperties = PrivateEndpointConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 8b4c6cb13954b..680b3d141b995 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -128,20 +128,6 @@ public PrivateEndpointConnectionProperties withProvisioningState(ResourceProvisi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); - } - } - /** * {@inheritDoc} */ 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 e293032352f36..c5a4cf20c94da 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Information of the private link resource. */ -@Fluent +@Immutable public final class PrivateLinkResourceInner implements JsonSerializable { /* * Properties of the private link resource. @@ -23,24 +23,26 @@ public final class PrivateLinkResourceInner implements JsonSerializable requiredMembers() { return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); } - /** - * Set the requiredMembers property: The requiredMembers property. - * - * @param requiredMembers the requiredMembers value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredMembers(requiredMembers); - return this; - } - /** * Get the requiredZoneNames property: The requiredZoneNames property. * @@ -190,31 +120,6 @@ public List requiredZoneNames() { return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); } - /** - * Set the requiredZoneNames property: The requiredZoneNames property. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredZoneNames(requiredZoneNames); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 cf2a9fadb7ed3..5ab73455b43d0 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The PrivateLinkResourceProperties model. */ -@Fluent +@Immutable public final class PrivateLinkResourceProperties implements JsonSerializable { /* * The groupId property. @@ -40,7 +40,7 @@ public final class PrivateLinkResourceProperties implements JsonSerializable requiredMembers() { return this.requiredMembers; } - /** - * Set the requiredMembers property: The requiredMembers property. - * - * @param requiredMembers the requiredMembers value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredMembers(List requiredMembers) { - this.requiredMembers = requiredMembers; - return this; - } - /** * Get the requiredZoneNames property: The requiredZoneNames property. * @@ -112,25 +79,6 @@ public List requiredZoneNames() { return this.requiredZoneNames; } - /** - * Set the requiredZoneNames property: The requiredZoneNames property. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 e76c82bc5d0c1..02d49e8bf393d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -78,17 +78,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deliveryAttributeMappings() != null) { - deliveryAttributeMappings().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 b8d3b4eb3a2c9..efb5419780e39 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -78,17 +78,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deliveryAttributeMappings() != null) { - deliveryAttributeMappings().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 5cb1c9b7500fb..cf3be34d2a30b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -73,14 +73,6 @@ public StaticDeliveryAttributeMappingProperties withIsSecret(Boolean isSecret) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 315d8469ce169..cd8e7d15bc3f1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -77,14 +77,6 @@ public StorageBlobDeadLetterDestinationProperties withBlobContainerName(String b return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 2a78b71d70235..89ea023889412 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -109,14 +109,6 @@ public Long queueMessageTimeToLiveInSeconds() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 c9828e67c28b4..b10f2900eda5d 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Full endpoint URL of an event subscription. */ -@Fluent +@Immutable public final class SubscriptionFullUrlInner implements JsonSerializable { /* * The URL that represents the endpoint of the destination of an event subscription. @@ -24,7 +24,7 @@ public final class SubscriptionFullUrlInner implements JsonSerializable tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 1354d1d0194f9..981760b2d360b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -169,20 +169,6 @@ public SubscriptionProperties withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deliveryConfiguration() != null) { - deliveryConfiguration().validate(); - } - if (filtersConfiguration() != null) { - filtersConfiguration().validate(); - } - } - /** * {@inheritDoc} */ 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 32eeab58cc2b3..ef2b8697e7be5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -156,20 +156,6 @@ public SubscriptionUpdateParametersProperties withTags(Map tags) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deliveryConfiguration() != null) { - deliveryConfiguration().validate(); - } - if (filtersConfiguration() != null) { - filtersConfiguration().validate(); - } - } - /** * {@inheritDoc} */ 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 26dae4262c4e7..3223cf400f452 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -11,6 +11,8 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; +import com.azure.resourcemanager.eventgrid.models.KeyEncryption; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; import java.io.IOException; import java.util.Map; @@ -26,14 +28,14 @@ public final class SystemTopicInner extends Resource { private SystemTopicProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Identity information for the resource. */ - private SystemData systemData; + private IdentityInfo identity; /* - * Identity information for the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private IdentityInfo identity; + private SystemData systemData; /* * The type of the resource. @@ -65,15 +67,6 @@ private SystemTopicProperties innerProperties() { return this.innerProperties; } - /** - * Get the systemData property: The system metadata relating to the Event Grid resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - /** * Get the identity property: Identity information for the resource. * @@ -94,6 +87,15 @@ public SystemTopicInner withIdentity(IdentityInfo identity) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -207,17 +209,53 @@ public String metricResourceId() { } /** - * Validates the instance. + * Get the encryption property: Key encryption configuration properties of the system topic resource. This is an + * optional property. When not specified, no key encryption is used. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the encryption value. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + public KeyEncryption encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: Key encryption configuration properties of the system topic resource. This is an + * optional property. When not specified, no key encryption is used. + * + * @param encryption the encryption value to set. + * @return the SystemTopicInner object itself. + */ + public SystemTopicInner withEncryption(KeyEncryption encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new SystemTopicProperties(); } - if (identity() != null) { - identity().validate(); + this.innerProperties().withEncryption(encryption); + return this; + } + + /** + * Get the platformCapabilities property: Represents the platform capabilities of the resource, including Azure + * Confidential Compute related properties. + * + * @return the platformCapabilities value. + */ + public PlatformCapabilities platformCapabilities() { + return this.innerProperties() == null ? null : this.innerProperties().platformCapabilities(); + } + + /** + * Set the platformCapabilities property: Represents the platform capabilities of the resource, including Azure + * Confidential Compute related properties. + * + * @param platformCapabilities the platformCapabilities value to set. + * @return the SystemTopicInner object itself. + */ + public SystemTopicInner withPlatformCapabilities(PlatformCapabilities platformCapabilities) { + if (this.innerProperties() == null) { + this.innerProperties = new SystemTopicProperties(); } + this.innerProperties().withPlatformCapabilities(platformCapabilities); + return this; } /** @@ -262,10 +300,10 @@ public static SystemTopicInner fromJson(JsonReader jsonReader) throws IOExceptio 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 if ("systemData".equals(fieldName)) { + deserializedSystemTopicInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 b9076d6777f78..af7e653580f88 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -9,6 +9,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.eventgrid.models.KeyEncryption; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; import java.io.IOException; @@ -37,6 +39,17 @@ public final class SystemTopicProperties implements JsonSerializable */ private DataResidencyBoundary dataResidencyBoundary; + /* + * Key encryption configuration properties of the topic resource. This is an optional property. When not specified, + * no key encryption is used. + */ + private KeyEncryption encryption; + + /* + * Represents the platform capabilities of the resource, including Azure Confidential Compute related properties. + */ + private PlatformCapabilities platformCapabilities; + /** * Creates an instance of TopicProperties class. */ @@ -316,23 +329,47 @@ public TopicProperties withDataResidencyBoundary(DataResidencyBoundary dataResid } /** - * Validates the instance. + * Get the encryption property: Key encryption configuration properties of the topic resource. This is an optional + * property. When not specified, no key encryption is used. + * + * @return the encryption value. + */ + public KeyEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Key encryption configuration properties of the topic resource. This is an optional + * property. When not specified, no key encryption is used. + * + * @param encryption the encryption value to set. + * @return the TopicProperties object itself. + */ + public TopicProperties withEncryption(KeyEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the platformCapabilities property: Represents the platform capabilities of the resource, including Azure + * Confidential Compute related properties. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (eventTypeInfo() != null) { - eventTypeInfo().validate(); - } - if (inputSchemaMapping() != null) { - inputSchemaMapping().validate(); - } - if (inboundIpRules() != null) { - inboundIpRules().forEach(e -> e.validate()); - } + * @return the platformCapabilities value. + */ + public PlatformCapabilities platformCapabilities() { + return this.platformCapabilities; + } + + /** + * Set the platformCapabilities property: Represents the platform capabilities of the resource, including Azure + * Confidential Compute related properties. + * + * @param platformCapabilities the platformCapabilities value to set. + * @return the TopicProperties object itself. + */ + public TopicProperties withPlatformCapabilities(PlatformCapabilities platformCapabilities) { + this.platformCapabilities = platformCapabilities; + return this; } /** @@ -353,6 +390,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); jsonWriter.writeStringField("dataResidencyBoundary", this.dataResidencyBoundary == null ? null : this.dataResidencyBoundary.toString()); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeJsonField("platformCapabilities", this.platformCapabilities); return jsonWriter.writeEndObject(); } @@ -401,6 +440,10 @@ public static TopicProperties fromJson(JsonReader jsonReader) throws IOException } else if ("dataResidencyBoundary".equals(fieldName)) { deserializedTopicProperties.dataResidencyBoundary = DataResidencyBoundary.fromString(reader.getString()); + } else if ("encryption".equals(fieldName)) { + deserializedTopicProperties.encryption = KeyEncryption.fromJson(reader); + } else if ("platformCapabilities".equals(fieldName)) { + deserializedTopicProperties.platformCapabilities = PlatformCapabilities.fromJson(reader); } else { reader.skipChildren(); } 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 9c39fbeccd852..0403ca3cbb4ee 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Shared access keys of the Topic. */ -@Fluent +@Immutable public final class TopicSharedAccessKeysInner implements JsonSerializable { /* * Shared access key1 for the topic. @@ -29,7 +29,7 @@ public final class TopicSharedAccessKeysInner implements JsonSerializable supportedLocations() { return this.innerProperties() == null ? null : this.innerProperties().supportedLocations(); } - /** - * Set the supportedLocations property: List of locations supported by this topic type. - * - * @param supportedLocations the supportedLocations value to set. - * @return the TopicTypeInfoInner object itself. - */ - public TopicTypeInfoInner withSupportedLocations(List supportedLocations) { - if (this.innerProperties() == null) { - this.innerProperties = new TopicTypeProperties(); - } - this.innerProperties().withSupportedLocations(supportedLocations); - return this; - } - /** * Get the sourceResourceFormat property: Source resource format. * @@ -233,20 +164,6 @@ public String sourceResourceFormat() { return this.innerProperties() == null ? null : this.innerProperties().sourceResourceFormat(); } - /** - * Set the sourceResourceFormat property: Source resource format. - * - * @param sourceResourceFormat the sourceResourceFormat value to set. - * @return the TopicTypeInfoInner object itself. - */ - public TopicTypeInfoInner withSourceResourceFormat(String sourceResourceFormat) { - if (this.innerProperties() == null) { - this.innerProperties = new TopicTypeProperties(); - } - this.innerProperties().withSourceResourceFormat(sourceResourceFormat); - return this; - } - /** * Get the supportedScopesForSource property: Supported source scopes. * @@ -256,20 +173,6 @@ public List supportedScopesForSource() { return this.innerProperties() == null ? null : this.innerProperties().supportedScopesForSource(); } - /** - * Set the supportedScopesForSource property: Supported source scopes. - * - * @param supportedScopesForSource the supportedScopesForSource value to set. - * @return the TopicTypeInfoInner object itself. - */ - public TopicTypeInfoInner withSupportedScopesForSource(List supportedScopesForSource) { - if (this.innerProperties() == null) { - this.innerProperties = new TopicTypeProperties(); - } - this.innerProperties().withSupportedScopesForSource(supportedScopesForSource); - return this; - } - /** * Get the areRegionalAndGlobalSourcesSupported property: Flag to indicate that a topic type can support both * regional or global system topics. @@ -280,21 +183,6 @@ public Boolean areRegionalAndGlobalSourcesSupported() { return this.innerProperties() == null ? null : this.innerProperties().areRegionalAndGlobalSourcesSupported(); } - /** - * Set the areRegionalAndGlobalSourcesSupported property: Flag to indicate that a topic type can support both - * regional or global system topics. - * - * @param areRegionalAndGlobalSourcesSupported the areRegionalAndGlobalSourcesSupported value to set. - * @return the TopicTypeInfoInner object itself. - */ - public TopicTypeInfoInner withAreRegionalAndGlobalSourcesSupported(Boolean areRegionalAndGlobalSourcesSupported) { - if (this.innerProperties() == null) { - this.innerProperties = new TopicTypeProperties(); - } - this.innerProperties().withAreRegionalAndGlobalSourcesSupported(areRegionalAndGlobalSourcesSupported); - return this; - } - /** * Get the additionalEnforcedPermissions property: Permissions which are enforced for creating and updating system * topics of this this topic type. @@ -305,33 +193,6 @@ public List additionalEnforcedPermissions return this.innerProperties() == null ? null : this.innerProperties().additionalEnforcedPermissions(); } - /** - * Set the additionalEnforcedPermissions property: Permissions which are enforced for creating and updating system - * topics of this this topic type. - * - * @param additionalEnforcedPermissions the additionalEnforcedPermissions value to set. - * @return the TopicTypeInfoInner object itself. - */ - public TopicTypeInfoInner - withAdditionalEnforcedPermissions(List additionalEnforcedPermissions) { - if (this.innerProperties() == null) { - this.innerProperties = new TopicTypeProperties(); - } - this.innerProperties().withAdditionalEnforcedPermissions(additionalEnforcedPermissions); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -366,6 +227,8 @@ public static TopicTypeInfoInner fromJson(JsonReader jsonReader) throws IOExcept deserializedTopicTypeInfoInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedTopicTypeInfoInner.innerProperties = TopicTypeProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedTopicTypeInfoInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 30bb4fbaebd37..c602280d64b15 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,7 +19,7 @@ /** * Properties of a topic type. */ -@Fluent +@Immutable public final class TopicTypeProperties implements JsonSerializable { /* * Namespace of the provider of the topic type. @@ -74,7 +74,7 @@ public final class TopicTypeProperties implements JsonSerializable supportedLocations() { return this.supportedLocations; } - /** - * Set the supportedLocations property: List of locations supported by this topic type. - * - * @param supportedLocations the supportedLocations value to set. - * @return the TopicTypeProperties object itself. - */ - public TopicTypeProperties withSupportedLocations(List supportedLocations) { - this.supportedLocations = supportedLocations; - return this; - } - /** * Get the sourceResourceFormat property: Source resource format. * @@ -206,17 +140,6 @@ public String sourceResourceFormat() { return this.sourceResourceFormat; } - /** - * Set the sourceResourceFormat property: Source resource format. - * - * @param sourceResourceFormat the sourceResourceFormat value to set. - * @return the TopicTypeProperties object itself. - */ - public TopicTypeProperties withSourceResourceFormat(String sourceResourceFormat) { - this.sourceResourceFormat = sourceResourceFormat; - return this; - } - /** * Get the supportedScopesForSource property: Supported source scopes. * @@ -226,17 +149,6 @@ public List supportedScopesForSource() { return this.supportedScopesForSource; } - /** - * Set the supportedScopesForSource property: Supported source scopes. - * - * @param supportedScopesForSource the supportedScopesForSource value to set. - * @return the TopicTypeProperties object itself. - */ - public TopicTypeProperties withSupportedScopesForSource(List supportedScopesForSource) { - this.supportedScopesForSource = supportedScopesForSource; - return this; - } - /** * Get the areRegionalAndGlobalSourcesSupported property: Flag to indicate that a topic type can support both * regional or global system topics. @@ -247,18 +159,6 @@ public Boolean areRegionalAndGlobalSourcesSupported() { return this.areRegionalAndGlobalSourcesSupported; } - /** - * Set the areRegionalAndGlobalSourcesSupported property: Flag to indicate that a topic type can support both - * regional or global system topics. - * - * @param areRegionalAndGlobalSourcesSupported the areRegionalAndGlobalSourcesSupported value to set. - * @return the TopicTypeProperties object itself. - */ - public TopicTypeProperties withAreRegionalAndGlobalSourcesSupported(Boolean areRegionalAndGlobalSourcesSupported) { - this.areRegionalAndGlobalSourcesSupported = areRegionalAndGlobalSourcesSupported; - return this; - } - /** * Get the additionalEnforcedPermissions property: Permissions which are enforced for creating and updating system * topics of this this topic type. @@ -269,30 +169,6 @@ public List additionalEnforcedPermissions return this.additionalEnforcedPermissions; } - /** - * Set the additionalEnforcedPermissions property: Permissions which are enforced for creating and updating system - * topics of this this topic type. - * - * @param additionalEnforcedPermissions the additionalEnforcedPermissions value to set. - * @return the TopicTypeProperties object itself. - */ - public TopicTypeProperties - withAdditionalEnforcedPermissions(List additionalEnforcedPermissions) { - this.additionalEnforcedPermissions = additionalEnforcedPermissions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (additionalEnforcedPermissions() != null) { - additionalEnforcedPermissions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 37310f3e6e87d..b283fe231ac9b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -199,20 +199,6 @@ public TopicUpdateParameterProperties withEventTypeInfo(EventTypeInfo eventTypeI return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (inboundIpRules() != null) { - inboundIpRules().forEach(e -> e.validate()); - } - if (eventTypeInfo() != null) { - eventTypeInfo().validate(); - } - } - /** * {@inheritDoc} */ 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 99f51f44df517..93bb5193a19db 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -13,12 +13,11 @@ import com.azure.resourcemanager.eventgrid.models.PartnerDetails; import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; import java.io.IOException; -import java.util.UUID; /** * Verified partner information. */ -@Fluent +@Immutable public final class VerifiedPartnerInner extends ProxyResource { /* * Properties of the verified partner. @@ -26,7 +25,7 @@ public final class VerifiedPartnerInner extends ProxyResource { private VerifiedPartnerProperties innerProperties; /* - * The system metadata relating to the Event Grid resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -48,7 +47,7 @@ public final class VerifiedPartnerInner extends ProxyResource { /** * Creates an instance of VerifiedPartnerInner class. */ - public VerifiedPartnerInner() { + private VerifiedPartnerInner() { } /** @@ -61,7 +60,7 @@ private VerifiedPartnerProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -104,24 +103,10 @@ public String id() { * * @return the partnerRegistrationImmutableId value. */ - public UUID partnerRegistrationImmutableId() { + public String partnerRegistrationImmutableId() { return this.innerProperties() == null ? null : this.innerProperties().partnerRegistrationImmutableId(); } - /** - * Set the partnerRegistrationImmutableId property: ImmutableId of the corresponding partner registration. - * - * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. - * @return the VerifiedPartnerInner object itself. - */ - public VerifiedPartnerInner withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { - if (this.innerProperties() == null) { - this.innerProperties = new VerifiedPartnerProperties(); - } - this.innerProperties().withPartnerRegistrationImmutableId(partnerRegistrationImmutableId); - return this; - } - /** * Get the organizationName property: Official name of the Partner. * @@ -131,20 +116,6 @@ public String organizationName() { return this.innerProperties() == null ? null : this.innerProperties().organizationName(); } - /** - * Set the organizationName property: Official name of the Partner. - * - * @param organizationName the organizationName value to set. - * @return the VerifiedPartnerInner object itself. - */ - public VerifiedPartnerInner withOrganizationName(String organizationName) { - if (this.innerProperties() == null) { - this.innerProperties = new VerifiedPartnerProperties(); - } - this.innerProperties().withOrganizationName(organizationName); - return this; - } - /** * Get the partnerDisplayName property: Display name of the verified partner. * @@ -154,20 +125,6 @@ public String partnerDisplayName() { return this.innerProperties() == null ? null : this.innerProperties().partnerDisplayName(); } - /** - * Set the partnerDisplayName property: Display name of the verified partner. - * - * @param partnerDisplayName the partnerDisplayName value to set. - * @return the VerifiedPartnerInner object itself. - */ - public VerifiedPartnerInner withPartnerDisplayName(String partnerDisplayName) { - if (this.innerProperties() == null) { - this.innerProperties = new VerifiedPartnerProperties(); - } - this.innerProperties().withPartnerDisplayName(partnerDisplayName); - return this; - } - /** * Get the partnerTopicDetails property: Details of the partner topic scenario. * @@ -177,20 +134,6 @@ public PartnerDetails partnerTopicDetails() { return this.innerProperties() == null ? null : this.innerProperties().partnerTopicDetails(); } - /** - * Set the partnerTopicDetails property: Details of the partner topic scenario. - * - * @param partnerTopicDetails the partnerTopicDetails value to set. - * @return the VerifiedPartnerInner object itself. - */ - public VerifiedPartnerInner withPartnerTopicDetails(PartnerDetails partnerTopicDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new VerifiedPartnerProperties(); - } - this.innerProperties().withPartnerTopicDetails(partnerTopicDetails); - return this; - } - /** * Get the partnerDestinationDetails property: Details of the partner destination scenario. * @@ -200,20 +143,6 @@ public PartnerDetails partnerDestinationDetails() { return this.innerProperties() == null ? null : this.innerProperties().partnerDestinationDetails(); } - /** - * Set the partnerDestinationDetails property: Details of the partner destination scenario. - * - * @param partnerDestinationDetails the partnerDestinationDetails value to set. - * @return the VerifiedPartnerInner object itself. - */ - public VerifiedPartnerInner withPartnerDestinationDetails(PartnerDetails partnerDestinationDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new VerifiedPartnerProperties(); - } - this.innerProperties().withPartnerDestinationDetails(partnerDestinationDetails); - return this; - } - /** * Get the provisioningState property: Provisioning state of the verified partner. * @@ -223,31 +152,6 @@ public VerifiedPartnerProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Set the provisioningState property: Provisioning state of the verified partner. - * - * @param provisioningState the provisioningState value to set. - * @return the VerifiedPartnerInner object itself. - */ - public VerifiedPartnerInner withProvisioningState(VerifiedPartnerProvisioningState provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new VerifiedPartnerProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 640e1839d2186..fb392b5a483af 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -12,18 +12,16 @@ import com.azure.resourcemanager.eventgrid.models.PartnerDetails; import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; import java.io.IOException; -import java.util.Objects; -import java.util.UUID; /** * Properties of the verified partner. */ -@Fluent +@Immutable public final class VerifiedPartnerProperties implements JsonSerializable { /* * ImmutableId of the corresponding partner registration. */ - private UUID partnerRegistrationImmutableId; + private String partnerRegistrationImmutableId; /* * Official name of the Partner. @@ -53,7 +51,7 @@ public final class VerifiedPartnerProperties implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedVerifiedPartnerProperties.partnerRegistrationImmutableId = reader.getString(); } else if ("organizationName".equals(fieldName)) { deserializedVerifiedPartnerProperties.organizationName = reader.getString(); } else if ("partnerDisplayName".equals(fieldName)) { 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 bad5d807a4a61..c77b89c3f31f1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -227,17 +227,6 @@ public TlsVersion minimumTlsVersionAllowed() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deliveryAttributeMappings() != null) { - deliveryAttributeMappings().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 f7043d296b17c..adc11dbb87f10 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.fluent.models; @@ -100,17 +100,6 @@ public PartnerClientAuthentication clientAuthentication() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clientAuthentication() != null) { - clientAuthentication().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/package-info.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/package-info.java index 33c7ec596ce13..532d12f59199c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/package-info.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for EventGridManagementClient. + * Package containing the inner data models for EventGrid. * Azure EventGrid Management Client. */ package com.azure.resourcemanager.eventgrid.fluent.models; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/package-info.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/package-info.java index 712c9627de4c5..e1bf684dafd99 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/package-info.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for EventGridManagementClient. + * Package containing the service clients for EventGrid. * Azure EventGrid Management Client. */ package com.azure.resourcemanager.eventgrid.fluent; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java index 07d7ffb6dd65f..7cfef9a93cb4b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 4677f5454427f..c09efe4955eae 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient; import com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner; -import com.azure.resourcemanager.eventgrid.models.CaCertificatesListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.CaCertificatesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,97 +68,93 @@ public final class CaCertificatesClientImpl implements CaCertificatesClient { * The interface defining all the services for EventGridManagementClientCaCertificates to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientCaCertificates") public interface CaCertificatesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("caCertificateName") String caCertificateName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("caCertificateName") String caCertificateName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("caCertificateName") String caCertificateName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("caCertificateName") String caCertificateName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("caCertificateName") String caCertificateName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CaCertificateInner caCertificateInfo, @HeaderParam("Accept") String accept, + @PathParam("caCertificateName") String caCertificateName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CaCertificateInner caCertificateInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("caCertificateName") String caCertificateName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CaCertificateInner caCertificateInfo, @HeaderParam("Accept") String accept, + @PathParam("caCertificateName") String caCertificateName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CaCertificateInner caCertificateInfo, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("caCertificateName") String caCertificateName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("caCertificateName") String caCertificateName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("caCertificateName") String caCertificateName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("caCertificateName") String caCertificateName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByNamespaceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByNamespaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -167,7 +162,7 @@ Mono> listByNamespaceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByNamespaceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -176,40 +171,23 @@ Response listByNamespaceNextSync( * * Get properties of a CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate along with {@link Response} on successful completion of {@link Mono}. + * @return a CA certificate. + * + * Get properties of a CA certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String caCertificateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (caCertificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, caCertificateName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -218,13 +196,15 @@ private Mono> getWithResponseAsync(String resourceG * * Get properties of a CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate on successful completion of {@link Mono}. + * @return a CA certificate. + * + * Get properties of a CA certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String namespaceName, @@ -238,43 +218,23 @@ private Mono getAsync(String resourceGroupName, String names * * Get properties of a CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate along with {@link Response}. + * @return a CA certificate. + * + * Get properties of a CA certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String caCertificateName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (caCertificateName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, caCertificateName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, namespaceName, caCertificateName, accept, context); } /** @@ -282,13 +242,15 @@ public Response getWithResponse(String resourceGroupName, St * * Get properties of a CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate. + * @return a CA certificate. + * + * Get properties of a CA certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) public CaCertificateInner get(String resourceGroupName, String namespaceName, String caCertificateName) { @@ -300,9 +262,9 @@ public CaCertificateInner get(String resourceGroupName, String namespaceName, St * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -312,36 +274,12 @@ public CaCertificateInner get(String resourceGroupName, String namespaceName, St @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (caCertificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); - } - if (caCertificateInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter caCertificateInfo is required and cannot be null.")); - } else { - caCertificateInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, caCertificateName, this.client.getApiVersion(), caCertificateInfo, - accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, contentType, + accept, caCertificateInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -350,9 +288,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -362,37 +300,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (caCertificateName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); - } - if (caCertificateInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter caCertificateInfo is required and cannot be null.")); - } else { - caCertificateInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, caCertificateName, this.client.getApiVersion(), caCertificateInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, contentType, accept, + caCertificateInfo, Context.NONE); } /** @@ -400,9 +312,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -413,37 +325,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (caCertificateName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); - } - if (caCertificateInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter caCertificateInfo is required and cannot be null.")); - } else { - caCertificateInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, caCertificateName, this.client.getApiVersion(), caCertificateInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, contentType, accept, + caCertificateInfo, context); } /** @@ -451,9 +337,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -475,9 +361,9 @@ private PollerFlux, CaCertificateInner> beginCrea * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -498,9 +384,9 @@ public SyncPoller, CaCertificateInner> beginCreat * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -522,9 +408,9 @@ public SyncPoller, CaCertificateInner> beginCreat * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -543,9 +429,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, S * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -564,9 +450,9 @@ public CaCertificateInner createOrUpdate(String resourceGroupName, String namesp * * Create or update a CA certificate with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param caCertificateName The CA certificate name. + * @param caCertificateName Name of the CA certificate. * @param caCertificateInfo CA certificate information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -586,7 +472,7 @@ public CaCertificateInner createOrUpdate(String resourceGroupName, String namesp * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -597,29 +483,9 @@ public CaCertificateInner createOrUpdate(String resourceGroupName, String namesp @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String caCertificateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (caCertificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, caCertificateName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -628,7 +494,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -639,31 +505,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String caCertificateName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (caCertificateName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, caCertificateName, this.client.getApiVersion(), accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, Context.NONE); } /** @@ -671,7 +514,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. @@ -683,31 +526,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String caCertificateName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (caCertificateName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, caCertificateName, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, context); } /** @@ -715,7 +535,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -737,7 +557,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -757,7 +577,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. @@ -779,7 +599,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -798,7 +618,7 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -815,7 +635,7 @@ public void delete(String resourceGroupName, String namespaceName, String caCert * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. @@ -833,7 +653,7 @@ public void delete(String resourceGroupName, String namespaceName, String caCert * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -845,31 +665,16 @@ public void delete(String resourceGroupName, String namespaceName, String caCert * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace along with {@link PagedResponse} on successful completion of + * @return result of the List CA Certificate operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -880,7 +685,7 @@ private Mono> listByNamespaceSinglePageAsync(S * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -892,7 +697,7 @@ private Mono> listByNamespaceSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List CA Certificate operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, @@ -906,12 +711,12 @@ private PagedFlux listByNamespaceAsync(String resourceGroupN * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List CA Certificate operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { @@ -926,7 +731,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroupN * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -938,33 +743,15 @@ private PagedFlux listByNamespaceAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace along with {@link PagedResponse}. + * @return result of the List CA Certificate operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -974,7 +761,7 @@ private PagedResponse listByNamespaceSinglePage(String resou * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -987,33 +774,15 @@ private PagedResponse listByNamespaceSinglePage(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace along with {@link PagedResponse}. + * @return result of the List CA Certificate operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1023,12 +792,12 @@ private PagedResponse listByNamespaceSinglePage(String resou * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List CA Certificate operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { @@ -1043,7 +812,7 @@ public PagedIterable listByNamespace(String resourceGroupNam * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1056,7 +825,7 @@ public PagedIterable listByNamespace(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List CA Certificate operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, @@ -1067,6 +836,8 @@ public PagedIterable listByNamespace(String resourceGroupNam } /** + * List all CA certificates under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1078,13 +849,6 @@ public PagedIterable listByNamespace(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1094,6 +858,8 @@ private Mono> listByNamespaceNextSinglePageAsy } /** + * List all CA certificates under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1104,15 +870,6 @@ private Mono> listByNamespaceNextSinglePageAsy */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1121,6 +878,8 @@ private PagedResponse listByNamespaceNextSinglePage(String n } /** + * List all CA certificates under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1132,21 +891,10 @@ private PagedResponse listByNamespaceNextSinglePage(String n */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(CaCertificatesClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java index be48d6e6ebccb..2c9ad3f449cc1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getWithResponse(String resourceGroupName, String String caCertificateName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, namespaceName, caCertificateName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CaCertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CaCertificateImpl(inner.getValue(), this.manager())); } public CaCertificate get(String resourceGroupName, String namespaceName, String caCertificateName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java index 3e1ea3a071f94..4a95a59dee0f7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 489a6e9ded94a..17e80d09bf0d7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,14 +32,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.ChannelsClient; import com.azure.resourcemanager.eventgrid.fluent.models.ChannelInner; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner; +import com.azure.resourcemanager.eventgrid.implementation.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; @@ -72,149 +71,139 @@ public final class ChannelsClientImpl implements ChannelsClient { * The interface defining all the services for EventGridManagementClientChannels to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientChannels") public interface ChannelsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("channelName") String channelName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("channelName") String channelName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ChannelInner channelInfo, @HeaderParam("Accept") String accept, + @PathParam("channelName") String channelName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ChannelInner channelInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ChannelInner channelInfo, @HeaderParam("Accept") String accept, + @PathParam("channelName") String channelName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ChannelInner channelInfo, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") - @ExpectedResponses({ 200, 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("channelName") String channelName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ChannelUpdateParameters channelUpdateParameters, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") - @ExpectedResponses({ 200, 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("channelName") String channelName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ChannelUpdateParameters channelUpdateParameters, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") - @ExpectedResponses({ 200 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ChannelUpdateParameters channelUpdateParameters, Context context); + @PathParam("channelName") String channelName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") - @ExpectedResponses({ 200 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ChannelUpdateParameters channelUpdateParameters, Context context); + @PathParam("channelName") String channelName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPartnerNamespace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByPartnerNamespace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, + @PathParam("partnerNamespaceName") String partnerNamespaceName, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByPartnerNamespaceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByPartnerNamespaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, + @PathParam("partnerNamespaceName") String partnerNamespaceName, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getFullUrl(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getFullUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("channelName") String channelName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getFullUrlSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getFullUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("channelName") String channelName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPartnerNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -222,7 +211,7 @@ Mono> listByPartnerNamespaceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByPartnerNamespaceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -231,40 +220,23 @@ Response listByPartnerNamespaceNextSync( * * Get properties of a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel along with {@link Response} on successful completion of {@link Mono}. + * @return a channel. + * + * Get properties of a channel along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String partnerNamespaceName, String channelName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, channelName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -273,13 +245,15 @@ private Mono> getWithResponseAsync(String resourceGroupNa * * Get properties of a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel on successful completion of {@link Mono}. + * @return a channel. + * + * Get properties of a channel on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String partnerNamespaceName, String channelName) { @@ -292,43 +266,23 @@ private Mono getAsync(String resourceGroupName, String partnerName * * Get properties of a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel along with {@link Response}. + * @return a channel. + * + * Get properties of a channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, channelName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, partnerNamespaceName, channelName, accept, context); } /** @@ -336,13 +290,15 @@ public Response getWithResponse(String resourceGroupName, String p * * Get properties of a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel. + * @return a channel. + * + * Get properties of a channel. */ @ServiceMethod(returns = ReturnType.SINGLE) public ChannelInner get(String resourceGroupName, String partnerNamespaceName, String channelName) { @@ -354,7 +310,7 @@ public ChannelInner get(String resourceGroupName, String partnerNamespaceName, S * * Synchronously creates or updates a new channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelInfo Channel information. @@ -366,35 +322,12 @@ public ChannelInner get(String resourceGroupName, String partnerNamespaceName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String partnerNamespaceName, String channelName, ChannelInner channelInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (channelInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter channelInfo is required and cannot be null.")); - } else { - channelInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, channelName, this.client.getApiVersion(), channelInfo, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, contentType, + accept, channelInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -403,7 +336,7 @@ private Mono> createOrUpdateWithResponseAsync(String reso * * Synchronously creates or updates a new channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelInfo Channel information. @@ -424,7 +357,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String * * Synchronously creates or updates a new channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelInfo Channel information. @@ -437,37 +370,11 @@ private Mono createOrUpdateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, ChannelInner channelInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (channelInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter channelInfo is required and cannot be null.")); - } else { - channelInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, channelName, this.client.getApiVersion(), channelInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, contentType, accept, + channelInfo, context); } /** @@ -475,7 +382,7 @@ public Response createOrUpdateWithResponse(String resourceGroupNam * * Synchronously creates or updates a new channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelInfo Channel information. @@ -491,12 +398,101 @@ public ChannelInner createOrUpdate(String resourceGroupName, String partnerNames Context.NONE).getValue(); } + /** + * Update a Channel. + * + * Synchronously updates a channel with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerNamespaceName Name of the partner namespace. + * @param channelName Name of the channel. + * @param channelUpdateParameters Channel update information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String partnerNamespaceName, + String channelName, ChannelUpdateParameters channelUpdateParameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, contentType, + channelUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a Channel. + * + * Synchronously updates a channel with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerNamespaceName Name of the partner namespace. + * @param channelName Name of the channel. + * @param channelUpdateParameters Channel update information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String partnerNamespaceName, String channelName, + ChannelUpdateParameters channelUpdateParameters) { + return updateWithResponseAsync(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Update a Channel. + * + * Synchronously updates a channel with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerNamespaceName Name of the partner namespace. + * @param channelName Name of the channel. + * @param channelUpdateParameters Channel update information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, + ChannelUpdateParameters channelUpdateParameters, Context context) { + final String contentType = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, contentType, + channelUpdateParameters, context); + } + + /** + * Update a Channel. + * + * Synchronously updates a channel with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerNamespaceName Name of the partner namespace. + * @param channelName Name of the channel. + * @param channelUpdateParameters Channel update information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void update(String resourceGroupName, String partnerNamespaceName, String channelName, + ChannelUpdateParameters channelUpdateParameters) { + updateWithResponse(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters, Context.NONE); + } + /** * Delete a channel. * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -507,28 +503,9 @@ public ChannelInner createOrUpdate(String resourceGroupName, String partnerNames @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String partnerNamespaceName, String channelName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, channelName, this.client.getApiVersion(), context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -537,7 +514,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -548,30 +525,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, channelName, this.client.getApiVersion(), Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, Context.NONE); } /** @@ -579,7 +534,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param context The context to associate with this operation. @@ -591,30 +546,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, channelName, this.client.getApiVersion(), context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, context); } /** @@ -622,7 +555,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -644,7 +577,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -664,7 +597,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param context The context to associate with this operation. @@ -686,7 +619,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -705,7 +638,7 @@ private Mono deleteAsync(String resourceGroupName, String partnerNamespace * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -722,7 +655,7 @@ public void delete(String resourceGroupName, String partnerNamespaceName, String * * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param context The context to associate with this operation. @@ -735,151 +668,12 @@ public void delete(String resourceGroupName, String partnerNamespaceName, String beginDelete(resourceGroupName, partnerNamespaceName, channelName, context).getFinalResult(); } - /** - * Update a Channel. - * - * Synchronously updates a channel with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the partners subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String partnerNamespaceName, - String channelName, ChannelUpdateParameters channelUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (channelUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter channelUpdateParameters is required and cannot be null.")); - } else { - channelUpdateParameters.validate(); - } - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, channelName, this.client.getApiVersion(), channelUpdateParameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a Channel. - * - * Synchronously updates a channel with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the partners subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters) { - return updateWithResponseAsync(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Update a Channel. - * - * Synchronously updates a channel with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the partners subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (channelUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter channelUpdateParameters is required and cannot be null.")); - } else { - channelUpdateParameters.validate(); - } - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, channelName, this.client.getApiVersion(), channelUpdateParameters, context); - } - - /** - * Update a Channel. - * - * Synchronously updates a channel with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the partners subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters) { - updateWithResponse(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters, Context.NONE); - } - /** * List channels. * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -897,27 +691,11 @@ public void update(String resourceGroupName, String partnerNamespaceName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPartnerNamespaceSinglePageAsync(String resourceGroupName, String partnerNamespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByPartnerNamespace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByPartnerNamespace(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, + filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -928,7 +706,7 @@ private Mono> listByPartnerNamespaceSinglePageAsync( * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -955,7 +733,7 @@ private PagedFlux listByPartnerNamespaceAsync(String resourceGroup * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -976,7 +754,7 @@ private PagedFlux listByPartnerNamespaceAsync(String resourceGroup * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -993,27 +771,9 @@ private PagedFlux listByPartnerNamespaceAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerNamespaceSinglePage(String resourceGroupName, String partnerNamespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByPartnerNamespaceSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1024,7 +784,7 @@ private PagedResponse listByPartnerNamespaceSinglePage(String reso * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1042,28 +802,10 @@ private PagedResponse listByPartnerNamespaceSinglePage(String reso @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerNamespaceSinglePage(String resourceGroupName, String partnerNamespaceName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByPartnerNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByPartnerNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1073,7 +815,7 @@ private PagedResponse listByPartnerNamespaceSinglePage(String reso * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1094,7 +836,7 @@ public PagedIterable listByPartnerNamespace(String resourceGroupNa * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1122,41 +864,24 @@ public PagedIterable listByPartnerNamespace(String resourceGroupNa * * Get the full endpoint URL of a partner destination channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the Channel. + * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel along with {@link Response} on successful - * completion of {@link Mono}. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getFullUrlWithResponseAsync(String resourceGroupName, String partnerNamespaceName, String channelName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, channelName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1165,13 +890,15 @@ private Mono> getFullUrlWithResponseAsyn * * Get the full endpoint URL of a partner destination channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the Channel. + * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel on successful completion of {@link Mono}. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getFullUrlAsync(String resourceGroupName, String partnerNamespaceName, @@ -1185,43 +912,23 @@ private Mono getFullUrlAsync(String resourceGroup * * Get the full endpoint URL of a partner destination channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the Channel. + * @param channelName Name of the channel. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel along with {@link Response}. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (channelName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getFullUrlSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, channelName, this.client.getApiVersion(), accept, context); + return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, accept, context); } /** @@ -1229,13 +936,15 @@ public Response getFullUrlWithResponse(String res * * Get the full endpoint URL of a partner destination channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the Channel. + * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel. */ @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerNamespaceName, @@ -1244,6 +953,8 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String } /** + * List channels. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1255,13 +966,6 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPartnerNamespaceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1272,6 +976,8 @@ private Mono> listByPartnerNamespaceNextSinglePageAs } /** + * List channels. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1282,15 +988,6 @@ private Mono> listByPartnerNamespaceNextSinglePageAs */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerNamespaceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByPartnerNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1299,6 +996,8 @@ private PagedResponse listByPartnerNamespaceNextSinglePage(String } /** + * List channels. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1310,21 +1009,10 @@ private PagedResponse listByPartnerNamespaceNextSinglePage(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerNamespaceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByPartnerNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ChannelsClientImpl.class); } 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 6062d81c5611f..1e17fb1b74f96 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -34,12 +34,8 @@ public Response getWithResponse(String resourceGroupName, String partne Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, partnerNamespaceName, channelName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ChannelImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ChannelImpl(inner.getValue(), this.manager())); } public Channel get(String resourceGroupName, String partnerNamespaceName, String channelName) { @@ -51,14 +47,6 @@ public Channel get(String resourceGroupName, String partnerNamespaceName, String } } - public void delete(String resourceGroupName, String partnerNamespaceName, String channelName) { - this.serviceClient().delete(resourceGroupName, partnerNamespaceName, channelName); - } - - public void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { - this.serviceClient().delete(resourceGroupName, partnerNamespaceName, channelName, context); - } - public Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, ChannelUpdateParameters channelUpdateParameters, Context context) { return this.serviceClient() @@ -70,6 +58,14 @@ public void update(String resourceGroupName, String partnerNamespaceName, String this.serviceClient().update(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters); } + public void delete(String resourceGroupName, String partnerNamespaceName, String channelName) { + this.serviceClient().delete(resourceGroupName, partnerNamespaceName, channelName); + } + + public void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { + this.serviceClient().delete(resourceGroupName, partnerNamespaceName, channelName, context); + } + public PagedIterable listByPartnerNamespace(String resourceGroupName, String partnerNamespaceName) { PagedIterable inner = this.serviceClient().listByPartnerNamespace(resourceGroupName, partnerNamespaceName); @@ -87,12 +83,8 @@ public Response getFullUrlWithResponse(String resource String partnerNamespaceName, String channelName, Context context) { Response inner = this.serviceClient() .getFullUrlWithResponse(resourceGroupName, partnerNamespaceName, channelName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); } public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerNamespaceName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java index 0f3ccbdf0cbf3..87f96b8fedc37 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 084e8afa0e9ad..10eda61709073 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient; import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; -import com.azure.resourcemanager.eventgrid.models.ClientGroupsListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.ClientGroupsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,97 +68,93 @@ public final class ClientGroupsClientImpl implements ClientGroupsClient { * The interface defining all the services for EventGridManagementClientClientGroups to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientClientGroups") public interface ClientGroupsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientGroupName") String clientGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("clientGroupName") String clientGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientGroupName") String clientGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("clientGroupName") String clientGroupName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientGroupName") String clientGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClientGroupInner clientGroupInfo, @HeaderParam("Accept") String accept, + @PathParam("clientGroupName") String clientGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ClientGroupInner clientGroupInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientGroupName") String clientGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClientGroupInner clientGroupInfo, @HeaderParam("Accept") String accept, + @PathParam("clientGroupName") String clientGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ClientGroupInner clientGroupInfo, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientGroupName") String clientGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("clientGroupName") String clientGroupName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientGroupName") String clientGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("clientGroupName") String clientGroupName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByNamespaceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByNamespaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -167,7 +162,7 @@ Mono> listByNamespaceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByNamespaceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -176,40 +171,23 @@ Response listByNamespaceNextSync( * * Get properties of a client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group along with {@link Response} on successful completion of {@link Mono}. + * @return a client group. + * + * Get properties of a client group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String clientGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, clientGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -218,13 +196,15 @@ private Mono> getWithResponseAsync(String resourceGro * * Get properties of a client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group on successful completion of {@link Mono}. + * @return a client group. + * + * Get properties of a client group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String namespaceName, String clientGroupName) { @@ -237,43 +217,23 @@ private Mono getAsync(String resourceGroupName, String namespa * * Get properties of a client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group along with {@link Response}. + * @return a client group. + * + * Get properties of a client group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String clientGroupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientGroupName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, namespaceName, clientGroupName, accept, context); } /** @@ -281,13 +241,15 @@ public Response getWithResponse(String resourceGroupName, Stri * * Get properties of a client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group. + * @return a client group. + * + * Get properties of a client group. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClientGroupInner get(String resourceGroupName, String namespaceName, String clientGroupName) { @@ -299,9 +261,9 @@ public ClientGroupInner get(String resourceGroupName, String namespaceName, Stri * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -311,36 +273,12 @@ public ClientGroupInner get(String resourceGroupName, String namespaceName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); - } - if (clientGroupInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter clientGroupInfo is required and cannot be null.")); - } else { - clientGroupInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, clientGroupName, this.client.getApiVersion(), clientGroupInfo, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, contentType, accept, + clientGroupInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -349,9 +287,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -361,37 +299,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); - } - if (clientGroupInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientGroupInfo is required and cannot be null.")); - } else { - clientGroupInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientGroupName, this.client.getApiVersion(), clientGroupInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, contentType, accept, + clientGroupInfo, Context.NONE); } /** @@ -399,9 +311,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -412,37 +324,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); - } - if (clientGroupInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientGroupInfo is required and cannot be null.")); - } else { - clientGroupInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientGroupName, this.client.getApiVersion(), clientGroupInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, contentType, accept, + clientGroupInfo, context); } /** @@ -450,9 +336,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -473,9 +359,9 @@ private PollerFlux, ClientGroupInner> beginCreateOr * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -496,9 +382,9 @@ public SyncPoller, ClientGroupInner> beginCreateOrU * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -520,9 +406,9 @@ public SyncPoller, ClientGroupInner> beginCreateOrU * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -541,9 +427,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -561,9 +447,9 @@ public ClientGroupInner createOrUpdate(String resourceGroupName, String namespac * * Create or update a client group with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientGroupName The client group name. + * @param clientGroupName Name of the client group. * @param clientGroupInfo Client group information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -583,7 +469,7 @@ public ClientGroupInner createOrUpdate(String resourceGroupName, String namespac * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -594,29 +480,9 @@ public ClientGroupInner createOrUpdate(String resourceGroupName, String namespac @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String clientGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, clientGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -625,7 +491,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -636,31 +502,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String clientGroupName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientGroupName, this.client.getApiVersion(), accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, Context.NONE); } /** @@ -668,7 +511,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. @@ -680,31 +523,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String clientGroupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientGroupName, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, context); } /** @@ -712,7 +532,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -734,7 +554,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -754,7 +574,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. @@ -775,7 +595,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -794,7 +614,7 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -811,7 +631,7 @@ public void delete(String resourceGroupName, String namespaceName, String client * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. @@ -829,7 +649,7 @@ public void delete(String resourceGroupName, String namespaceName, String client * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -841,31 +661,16 @@ public void delete(String resourceGroupName, String namespaceName, String client * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace along with {@link PagedResponse} on successful completion of + * @return result of the List Client Group operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -876,7 +681,7 @@ private Mono> listByNamespaceSinglePageAsync(Str * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -888,7 +693,7 @@ private Mono> listByNamespaceSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List Client Group operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, @@ -902,12 +707,12 @@ private PagedFlux listByNamespaceAsync(String resourceGroupNam * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List Client Group operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { @@ -922,7 +727,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroupNam * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -934,33 +739,15 @@ private PagedFlux listByNamespaceAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace along with {@link PagedResponse}. + * @return result of the List Client Group operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -970,7 +757,7 @@ private PagedResponse listByNamespaceSinglePage(String resourc * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -983,33 +770,15 @@ private PagedResponse listByNamespaceSinglePage(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace along with {@link PagedResponse}. + * @return result of the List Client Group operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1019,12 +788,12 @@ private PagedResponse listByNamespaceSinglePage(String resourc * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client Group operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { @@ -1039,7 +808,7 @@ public PagedIterable listByNamespace(String resourceGroupName, * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1052,7 +821,7 @@ public PagedIterable listByNamespace(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client Group operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, @@ -1063,6 +832,8 @@ public PagedIterable listByNamespace(String resourceGroupName, } /** + * List all client groups under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1074,13 +845,6 @@ public PagedIterable listByNamespace(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1090,6 +854,8 @@ private Mono> listByNamespaceNextSinglePageAsync } /** + * List all client groups under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1100,15 +866,6 @@ private Mono> listByNamespaceNextSinglePageAsync */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1117,6 +874,8 @@ private PagedResponse listByNamespaceNextSinglePage(String nex } /** + * List all client groups under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1128,21 +887,10 @@ private PagedResponse listByNamespaceNextSinglePage(String nex */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ClientGroupsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java index 64451dcba1c57..3f6027ec143a4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getWithResponse(String resourceGroupName, String na Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, namespaceName, clientGroupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClientGroupImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ClientGroupImpl(inner.getValue(), this.manager())); } public ClientGroup get(String resourceGroupName, String namespaceName, String clientGroupName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java index b6e9ef2d7ac08..c30df960220c9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 97a37df3aad0c..7b1e73983c9f9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.ClientsClient; import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; -import com.azure.resourcemanager.eventgrid.models.ClientsListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.ClientsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,97 +67,91 @@ public final class ClientsClientImpl implements ClientsClient { * The interface defining all the services for EventGridManagementClientClients to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientClients") public interface ClientsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientName") String clientName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("clientName") String clientName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientName") String clientName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("clientName") String clientName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientName") String clientName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClientInner clientInfo, @HeaderParam("Accept") String accept, + @PathParam("clientName") String clientName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ClientInner clientInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientName") String clientName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClientInner clientInfo, @HeaderParam("Accept") String accept, + @PathParam("clientName") String clientName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ClientInner clientInfo, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientName") String clientName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("clientName") String clientName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("clientName") String clientName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("clientName") String clientName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByNamespaceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByNamespaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -166,7 +159,7 @@ Mono> listByNamespaceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByNamespaceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -175,39 +168,23 @@ Response listByNamespaceNextSync( * * Get properties of a client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client along with {@link Response} on successful completion of {@link Mono}. + * @return a client. + * + * Get properties of a client along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String clientName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientName == null) { - return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, clientName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -216,13 +193,15 @@ private Mono> getWithResponseAsync(String resourceGroupNam * * Get properties of a client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client on successful completion of {@link Mono}. + * @return a client. + * + * Get properties of a client on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String namespaceName, String clientName) { @@ -235,43 +214,23 @@ private Mono getAsync(String resourceGroupName, String namespaceNam * * Get properties of a client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client along with {@link Response}. + * @return a client. + * + * Get properties of a client along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String clientName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, namespaceName, clientName, accept, context); } /** @@ -279,13 +238,15 @@ public Response getWithResponse(String resourceGroupName, String na * * Get properties of a client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client. + * @return a client. + * + * Get properties of a client. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClientInner get(String resourceGroupName, String namespaceName, String clientName) { @@ -297,9 +258,9 @@ public ClientInner get(String resourceGroupName, String namespaceName, String cl * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -309,33 +270,12 @@ public ClientInner get(String resourceGroupName, String namespaceName, String cl @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientName == null) { - return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); - } - if (clientInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter clientInfo is required and cannot be null.")); - } else { - clientInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, clientName, this.client.getApiVersion(), clientInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, contentType, accept, + clientInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -344,9 +284,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -356,37 +296,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); - } - if (clientInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientInfo is required and cannot be null.")); - } else { - clientInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientName, this.client.getApiVersion(), clientInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, contentType, accept, + clientInfo, Context.NONE); } /** @@ -394,9 +308,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -407,37 +321,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); - } - if (clientInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientInfo is required and cannot be null.")); - } else { - clientInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientName, this.client.getApiVersion(), clientInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, contentType, accept, + clientInfo, context); } /** @@ -445,9 +333,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -468,9 +356,9 @@ private PollerFlux, ClientInner> beginCreateOrUpdateAsyn * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -491,9 +379,9 @@ public SyncPoller, ClientInner> beginCreateOrUpdate(Stri * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -515,9 +403,9 @@ public SyncPoller, ClientInner> beginCreateOrUpdate(Stri * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -536,9 +424,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, String n * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -556,9 +444,9 @@ public ClientInner createOrUpdate(String resourceGroupName, String namespaceName * * Create or update a client with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param clientName The client name. + * @param clientName Name of the client. * @param clientInfo Client information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -577,7 +465,7 @@ public ClientInner createOrUpdate(String resourceGroupName, String namespaceName * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -588,28 +476,9 @@ public ClientInner createOrUpdate(String resourceGroupName, String namespaceName @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String clientName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientName == null) { - return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, clientName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -618,7 +487,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -628,31 +497,8 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String clientName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientName, this.client.getApiVersion(), accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, Context.NONE); } /** @@ -660,7 +506,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. @@ -672,31 +518,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String clientName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (clientName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, clientName, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, context); } /** @@ -704,7 +527,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -725,7 +548,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -745,7 +568,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. @@ -766,7 +589,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -785,7 +608,7 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -802,7 +625,7 @@ public void delete(String resourceGroupName, String namespaceName, String client * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. @@ -820,7 +643,7 @@ public void delete(String resourceGroupName, String namespaceName, String client * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -832,31 +655,16 @@ public void delete(String resourceGroupName, String namespaceName, String client * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return result of the List Client operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -867,7 +675,7 @@ private Mono> listByNamespaceSinglePageAsync(String r * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -879,7 +687,7 @@ private Mono> listByNamespaceSinglePageAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List Client operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, String filter, @@ -893,12 +701,12 @@ private PagedFlux listByNamespaceAsync(String resourceGroupName, St * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List Client operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { @@ -913,7 +721,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroupName, St * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -925,33 +733,15 @@ private PagedFlux listByNamespaceAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace along with {@link PagedResponse}. + * @return result of the List Client operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -961,7 +751,7 @@ private PagedResponse listByNamespaceSinglePage(String resourceGrou * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -974,33 +764,15 @@ private PagedResponse listByNamespaceSinglePage(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace along with {@link PagedResponse}. + * @return result of the List Client operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1010,12 +782,12 @@ private PagedResponse listByNamespaceSinglePage(String resourceGrou * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { @@ -1030,7 +802,7 @@ public PagedIterable listByNamespace(String resourceGroupName, Stri * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1043,7 +815,7 @@ public PagedIterable listByNamespace(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, @@ -1054,6 +826,8 @@ public PagedIterable listByNamespace(String resourceGroupName, Stri } /** + * List all permission bindings under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1065,13 +839,6 @@ public PagedIterable listByNamespace(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1081,6 +848,8 @@ private Mono> listByNamespaceNextSinglePageAsync(Stri } /** + * List all permission bindings under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1091,15 +860,6 @@ private Mono> listByNamespaceNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1108,6 +868,8 @@ private PagedResponse listByNamespaceNextSinglePage(String nextLink } /** + * List all permission bindings under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1119,21 +881,10 @@ private PagedResponse listByNamespaceNextSinglePage(String nextLink */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ClientsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java index 2fac7ed086611..15f9c01ee334b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -30,12 +30,8 @@ public Response getWithResponse(String resourceGroupName, String namespa Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, namespaceName, clientName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClientImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ClientImpl(inner.getValue(), this.manager())); } public Client get(String resourceGroupName, String namespaceName, String clientName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CustomDomainOwnershipValidationResultImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CustomDomainOwnershipValidationResultImpl.java index 44f8ca18af73b..7c09615e214c9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CustomDomainOwnershipValidationResultImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CustomDomainOwnershipValidationResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DeliveryAttributeListResultImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DeliveryAttributeListResultImpl.java index aac4005a1e618..510830f57e029 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DeliveryAttributeListResultImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DeliveryAttributeListResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 2a8d5ebf051d6..a76b5615cd94b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient; 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.implementation.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; @@ -74,163 +73,155 @@ public final class DomainEventSubscriptionsClientImpl implements DomainEventSubs * The interface defining all the services for EventGridManagementClientDomainEventSubscriptions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientDomainEventSubscriptions") public interface DomainEventSubscriptionsService { @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getDeliveryAttributesSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 201 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 201 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getFullUrl(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getDeliveryAttributes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getFullUrlSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getDeliveryAttributesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getFullUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getFullUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -238,178 +229,33 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String domainName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getDeliveryAttributes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync(String resourceGroupName, - String domainName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, - String eventSubscriptionName) { - return getDeliveryAttributesWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE) - .getValue(); - } - /** * Get an event subscription of a domain. * * Get properties of an event subscription of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a domain along with {@link Response} on successful completion of + * @return an event subscription of a domain. + * + * Get properties of an event subscription of a domain along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String domainName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -418,13 +264,15 @@ private Mono> getWithResponseAsync(String resou * * Get properties of an event subscription of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a domain on successful completion of {@link Mono}. + * @return an event subscription of a domain. + * + * Get properties of an event subscription of a domain on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String domainName, @@ -438,43 +286,23 @@ private Mono getAsync(String resourceGroupName, String d * * Get properties of an event subscription of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a domain along with {@link Response}. + * @return an event subscription of a domain. + * + * Get properties of an event subscription of a domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, domainName, eventSubscriptionName, accept, context); } /** @@ -482,13 +310,15 @@ public Response getWithResponse(String resourceGroupName * * Get properties of an event subscription of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a domain. + * @return an event subscription of a domain. + * + * Get properties of an event subscription of a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String domainName, String eventSubscriptionName) { @@ -500,10 +330,9 @@ public EventSubscriptionInner get(String resourceGroupName, String domainName, S * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -513,36 +342,12 @@ public EventSubscriptionInner get(String resourceGroupName, String domainName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, contentType, + accept, eventSubscriptionInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -551,10 +356,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -564,38 +368,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, contentType, accept, + eventSubscriptionInfo, Context.NONE); } /** @@ -603,10 +380,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -617,37 +393,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, contentType, accept, + eventSubscriptionInfo, context); } /** @@ -655,10 +405,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -681,10 +430,9 @@ private PollerFlux, EventSubscriptionInner> b * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -706,10 +454,9 @@ public SyncPoller, EventSubscriptionInner> be * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -732,10 +479,9 @@ public SyncPoller, EventSubscriptionInner> be * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -755,10 +501,9 @@ private Mono createOrUpdateAsync(String resourceGroupNam * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -777,10 +522,9 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String do * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -796,668 +540,399 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String do } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String domainName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String domainName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, eventSubscriptionName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, contentType, + accept, eventSubscriptionUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String domainName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, eventSubscriptionName, this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, contentType, accept, + eventSubscriptionUpdateParameters, Context.NONE); } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String domainName, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, eventSubscriptionName, this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, contentType, accept, + eventSubscriptionUpdateParameters, context); } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String domainName, - String eventSubscriptionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, EventSubscriptionInner> beginUpdateAsync( + String resourceGroupName, String domainName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, domainName, + eventSubscriptionName, eventSubscriptionUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, this.client.getContext()); } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, - String eventSubscriptionName) { - Response response = deleteWithResponse(resourceGroupName, domainName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String domainName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, domainName, eventSubscriptionName, + eventSubscriptionUpdateParameters); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, - String eventSubscriptionName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, domainName, eventSubscriptionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String domainName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, domainName, eventSubscriptionName, + eventSubscriptionUpdateParameters, context); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, context); } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return event Subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String domainName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, domainName, eventSubscriptionName).last() + private Mono updateAsync(String resourceGroupName, String domainName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdateAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String domainName, String eventSubscriptionName) { - beginDelete(resourceGroupName, domainName, eventSubscriptionName).getFinalResult(); + public EventSubscriptionInner update(String resourceGroupName, String domainName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters) + .getFinalResult(); } /** - * Delete an event subscription for a domain. + * Update an event subscription for a domain. * - * Delete an existing event subscription for a domain. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { - beginDelete(resourceGroupName, domainName, eventSubscriptionName, context).getFinalResult(); + public EventSubscriptionInner update(String resourceGroupName, String domainName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, + context).getFinalResult(); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String domainName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String domainName, + String eventSubscriptionName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String domainName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionUpdateParameters, accept, - Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, Context.NONE); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String domainName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionUpdateParameters, accept, - context); + private Response deleteWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, context); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Subscription. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EventSubscriptionInner> beginUpdateAsync( - String resourceGroupName, String domainName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, domainName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String domainName, + String eventSubscriptionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String domainName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, domainName, eventSubscriptionName, - eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, + String eventSubscriptionName) { + Response response = deleteWithResponse(resourceGroupName, domainName, eventSubscriptionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String domainName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, domainName, eventSubscriptionName, - eventSubscriptionUpdateParameters, context); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, + String eventSubscriptionName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, domainName, eventSubscriptionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String domainName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters) - .last() + private Mono deleteAsync(String resourceGroupName, String domainName, String eventSubscriptionName) { + return beginDeleteAsync(resourceGroupName, domainName, eventSubscriptionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner update(String resourceGroupName, String domainName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters) - .getFinalResult(); + public void delete(String resourceGroupName, String domainName, String eventSubscriptionName) { + beginDelete(resourceGroupName, domainName, eventSubscriptionName).getFinalResult(); } /** - * Update an event subscription for a domain. + * Delete an event subscription for a domain. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner update(String resourceGroupName, String domainName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, - context).getFinalResult(); - } - - /** - * Get full URL of an event subscription for domain. - * - * Get the full endpoint URL for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for domain along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getFullUrlWithResponseAsync(String resourceGroupName, - String domainName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get full URL of an event subscription for domain. - * - * Get the full endpoint URL for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for domain on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getFullUrlAsync(String resourceGroupName, String domainName, - String eventSubscriptionName) { - return getFullUrlWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get full URL of an event subscription for domain. - * - * Get the full endpoint URL for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse(String resourceGroupName, String domainName, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getFullUrlSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get full URL of an event subscription for domain. - * - * Get the full endpoint URL for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, - String eventSubscriptionName) { - return getFullUrlWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE).getValue(); + public void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { + beginDelete(resourceGroupName, domainName, eventSubscriptionName, context).getFinalResult(); } /** @@ -1465,7 +940,7 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1483,25 +958,10 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String domainName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1512,7 +972,7 @@ private Mono> listSinglePageAsync(String r * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1538,7 +998,7 @@ private PagedFlux listAsync(String resourceGroupName, St * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1558,7 +1018,7 @@ private PagedFlux listAsync(String resourceGroupName, St * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1575,28 +1035,10 @@ private PagedFlux listAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String domainName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, domainName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1606,7 +1048,7 @@ private PagedResponse listSinglePage(String resourceGrou * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1624,28 +1066,10 @@ private PagedResponse listSinglePage(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String domainName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), filter, top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, domainName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1655,7 +1079,7 @@ private PagedResponse listSinglePage(String resourceGrou * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1675,7 +1099,7 @@ public PagedIterable list(String resourceGroupName, Stri * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1698,6 +1122,196 @@ public PagedIterable list(String resourceGroupName, Stri } /** + * Get delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String domainName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, domainName, + eventSubscriptionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync(String resourceGroupName, + String domainName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, accept, context); + } + + /** + * Get delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, + String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE) + .getValue(); + } + + /** + * Get full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFullUrlWithResponseAsync(String resourceGroupName, + String domainName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFullUrlAsync(String resourceGroupName, String domainName, + String eventSubscriptionName) { + return getFullUrlWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFullUrlWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, accept, context); + } + + /** + * Get full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, + String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE).getValue(); + } + + /** + * List all event subscriptions for a specific domain. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1709,13 +1323,6 @@ public PagedIterable list(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -1724,6 +1331,8 @@ private Mono> listNextSinglePageAsync(Stri } /** + * List all event subscriptions for a specific domain. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1734,15 +1343,6 @@ private Mono> listNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1751,6 +1351,8 @@ private PagedResponse listNextSinglePage(String nextLink } /** + * List all event subscriptions for a specific domain. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1762,21 +1364,10 @@ private PagedResponse listNextSinglePage(String nextLink */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DomainEventSubscriptionsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java index cdbab63dde820..2566f9f7e1bc3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,39 +32,12 @@ public DomainEventSubscriptionsImpl(DomainEventSubscriptionsClient innerClient, this.serviceManager = serviceManager; } - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getDeliveryAttributesWithResponse(resourceGroupName, domainName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, - String eventSubscriptionName) { - DeliveryAttributeListResultInner inner - = this.serviceClient().getDeliveryAttributes(resourceGroupName, domainName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, domainName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionImpl(inner.getValue(), this.manager())); } public EventSubscription get(String resourceGroupName, String domainName, String eventSubscriptionName) { @@ -98,14 +71,6 @@ public EventSubscription createOrUpdate(String resourceGroupName, String domainN } } - public void delete(String resourceGroupName, String domainName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, domainName, eventSubscriptionName); - } - - public void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { - this.serviceClient().delete(resourceGroupName, domainName, eventSubscriptionName, context); - } - public EventSubscription update(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { EventSubscriptionInner inner = this.serviceClient() @@ -128,18 +93,53 @@ public EventSubscription update(String resourceGroupName, String domainName, Str } } - public Response getFullUrlWithResponse(String resourceGroupName, String domainName, - String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getFullUrlWithResponse(resourceGroupName, domainName, eventSubscriptionName, context); + public void delete(String resourceGroupName, String domainName, String eventSubscriptionName) { + this.serviceClient().delete(resourceGroupName, domainName, eventSubscriptionName); + } + + public void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { + this.serviceClient().delete(resourceGroupName, domainName, eventSubscriptionName, context); + } + + public PagedIterable list(String resourceGroupName, String domainName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, domainName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String domainName, String filter, + Integer top, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, domainName, filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getDeliveryAttributesWithResponse(resourceGroupName, domainName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } + + public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, + String eventSubscriptionName) { + DeliveryAttributeListResultInner inner + = this.serviceClient().getDeliveryAttributes(resourceGroupName, domainName, eventSubscriptionName); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + return new DeliveryAttributeListResultImpl(inner, this.manager()); } else { return null; } } + public Response getFullUrlWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getFullUrlWithResponse(resourceGroupName, domainName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + } + public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName) { EventSubscriptionFullUrlInner inner @@ -151,18 +151,6 @@ public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String doma } } - public PagedIterable list(String resourceGroupName, String domainName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, domainName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String domainName, String filter, - Integer top, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, domainName, filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - private DomainEventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java index cd7df8c4f8368..fcd3f756ac496 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainSharedAccessKeysImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainSharedAccessKeysImpl.java index d07ad084a7035..4c9a248bacee6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainSharedAccessKeysImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainSharedAccessKeysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 e770de2a6e374..af7fefc619c0c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient; 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.implementation.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; @@ -74,165 +73,157 @@ public final class DomainTopicEventSubscriptionsClientImpl implements DomainTopi * The interface defining all the services for EventGridManagementClientDomainTopicEventSubscriptions to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientDomainTopicEventSubscriptions") public interface DomainTopicEventSubscriptionsService { @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getDeliveryAttributesSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 201 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 201 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicName") String topicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicName") String topicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getFullUrl(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getDeliveryAttributes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getFullUrlSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getDeliveryAttributesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getFullUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getFullUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -240,196 +231,35 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, - context); - } - - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, - Context.NONE).getValue(); - } - /** * Get a nested event subscription for domain topic. * * Get properties of a nested event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a nested event subscription for a domain topic along with {@link Response} on successful + * @return a nested event subscription for domain topic. + * + * Get properties of a nested event subscription for a domain topic along with {@link Response} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -438,14 +268,16 @@ private Mono> getWithResponseAsync(String resou * * Get properties of a nested event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a nested event subscription for a domain topic on successful completion of {@link Mono}. + * @return a nested event subscription for domain topic. + * + * Get properties of a nested event subscription for a domain topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String domainName, String topicName, @@ -459,7 +291,7 @@ private Mono getAsync(String resourceGroupName, String d * * Get properties of a nested event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription to be found. @@ -467,40 +299,16 @@ private Mono getAsync(String resourceGroupName, String d * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a nested event subscription for a domain topic along with {@link Response}. + * @return a nested event subscription for domain topic. + * + * Get properties of a nested event subscription for a domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, domainName, topicName, eventSubscriptionName, accept, context); } /** @@ -508,14 +316,16 @@ public Response getWithResponse(String resourceGroupName * * Get properties of a nested event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a nested event subscription for a domain topic. + * @return a nested event subscription for domain topic. + * + * Get properties of a nested event subscription for a domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String domainName, String topicName, @@ -529,11 +339,10 @@ public EventSubscriptionInner get(String resourceGroupName, String domainName, S * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -544,39 +353,12 @@ public EventSubscriptionInner get(String resourceGroupName, String domainName, S private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -585,11 +367,10 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -599,42 +380,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionInfo, Context.NONE); } /** @@ -642,11 +392,10 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -657,42 +406,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionInfo, context); } /** @@ -700,11 +418,10 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -727,11 +444,10 @@ private PollerFlux, EventSubscriptionInner> b * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -753,11 +469,10 @@ public SyncPoller, EventSubscriptionInner> be * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -780,11 +495,10 @@ public SyncPoller, EventSubscriptionInner> be * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -803,11 +517,10 @@ private Mono createOrUpdateAsync(String resourceGroupNam * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -826,11 +539,10 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String do * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -846,726 +558,421 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String do } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, Context.NONE); } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, context); } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, EventSubscriptionInner> beginUpdateAsync( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, domainName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, this.client.getContext()); } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName) { - Response response - = deleteWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, domainName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } + public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, domainName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters, context); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, context); + } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return event Subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, domainName, topicName, eventSubscriptionName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdateAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, domainName, topicName, eventSubscriptionName).getFinalResult(); + public EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters).getFinalResult(); } /** - * Delete a nested event subscription for a domain topic. + * Update a nested event subscription for a domain topic. * - * Delete a nested existing event subscription for a domain topic. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, + public EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - beginDelete(resourceGroupName, domainName, topicName, eventSubscriptionName, context).getFinalResult(); + return beginUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, context).getFinalResult(); } /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context)) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + Context.NONE); } /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, context); } /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Subscription. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EventSubscriptionInner> beginUpdateAsync( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, domainName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, domainName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName) { + Response response + = deleteWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a nested event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. * - * Update an existing event subscription for a domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, domainName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters, context); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, context); - } - - /** - * Update a nested event subscription for a domain topic. - * - * Update an existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a nested event subscription for a domain topic. - * - * Update an existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters).getFinalResult(); - } - - /** - * Update a nested event subscription for a domain topic. - * - * Update an existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - Context context) { - return beginUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters, context).getFinalResult(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Get full URL of a nested event subscription for domain topic. + * Delete a nested event subscription for a domain topic. * - * Get the full endpoint URL for a nested event subscription for domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for a nested event subscription for domain topic along with {@link Response} on - * successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getFullUrlWithResponseAsync(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName) { + return beginDeleteAsync(resourceGroupName, domainName, topicName, eventSubscriptionName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get full URL of a nested event subscription for domain topic. + * Delete a nested event subscription for a domain topic. * - * Get the full endpoint URL for a nested event subscription for domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for a nested event subscription for domain topic on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getFullUrlAsync(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName) { - return getFullUrlWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + beginDelete(resourceGroupName, domainName, topicName, eventSubscriptionName).getFinalResult(); } /** - * Get full URL of a nested event subscription for domain topic. + * Delete a nested event subscription for a domain topic. * - * Get the full endpoint URL for a nested event subscription for domain topic. + * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getFullUrlSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get full URL of a nested event subscription for domain topic. - * - * Get the full endpoint URL for a nested event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for a nested event subscription for domain topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName) { - return getFullUrlWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE) - .getValue(); + public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, + Context context) { + beginDelete(resourceGroupName, domainName, topicName, eventSubscriptionName, context).getFinalResult(); } /** @@ -1573,7 +980,7 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String * * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1592,28 +999,9 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String domainName, String topicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, this.client.getApiVersion(), filter, top, accept, context)) + return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1624,7 +1012,7 @@ private Mono> listSinglePageAsync(String r * * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1651,7 +1039,7 @@ private PagedFlux listAsync(String resourceGroupName, St * * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1672,7 +1060,7 @@ private PagedFlux listAsync(String resourceGroupName, St * * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1690,32 +1078,10 @@ private PagedFlux listAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String domainName, String topicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, domainName, topicName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1725,7 +1091,7 @@ private PagedResponse listSinglePage(String resourceGrou * * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1744,32 +1110,10 @@ private PagedResponse listSinglePage(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, topicName, this.client.getApiVersion(), filter, top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, domainName, topicName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1779,7 +1123,7 @@ private PagedResponse listSinglePage(String resourceGrou * * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1800,7 +1144,7 @@ public PagedIterable list(String resourceGroupName, Stri * * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1824,6 +1168,209 @@ public PagedIterable list(String resourceGroupName, Stri } /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, + eventSubscriptionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, accept, + context); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, + Context.NONE).getValue(); + } + + /** + * Get full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFullUrlWithResponseAsync(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFullUrlAsync(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName) { + return getFullUrlWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFullUrlWithResponse(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, accept, + context); + } + + /** + * Get full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); + } + + /** + * List all nested event subscriptions for a specific domain topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1835,13 +1382,6 @@ public PagedIterable list(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -1850,6 +1390,8 @@ private Mono> listNextSinglePageAsync(Stri } /** + * List all nested event subscriptions for a specific domain topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1860,15 +1402,6 @@ private Mono> listNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1877,6 +1410,8 @@ private PagedResponse listNextSinglePage(String nextLink } /** + * List all nested event subscriptions for a specific domain topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1888,21 +1423,10 @@ private PagedResponse listNextSinglePage(String nextLink */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DomainTopicEventSubscriptionsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java index b1edf8ed312da..4c85015d36bf9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,40 +32,12 @@ public DomainTopicEventSubscriptionsImpl(DomainTopicEventSubscriptionsClient inn this.serviceManager = serviceManager; } - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String domainName, String topicName, String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getDeliveryAttributesWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner = this.serviceClient() - .getDeliveryAttributes(resourceGroupName, domainName, topicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionImpl(inner.getValue(), this.manager())); } public EventSubscription get(String resourceGroupName, String domainName, String topicName, @@ -102,15 +74,6 @@ public EventSubscription createOrUpdate(String resourceGroupName, String domainN } } - public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, domainName, topicName, eventSubscriptionName); - } - - public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, - Context context) { - this.serviceClient().delete(resourceGroupName, domainName, topicName, eventSubscriptionName, context); - } - public EventSubscription update(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { EventSubscriptionInner inner = this.serviceClient() @@ -135,27 +98,13 @@ public EventSubscription update(String resourceGroupName, String domainName, Str } } - public Response getFullUrlWithResponse(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getFullUrlWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + this.serviceClient().delete(resourceGroupName, domainName, topicName, eventSubscriptionName); } - public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName) { - EventSubscriptionFullUrlInner inner - = this.serviceClient().getFullUrl(resourceGroupName, domainName, topicName, eventSubscriptionName); - if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, + Context context) { + this.serviceClient().delete(resourceGroupName, domainName, topicName, eventSubscriptionName, context); } public PagedIterable list(String resourceGroupName, String domainName, String topicName) { @@ -171,6 +120,45 @@ public PagedIterable list(String resourceGroupName, String do return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String domainName, String topicName, String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getDeliveryAttributesWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, + context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } + + public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner = this.serviceClient() + .getDeliveryAttributes(resourceGroupName, domainName, topicName, eventSubscriptionName); + if (inner != null) { + return new DeliveryAttributeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getFullUrlWithResponse(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getFullUrlWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + } + + public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName) { + EventSubscriptionFullUrlInner inner + = this.serviceClient().getFullUrl(resourceGroupName, domainName, topicName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionFullUrlImpl(inner, this.manager()); + } else { + return null; + } + } + private DomainTopicEventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicImpl.java index 64b41275bc06b..6c88388add583 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 ed08a07bf7742..d0612d407ac1b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -29,12 +29,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.DomainTopicInner; -import com.azure.resourcemanager.eventgrid.models.DomainTopicsListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.DomainTopicsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,95 +67,93 @@ public final class DomainTopicsClientImpl implements DomainTopicsClient { * The interface defining all the services for EventGridManagementClientDomainTopics to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientDomainTopics") public interface DomainTopicsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("domainTopicName") String domainTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("domainTopicName") String domainTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("domainTopicName") String domainTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("domainTopicName") String domainTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("domainTopicName") String domainTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("domainTopicName") String domainTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("domainTopicName") String domainTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("domainTopicName") String domainTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("domainTopicName") String domainTopicName, @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("domainTopicName") String domainTopicName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("domainTopicName") String domainTopicName, @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("domainTopicName") String domainTopicName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDomain(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByDomain(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByDomainSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByDomainSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDomainNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -164,7 +161,7 @@ Mono> listByDomainNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByDomainNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -173,40 +170,23 @@ Response listByDomainNextSync( * * Get properties of a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain topic along with {@link Response} on successful completion of {@link Mono}. + * @return a domain topic. + * + * Get properties of a domain topic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String domainName, String domainTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter domainTopicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, domainTopicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -215,13 +195,15 @@ private Mono> getWithResponseAsync(String resourceGro * * Get properties of a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain topic on successful completion of {@link Mono}. + * @return a domain topic. + * + * Get properties of a domain topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String domainName, String domainTopicName) { @@ -234,43 +216,23 @@ private Mono getAsync(String resourceGroupName, String domainN * * Get properties of a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain topic along with {@link Response}. + * @return a domain topic. + * + * Get properties of a domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String domainName, String domainTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainTopicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, domainTopicName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, domainName, domainTopicName, accept, context); } /** @@ -278,13 +240,15 @@ public Response getWithResponse(String resourceGroupName, Stri * * Get properties of a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain topic. + * @return a domain topic. + * + * Get properties of a domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public DomainTopicInner get(String resourceGroupName, String domainName, String domainTopicName) { @@ -296,9 +260,9 @@ public DomainTopicInner get(String resourceGroupName, String domainName, String * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -307,29 +271,10 @@ public DomainTopicInner get(String resourceGroupName, String domainName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String domainName, String domainTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter domainTopicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, domainTopicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -338,9 +283,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -349,31 +294,9 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String domainTopicName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainTopicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, domainTopicName, this.client.getApiVersion(), accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, accept, Context.NONE); } /** @@ -381,9 +304,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -393,31 +316,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String domainTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainTopicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, domainTopicName, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, accept, context); } /** @@ -425,9 +326,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -447,9 +348,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -468,9 +369,9 @@ public SyncPoller, DomainTopicInner> beginCreateOrU * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -491,9 +392,9 @@ public SyncPoller, DomainTopicInner> beginCreateOrU * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -511,9 +412,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -529,9 +430,9 @@ public DomainTopicInner createOrUpdate(String resourceGroupName, String domainNa * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -549,9 +450,9 @@ public DomainTopicInner createOrUpdate(String resourceGroupName, String domainNa * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -560,28 +461,9 @@ public DomainTopicInner createOrUpdate(String resourceGroupName, String domainNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String domainName, String domainTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter domainTopicName is required and cannot be null.")); - } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, domainTopicName, this.client.getApiVersion(), context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -590,9 +472,9 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -601,30 +483,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String domainName, String domainTopicName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainTopicName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, domainTopicName, this.client.getApiVersion(), Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, Context.NONE); } /** @@ -632,9 +492,9 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -644,30 +504,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String domainName, String domainTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainTopicName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, domainTopicName, this.client.getApiVersion(), context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, context); } /** @@ -675,9 +513,9 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -696,9 +534,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -716,9 +554,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -737,9 +575,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -756,9 +594,9 @@ private Mono deleteAsync(String resourceGroupName, String domainName, Stri * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -773,9 +611,9 @@ public void delete(String resourceGroupName, String domainName, String domainTop * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -791,8 +629,8 @@ public void delete(String resourceGroupName, String domainName, String domainTop * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -809,25 +647,10 @@ public void delete(String resourceGroupName, String domainName, String domainTop @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDomainSinglePageAsync(String resourceGroupName, String domainName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -838,8 +661,8 @@ private Mono> listByDomainSinglePageAsync(String * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -864,8 +687,8 @@ private PagedFlux listByDomainAsync(String resourceGroupName, * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -884,8 +707,8 @@ private PagedFlux listByDomainAsync(String resourceGroupName, * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -901,28 +724,10 @@ private PagedFlux listByDomainAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByDomainSinglePage(String resourceGroupName, String domainName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByDomainSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listByDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -932,8 +737,8 @@ private PagedResponse listByDomainSinglePage(String resourceGr * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -950,28 +755,10 @@ private PagedResponse listByDomainSinglePage(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByDomainSinglePage(String resourceGroupName, String domainName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByDomainSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -981,8 +768,8 @@ private PagedResponse listByDomainSinglePage(String resourceGr * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1001,8 +788,8 @@ public PagedIterable listByDomain(String resourceGroupName, St * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1024,6 +811,8 @@ public PagedIterable listByDomain(String resourceGroupName, St } /** + * List domain topics. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1035,13 +824,6 @@ public PagedIterable listByDomain(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDomainNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDomainNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1051,6 +833,8 @@ private Mono> listByDomainNextSinglePageAsync(St } /** + * List domain topics. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1061,15 +845,6 @@ private Mono> listByDomainNextSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByDomainNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByDomainNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1078,6 +853,8 @@ private PagedResponse listByDomainNextSinglePage(String nextLi } /** + * List domain topics. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1089,21 +866,10 @@ private PagedResponse listByDomainNextSinglePage(String nextLi */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByDomainNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByDomainNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DomainTopicsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java index 946733d9be93f..fc53f6091a0cb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getWithResponse(String resourceGroupName, String do Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, domainName, domainTopicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DomainTopicImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DomainTopicImpl(inner.getValue(), this.manager())); } public DomainTopic get(String resourceGroupName, String domainName, String domainTopicName) { 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 dd05825b50935..bb714f08fe2d1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.DomainsClient; import com.azure.resourcemanager.eventgrid.fluent.models.DomainInner; import com.azure.resourcemanager.eventgrid.fluent.models.DomainSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.implementation.models.DomainsListResult; import com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest; 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; @@ -73,122 +72,114 @@ public final class DomainsClientImpl implements DomainsClient { * The interface defining all the services for EventGridManagementClientDomains to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientDomains") public interface DomainsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DomainInner domainInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DomainInner domainInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DomainInner domainInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DomainInner domainInfo, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DomainUpdateParameters domainUpdateParameters, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DomainUpdateParameters domainUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DomainUpdateParameters domainUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DomainUpdateParameters domainUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -196,72 +187,68 @@ Response listByResourceGroupSync(@HostParam("$host") String e @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSharedAccessKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listSharedAccessKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSharedAccessKeysSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSharedAccessKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regenerateKey(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> regenerateKey(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DomainRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DomainRegenerateKeyRequest regenerateKeyRequest, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response regenerateKeySync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response regenerateKeySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DomainRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DomainRegenerateKeyRequest regenerateKeyRequest, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -270,36 +257,22 @@ Response listByResourceGroupNextSync( * * Get properties of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain along with {@link Response} on successful completion of {@link Mono}. + * @return a domain. + * + * Get properties of a domain along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String domainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -308,12 +281,14 @@ private Mono> getByResourceGroupWithResponseAsync(String r * * Get properties of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain on successful completion of {@link Mono}. + * @return a domain. + * + * Get properties of a domain on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String domainName) { @@ -326,38 +301,22 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Stri * * Get properties of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain along with {@link Response}. + * @return a domain. + * + * Get properties of a domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, accept, context); } /** @@ -365,12 +324,14 @@ public Response getByResourceGroupWithResponse(String resourceGroup * * Get properties of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain. + * @return a domain. + * + * Get properties of a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { @@ -382,7 +343,7 @@ public DomainInner getByResourceGroup(String resourceGroupName, String domainNam * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -393,30 +354,12 @@ public DomainInner getByResourceGroup(String resourceGroupName, String domainNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String domainName, DomainInner domainInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter domainInfo is required and cannot be null.")); - } else { - domainInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), domainInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, domainInfo, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -425,7 +368,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -436,33 +379,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, DomainInner domainInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainInfo is required and cannot be null.")); - } else { - domainInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), domainInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, domainInfo, + Context.NONE); } /** @@ -470,7 +391,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @param context The context to associate with this operation. @@ -482,33 +403,10 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, DomainInner domainInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainInfo is required and cannot be null.")); - } else { - domainInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), domainInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, domainInfo, context); } /** @@ -516,7 +414,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -538,7 +436,7 @@ private PollerFlux, DomainInner> beginCreateOrUpdateAsyn * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -559,7 +457,7 @@ public SyncPoller, DomainInner> beginCreateOrUpdate(Stri * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @param context The context to associate with this operation. @@ -581,7 +479,7 @@ public SyncPoller, DomainInner> beginCreateOrUpdate(Stri * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -600,7 +498,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String d * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -618,7 +516,7 @@ public DomainInner createOrUpdate(String resourceGroupName, String domainName, D * * Asynchronously creates or updates a new domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainInfo Domain information. * @param context The context to associate with this operation. @@ -634,83 +532,61 @@ public DomainInner createOrUpdate(String resourceGroupName, String domainName, D } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String domainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, + domainUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String domainName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, domainUpdateParameters, + Context.NONE); } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -718,73 +594,66 @@ private Response deleteWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String domainName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, domainUpdateParameters, + context); } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String domainName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, domainName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, DomainInner> beginUpdateAsync(String resourceGroupName, + String domainName, DomainUpdateParameters domainUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, domainName, domainUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DomainInner.class, DomainInner.class, this.client.getContext()); } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName) { - Response response = deleteWithResponse(resourceGroupName, domainName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, domainName, domainUpdateParameters); + return this.client.getLroResult(response, DomainInner.class, DomainInner.class, + Context.NONE); } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -792,159 +661,118 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, domainName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters, Context context) { + Response response + = updateWithResponse(resourceGroupName, domainName, domainUpdateParameters, context); + return this.client.getLroResult(response, DomainInner.class, DomainInner.class, + context); } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String domainName) { - return beginDeleteAsync(resourceGroupName, domainName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters) { + return beginUpdateAsync(resourceGroupName, domainName, domainUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String domainName) { - beginDelete(resourceGroupName, domainName).getFinalResult(); + public DomainInner update(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters) { + return beginUpdate(resourceGroupName, domainName, domainUpdateParameters).getFinalResult(); } /** - * Delete a domain. + * Update a domain. * - * Delete existing domain. + * Asynchronously updates a domain with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. + * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String domainName, Context context) { - beginDelete(resourceGroupName, domainName, context).getFinalResult(); + public DomainInner update(String resourceGroupName, String domainName, + DomainUpdateParameters domainUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, domainName, domainUpdateParameters, context).getFinalResult(); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter domainUpdateParameters is required and cannot be null.")); - } else { - domainUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String domainName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), domainUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainUpdateParameters is required and cannot be null.")); - } else { - domainUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), domainUpdateParameters, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String domainName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, Context.NONE); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -952,88 +780,55 @@ private Response updateWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (domainUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainUpdateParameters is required and cannot be null.")); - } else { - domainUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), domainUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String domainName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, context); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DomainInner> beginUpdateAsync(String resourceGroupName, - String domainName, DomainUpdateParameters domainUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, domainName, domainUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DomainInner.class, DomainInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String domainName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, domainName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, domainName, domainUpdateParameters); - return this.client.getLroResult(response, DomainInner.class, DomainInner.class, - Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName) { + Response response = deleteWithResponse(resourceGroupName, domainName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1041,78 +836,68 @@ public SyncPoller, DomainInner> beginUpdate(String resou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters, Context context) { - Response response - = updateWithResponse(resourceGroupName, domainName, domainUpdateParameters, context); - return this.client.getLroResult(response, DomainInner.class, DomainInner.class, - context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, domainName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters) { - return beginUpdateAsync(resourceGroupName, domainName, domainUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String domainName) { + return beginDeleteAsync(resourceGroupName, domainName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DomainInner update(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters) { - return beginUpdate(resourceGroupName, domainName, domainUpdateParameters).getFinalResult(); + public void delete(String resourceGroupName, String domainName) { + beginDelete(resourceGroupName, domainName).getFinalResult(); } /** - * Update a domain. + * Delete a domain. * - * Asynchronously updates a domain with the specified parameters. + * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DomainInner update(String resourceGroupName, String domainName, - DomainUpdateParameters domainUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, domainName, domainUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String domainName, Context context) { + beginDelete(resourceGroupName, domainName, context).getFinalResult(); } /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1127,29 +912,23 @@ public DomainInner update(String resourceGroupName, String domainName, * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, String filter, + Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1163,33 +942,36 @@ private Mono> listSinglePageAsync(String filter, Inte * @return result of the List Domains operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1203,29 +985,22 @@ private PagedFlux listAsync() { * @return result of the List Domains operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1240,46 +1015,41 @@ private PagedResponse listSinglePage(String filter, Integer top) { * @return result of the List Domains operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1294,17 +1064,17 @@ public PagedIterable list() { * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1319,36 +1089,21 @@ public PagedIterable list(String filter, Integer top, Context conte * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1362,36 +1117,33 @@ private Mono> listByResourceGroupSinglePageAsync(Stri * @return result of the List Domains operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1405,36 +1157,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName * @return result of the List Domains operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1449,55 +1184,36 @@ private PagedResponse listByResourceGroupSinglePage(String resource * @return result of the List Domains operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1512,10 +1228,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName) * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1523,7 +1238,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * * List the two keys used to publish to a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1533,26 +1248,10 @@ public PagedIterable listByResourceGroup(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSharedAccessKeysWithResponseAsync(String resourceGroupName, String domainName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1561,7 +1260,7 @@ private Mono> listSharedAccessKeysWithResp * * List the two keys used to publish to a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1579,7 +1278,7 @@ private Mono listSharedAccessKeysAsync(String resou * * List the two keys used to publish to a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1590,27 +1289,9 @@ private Mono listSharedAccessKeysAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String domainName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } final String accept = "application/json"; - return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), accept, context); + return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, accept, context); } /** @@ -1618,7 +1299,7 @@ public Response listSharedAccessKeysWithResponse(St * * List the two keys used to publish to a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1635,7 +1316,7 @@ public DomainSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName * * Regenerate a shared access key for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1646,31 +1327,12 @@ public DomainSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeyWithResponseAsync(String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, this.client.getApiVersion(), regenerateKeyRequest, accept, context)) + .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, + regenerateKeyRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1679,7 +1341,7 @@ private Mono> regenerateKeyWithResponseAsy * * Regenerate a shared access key for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1699,7 +1361,7 @@ private Mono regenerateKeyAsync(String resourceGrou * * Regenerate a shared access key for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -1711,33 +1373,11 @@ private Mono regenerateKeyAsync(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeyWithResponse(String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - domainName, this.client.getApiVersion(), regenerateKeyRequest, accept, context); + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, regenerateKeyRequest, + context); } /** @@ -1745,7 +1385,7 @@ public Response regenerateKeyWithResponse(String re * * Regenerate a shared access key for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1760,6 +1400,8 @@ public DomainSharedAccessKeysInner regenerateKey(String resourceGroupName, Strin } /** + * List domains under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1770,24 +1412,19 @@ public DomainSharedAccessKeysInner regenerateKey(String resourceGroupName, Strin * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List domains under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1797,24 +1434,17 @@ private Mono> listBySubscriptionNextSinglePageAsync(S * @return result of the List Domains operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List domains under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1825,24 +1455,17 @@ private PagedResponse listBySubscriptionNextSinglePage(String nextL * @return result of the List Domains operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List domains under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1853,24 +1476,19 @@ private PagedResponse listBySubscriptionNextSinglePage(String nextL * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List domains under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1880,24 +1498,17 @@ private Mono> listByResourceGroupNextSinglePageAsync( * @return result of the List Domains operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List domains under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1908,22 +1519,11 @@ private PagedResponse listByResourceGroupNextSinglePage(String next * @return result of the List Domains operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DomainsClientImpl.class); } 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 9cadd6738bd78..bdc192db4894e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -33,12 +33,8 @@ public Response getByResourceGroupWithResponse(String resourceGroupName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, domainName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DomainImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DomainImpl(inner.getValue(), this.manager())); } public Domain getByResourceGroup(String resourceGroupName, String domainName) { @@ -58,16 +54,6 @@ public void delete(String resourceGroupName, String domainName, Context context) this.serviceClient().delete(resourceGroupName, domainName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); @@ -80,16 +66,22 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Strin return ResourceManagerUtils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); + } + public Response listSharedAccessKeysWithResponse(String resourceGroupName, String domainName, Context context) { Response inner = this.serviceClient().listSharedAccessKeysWithResponse(resourceGroupName, domainName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DomainSharedAccessKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DomainSharedAccessKeysImpl(inner.getValue(), this.manager())); } public DomainSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String domainName) { @@ -105,12 +97,8 @@ public Response regenerateKeyWithResponse(String resourc DomainRegenerateKeyRequest regenerateKeyRequest, Context context) { Response inner = this.serviceClient() .regenerateKeyWithResponse(resourceGroupName, domainName, regenerateKeyRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DomainSharedAccessKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DomainSharedAccessKeysImpl(inner.getValue(), this.manager())); } public DomainSharedAccessKeys regenerateKey(String resourceGroupName, String domainName, 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 6e1e8d2e21244..e4f21daabe5dd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -20,36 +20,34 @@ @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. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the EventGridManagementClientBuilder. */ - public EventGridManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public EventGridManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the EventGridManagementClientBuilder. */ - public EventGridManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public EventGridManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -134,7 +132,7 @@ public EventGridManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); EventGridManagementClientImpl client = new EventGridManagementClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java index 7e4f76d441938..dfd6c494fc882 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -73,28 +73,12 @@ @ServiceClient(builder = EventGridManagementClientBuilder.class) public final class EventGridManagementClientImpl implements EventGridManagementClient { /** - * Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of - * the URI for every service call. - */ - private final String subscriptionId; - - /** - * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -103,12 +87,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -116,6 +100,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -158,6 +156,20 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** * The CaCertificatesClient object to access its operations. */ @@ -172,6 +184,20 @@ public CaCertificatesClient getCaCertificates() { return this.caCertificates; } + /** + * The NamespacesClient object to access its operations. + */ + private final NamespacesClient namespaces; + + /** + * Gets the NamespacesClient object to access its operations. + * + * @return the NamespacesClient object. + */ + public NamespacesClient getNamespaces() { + return this.namespaces; + } + /** * The ChannelsClient object to access its operations. */ @@ -186,6 +212,20 @@ public ChannelsClient getChannels() { return this.channels; } + /** + * The PartnerNamespacesClient object to access its operations. + */ + private final PartnerNamespacesClient partnerNamespaces; + + /** + * Gets the PartnerNamespacesClient object to access its operations. + * + * @return the PartnerNamespacesClient object. + */ + public PartnerNamespacesClient getPartnerNamespaces() { + return this.partnerNamespaces; + } + /** * The ClientGroupsClient object to access its operations. */ @@ -243,17 +283,17 @@ public DomainTopicsClient getDomainTopics() { } /** - * The DomainTopicEventSubscriptionsClient object to access its operations. + * The EventSubscriptionsClient object to access its operations. */ - private final DomainTopicEventSubscriptionsClient domainTopicEventSubscriptions; + private final EventSubscriptionsClient eventSubscriptions; /** - * Gets the DomainTopicEventSubscriptionsClient object to access its operations. + * Gets the EventSubscriptionsClient object to access its operations. * - * @return the DomainTopicEventSubscriptionsClient object. + * @return the EventSubscriptionsClient object. */ - public DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions() { - return this.domainTopicEventSubscriptions; + public EventSubscriptionsClient getEventSubscriptions() { + return this.eventSubscriptions; } /** @@ -284,20 +324,6 @@ public DomainEventSubscriptionsClient getDomainEventSubscriptions() { return this.domainEventSubscriptions; } - /** - * The EventSubscriptionsClient object to access its operations. - */ - private final EventSubscriptionsClient eventSubscriptions; - - /** - * Gets the EventSubscriptionsClient object to access its operations. - * - * @return the EventSubscriptionsClient object. - */ - public EventSubscriptionsClient getEventSubscriptions() { - return this.eventSubscriptions; - } - /** * The SystemTopicEventSubscriptionsClient object to access its operations. */ @@ -312,20 +338,6 @@ public SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions() { return this.systemTopicEventSubscriptions; } - /** - * The NamespaceTopicEventSubscriptionsClient object to access its operations. - */ - private final NamespaceTopicEventSubscriptionsClient namespaceTopicEventSubscriptions; - - /** - * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. - * - * @return the NamespaceTopicEventSubscriptionsClient object. - */ - public NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions() { - return this.namespaceTopicEventSubscriptions; - } - /** * The PartnerTopicEventSubscriptionsClient object to access its operations. */ @@ -340,20 +352,6 @@ public PartnerTopicEventSubscriptionsClient getPartnerTopicEventSubscriptions() return this.partnerTopicEventSubscriptions; } - /** - * The NamespacesClient object to access its operations. - */ - private final NamespacesClient namespaces; - - /** - * Gets the NamespacesClient object to access its operations. - * - * @return the NamespacesClient object. - */ - public NamespacesClient getNamespaces() { - return this.namespaces; - } - /** * The NamespaceTopicsClient object to access its operations. */ @@ -368,20 +366,6 @@ public NamespaceTopicsClient getNamespaceTopics() { return this.namespaceTopics; } - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - /** * The PartnerConfigurationsClient object to access its operations. */ @@ -410,20 +394,6 @@ public PartnerDestinationsClient getPartnerDestinations() { return this.partnerDestinations; } - /** - * The PartnerNamespacesClient object to access its operations. - */ - private final PartnerNamespacesClient partnerNamespaces; - - /** - * Gets the PartnerNamespacesClient object to access its operations. - * - * @return the PartnerNamespacesClient object. - */ - public PartnerNamespacesClient getPartnerNamespaces() { - return this.partnerNamespaces; - } - /** * The PartnerRegistrationsClient object to access its operations. */ @@ -565,31 +535,59 @@ public TopicSpacesClient getTopicSpaces() { } /** - * The TopicTypesClient object to access its operations. + * The VerifiedPartnersClient object to access its operations. */ - private final TopicTypesClient topicTypes; + private final VerifiedPartnersClient verifiedPartners; /** - * Gets the TopicTypesClient object to access its operations. + * Gets the VerifiedPartnersClient object to access its operations. * - * @return the TopicTypesClient object. + * @return the VerifiedPartnersClient object. */ - public TopicTypesClient getTopicTypes() { - return this.topicTypes; + public VerifiedPartnersClient getVerifiedPartners() { + return this.verifiedPartners; } /** - * The VerifiedPartnersClient object to access its operations. + * The DomainTopicEventSubscriptionsClient object to access its operations. */ - private final VerifiedPartnersClient verifiedPartners; + private final DomainTopicEventSubscriptionsClient domainTopicEventSubscriptions; /** - * Gets the VerifiedPartnersClient object to access its operations. + * Gets the DomainTopicEventSubscriptionsClient object to access its operations. * - * @return the VerifiedPartnersClient object. + * @return the DomainTopicEventSubscriptionsClient object. */ - public VerifiedPartnersClient getVerifiedPartners() { - return this.verifiedPartners; + public DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions() { + return this.domainTopicEventSubscriptions; + } + + /** + * The NamespaceTopicEventSubscriptionsClient object to access its operations. + */ + private final NamespaceTopicEventSubscriptionsClient namespaceTopicEventSubscriptions; + + /** + * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. + * + * @return the NamespaceTopicEventSubscriptionsClient object. + */ + public NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions() { + return this.namespaceTopicEventSubscriptions; + } + + /** + * The TopicTypesClient object to access its operations. + */ + private final TopicTypesClient topicTypes; + + /** + * Gets the TopicTypesClient object to access its operations. + * + * @return the TopicTypesClient object. + */ + public TopicTypesClient getTopicTypes() { + return this.topicTypes; } /** @@ -599,37 +597,34 @@ public VerifiedPartnersClient getVerifiedPartners() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId Subscription credentials that uniquely identify a Microsoft Azure subscription. The - * subscription ID forms part of the URI for every service call. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ EventGridManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-04-01-preview"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-06-15-preview"; + this.operations = new OperationsClientImpl(this); this.caCertificates = new CaCertificatesClientImpl(this); + this.namespaces = new NamespacesClientImpl(this); this.channels = new ChannelsClientImpl(this); + this.partnerNamespaces = new PartnerNamespacesClientImpl(this); this.clientGroups = new ClientGroupsClientImpl(this); this.clients = new ClientsClientImpl(this); this.domains = new DomainsClientImpl(this); this.domainTopics = new DomainTopicsClientImpl(this); - this.domainTopicEventSubscriptions = new DomainTopicEventSubscriptionsClientImpl(this); + this.eventSubscriptions = new EventSubscriptionsClientImpl(this); this.topicEventSubscriptions = new TopicEventSubscriptionsClientImpl(this); this.domainEventSubscriptions = new DomainEventSubscriptionsClientImpl(this); - this.eventSubscriptions = new EventSubscriptionsClientImpl(this); this.systemTopicEventSubscriptions = new SystemTopicEventSubscriptionsClientImpl(this); - this.namespaceTopicEventSubscriptions = new NamespaceTopicEventSubscriptionsClientImpl(this); this.partnerTopicEventSubscriptions = new PartnerTopicEventSubscriptionsClientImpl(this); - this.namespaces = new NamespacesClientImpl(this); this.namespaceTopics = new NamespaceTopicsClientImpl(this); - this.operations = new OperationsClientImpl(this); this.partnerConfigurations = new PartnerConfigurationsClientImpl(this); this.partnerDestinations = new PartnerDestinationsClientImpl(this); - this.partnerNamespaces = new PartnerNamespacesClientImpl(this); this.partnerRegistrations = new PartnerRegistrationsClientImpl(this); this.partnerTopics = new PartnerTopicsClientImpl(this); this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsClientImpl(this); @@ -640,8 +635,10 @@ public VerifiedPartnersClient getVerifiedPartners() { this.topics = new TopicsClientImpl(this); this.extensionTopics = new ExtensionTopicsClientImpl(this); this.topicSpaces = new TopicSpacesClientImpl(this); - this.topicTypes = new TopicTypesClientImpl(this); this.verifiedPartners = new VerifiedPartnersClientImpl(this); + this.domainTopicEventSubscriptions = new DomainTopicEventSubscriptionsClientImpl(this); + this.namespaceTopicEventSubscriptions = new NamespaceTopicEventSubscriptionsClientImpl(this); + this.topicTypes = new TopicTypesClientImpl(this); } /** @@ -755,7 +752,7 @@ private static final class HttpResponseImpl extends HttpResponse { super(null); this.statusCode = statusCode; this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); } public int getStatusCode() { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionFullUrlImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionFullUrlImpl.java index 49cb01bf7d113..22ff216aed9f5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionFullUrlImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionFullUrlImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java index 66992b9b9282f..9b268ed85226f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 3612b96093d7d..37102919010ff 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient; 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.implementation.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; @@ -74,180 +73,214 @@ public final class EventSubscriptionsClientImpl implements EventSubscriptionsCli * The interface defining all the services for EventGridManagementClientEventSubscriptions to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientEventSubscriptions") public interface EventSubscriptionsService { @Headers({ "Content-Type: application/json" }) - @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getDeliveryAttributesSync(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> listByDomainTopic(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, + @PathParam("topicName") String topicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByDomainTopicSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, + @PathParam("topicName") String topicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); + @Put("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); + + @Patch("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); + + @Patch("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getFullUrl(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> listByResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("providerNamespace") String providerNamespace, + @PathParam("resourceTypeName") String resourceTypeName, @PathParam("resourceName") String resourceName, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getFullUrlSync(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Response listByResourceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("providerNamespace") String providerNamespace, + @PathParam("resourceTypeName") String resourceTypeName, @PathParam("resourceName") String resourceName, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions") + @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Mono> getDeliveryAttributes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions") + @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Response getDeliveryAttributesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") + @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGlobalBySubscriptionForTopicType( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("topicTypeName") String topicTypeName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Mono> getFullUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") + @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listGlobalBySubscriptionForTopicTypeSync( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("topicTypeName") String topicTypeName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Response getFullUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listGlobalBySubscriptionForTopicType( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("topicTypeName") String topicTypeName, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listGlobalBySubscriptionForTopicTypeSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("topicTypeName") String topicTypeName, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -256,67 +289,69 @@ Response listByResourceGroupSync(@HostParam("$host @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listGlobalByResourceGroupForTopicType( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicTypeName") String topicTypeName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listGlobalByResourceGroupForTopicTypeSync( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicTypeName") String topicTypeName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRegionalBySubscription(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, + Mono> listRegionalBySubscription(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listRegionalBySubscriptionSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, + Response listRegionalBySubscriptionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRegionalByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listRegionalByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listRegionalByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listRegionalByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalBySubscriptionForTopicType( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("topicTypeName") String topicTypeName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @PathParam("topicTypeName") String topicTypeName, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -324,9 +359,9 @@ Mono> listRegionalBySubscriptionForTopicT @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listRegionalBySubscriptionForTopicTypeSync( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("topicTypeName") String topicTypeName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @PathParam("topicTypeName") String topicTypeName, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -334,75 +369,61 @@ Response listRegionalBySubscriptionForTopicTypeSyn @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalByResourceGroupForTopicType( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @PathParam("topicTypeName") String topicTypeName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("topicTypeName") String topicTypeName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listRegionalByResourceGroupForTopicTypeSync( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @PathParam("topicTypeName") String topicTypeName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("topicTypeName") String topicTypeName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResource(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("providerNamespace") String providerNamespace, - @PathParam("resourceTypeName") String resourceTypeName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + Mono> listGlobalByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("providerNamespace") String providerNamespace, - @PathParam("resourceTypeName") String resourceTypeName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + Response listGlobalByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDomainTopic(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByDomainTopicNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByDomainTopicSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("domainName") String domainName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByDomainTopicNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listGlobalBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -410,39 +431,39 @@ Mono> listGlobalBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listGlobalBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGlobalBySubscriptionForTopicTypeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listGlobalBySubscriptionForTopicTypeNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGlobalByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listGlobalBySubscriptionForTopicTypeNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listGlobalByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listGlobalBySubscriptionForTopicTypeNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -450,7 +471,7 @@ Response listGlobalByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listGlobalByResourceGroupForTopicTypeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -458,7 +479,7 @@ Mono> listGlobalByResourceGroupForTopicTy @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listGlobalByResourceGroupForTopicTypeNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -466,7 +487,7 @@ Response listGlobalByResourceGroupForTopicTypeNext @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -474,7 +495,7 @@ Mono> listRegionalBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listRegionalBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -482,7 +503,7 @@ Response listRegionalBySubscriptionNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -490,7 +511,7 @@ Mono> listRegionalByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listRegionalByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -498,7 +519,7 @@ Response listRegionalByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalBySubscriptionForTopicTypeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -506,7 +527,7 @@ Mono> listRegionalBySubscriptionForTopicT @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listRegionalBySubscriptionForTopicTypeNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -514,7 +535,7 @@ Response listRegionalBySubscriptionForTopicTypeNex @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalByResourceGroupForTopicTypeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -522,885 +543,675 @@ Mono> listRegionalByResourceGroupForTopic @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listRegionalByResourceGroupForTopicTypeNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDomainTopicNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByDomainTopicNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get delivery attributes for an event subscription. + * List all global event subscriptions under an Azure subscription and resource group. * - * Get all delivery attributes for an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. + * @return result of the List EventSubscriptions operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync(String scope, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), scope, - eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get delivery attributes for an event subscription. + * List all global event subscriptions under an Azure subscription and resource group. * - * Get all delivery attributes for an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription on successful completion of {@link Mono}. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync(String scope, - String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listGlobalByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Get delivery attributes for an event subscription. + * List all global event subscriptions under an Azure subscription and resource group. * - * Get all delivery attributes for an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse(String scope, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getDeliveryAttributesSync(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), accept, context); - } - - /** - * Get delivery attributes for an event subscription. + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listGlobalByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all global event subscriptions under an Azure subscription and resource group. * - * Get all delivery attributes for an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. + * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName) { - return getDeliveryAttributesWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get an event subscription. + * List all global event subscriptions under an Azure subscription and resource group. * - * Get properties of an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be found. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription along with {@link Response} on successful completion of {@link Mono}. + * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top, Context context) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get an event subscription. + * List all global event subscriptions under an Azure subscription and resource group. * - * Get properties of an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be found. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription on successful completion of {@link Mono}. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String scope, String eventSubscriptionName) { - return getWithResponseAsync(scope, eventSubscriptionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listGlobalByResourceGroupNextSinglePage(nextLink)); } /** - * Get an event subscription. + * List all global event subscriptions under an Azure subscription and resource group. * - * Get properties of an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be found. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription along with {@link Response}. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Integer top, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listGlobalByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List all event subscriptions for a specific domain topic. + * + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List EventSubscriptions operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String scope, String eventSubscriptionName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Mono> listByDomainTopicSinglePageAsync(String resourceGroupName, + String domainName, String topicName, String filter, Integer top) { final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), scope, eventSubscriptionName, this.client.getApiVersion(), - accept, context); + return FluxUtil + .withContext(context -> service.listByDomainTopic(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, filter, top, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an event subscription. + * List all event subscriptions for a specific domain topic. * - * Get properties of an event subscription. + * List all event subscriptions that have been created for a specific domain topic. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be found. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner get(String scope, String eventSubscriptionName) { - return getWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDomainTopicAsync(String resourceGroupName, String domainName, + String topicName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName, filter, top), + nextLink -> listByDomainTopicNextSinglePageAsync(nextLink)); } /** - * Create or update an event subscription. + * List all event subscriptions for a specific domain topic. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * List all event subscriptions that have been created for a specific domain topic. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String scope, String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), eventSubscriptionInfo, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDomainTopicAsync(String resourceGroupName, String domainName, + String topicName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName, filter, top), + nextLink -> listByDomainTopicNextSinglePageAsync(nextLink)); } /** - * Create or update an event subscription. + * List all event subscriptions for a specific domain topic. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * List all event subscriptions that have been created for a specific domain topic. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String scope, String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + private PagedResponse listByDomainTopicSinglePage(String resourceGroupName, + String domainName, String topicName, String filter, Integer top) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), eventSubscriptionInfo, accept, Context.NONE); + Response res = service.listByDomainTopicSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, + filter, top, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update an event subscription. + * List all event subscriptions for a specific domain topic. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * List all event subscriptions that have been created for a specific domain topic. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String scope, String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + private PagedResponse listByDomainTopicSinglePage(String resourceGroupName, + String domainName, String topicName, String filter, Integer top, Context context) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), eventSubscriptionInfo, accept, context); + Response res = service.listByDomainTopicSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, + filter, top, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update an event subscription. + * List all event subscriptions for a specific domain topic. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * List all event subscriptions that have been created for a specific domain topic. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Subscription. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EventSubscriptionInner> beginCreateOrUpdateAsync( - String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - Mono>> mono - = createOrUpdateWithResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, + String topicName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>( + () -> listByDomainTopicSinglePage(resourceGroupName, domainName, topicName, filter, top), + nextLink -> listByDomainTopicNextSinglePage(nextLink)); } /** - * Create or update an event subscription. + * List all event subscriptions for a specific domain topic. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * List all event subscriptions that have been created for a specific domain topic. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate(String scope, - String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - Response response = createOrUpdateWithResponse(scope, eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, + String topicName, String filter, Integer top, Context context) { + return new PagedIterable<>( + () -> listByDomainTopicSinglePage(resourceGroupName, domainName, topicName, filter, top, context), + nextLink -> listByDomainTopicNextSinglePage(nextLink, context)); } /** - * Create or update an event subscription. + * Get an event subscription. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Get properties of an event subscription. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return an event subscription. + * + * Get properties of an event subscription along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate(String scope, - String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - Response response - = createOrUpdateWithResponse(scope, eventSubscriptionName, eventSubscriptionInfo, context); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String scope, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), scope, + eventSubscriptionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update an event subscription. + * Get an event subscription. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Get properties of an event subscription. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription on successful completion of {@link Mono}. + * @return an event subscription. + * + * Get properties of an event subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String scope, String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdateAsync(scope, eventSubscriptionName, eventSubscriptionInfo).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono getAsync(String scope, String eventSubscriptionName) { + return getWithResponseAsync(scope, eventSubscriptionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update an event subscription. + * Get an event subscription. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Get properties of an event subscription. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. + * @return an event subscription. + * + * Get properties of an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo).getFinalResult(); + public Response getWithResponse(String scope, String eventSubscriptionName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, eventSubscriptionName, + accept, context); } /** - * Create or update an event subscription. + * Get an event subscription. * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Get properties of an event subscription. * - * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The - * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider - * namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and should use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. + * @return an event subscription. + * + * Get properties of an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, context).getFinalResult(); + public EventSubscriptionInner get(String scope, String eventSubscriptionName) { + return getWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String scope, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String scope, String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + scope, eventSubscriptionName, contentType, accept, eventSubscriptionInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String scope, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), scope, eventSubscriptionName, this.client.getApiVersion(), - Context.NONE); + private Response createOrUpdateWithResponse(String scope, String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, + eventSubscriptionName, contentType, accept, eventSubscriptionInfo, Context.NONE); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String scope, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), scope, eventSubscriptionName, this.client.getApiVersion(), - context); + private Response createOrUpdateWithResponse(String scope, String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, + eventSubscriptionName, contentType, accept, eventSubscriptionInfo, context); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String scope, String eventSubscriptionName) { - Mono>> mono = deleteWithResponseAsync(scope, eventSubscriptionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, EventSubscriptionInner> beginCreateOrUpdateAsync( + String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { + Mono>> mono + = createOrUpdateWithResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, this.client.getContext()); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName) { - Response response = deleteWithResponse(scope, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate(String scope, + String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { + Response response = createOrUpdateWithResponse(scope, eventSubscriptionName, eventSubscriptionInfo); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName, Context context) { - Response response = deleteWithResponse(scope, eventSubscriptionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate(String scope, + String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { + Response response + = createOrUpdateWithResponse(scope, eventSubscriptionName, eventSubscriptionInfo, context); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, context); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return event Subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String scope, String eventSubscriptionName) { - return beginDeleteAsync(scope, eventSubscriptionName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String scope, String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo) { + return beginCreateOrUpdateAsync(scope, eventSubscriptionName, eventSubscriptionInfo).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String scope, String eventSubscriptionName) { - beginDelete(scope, eventSubscriptionName).getFinalResult(); + public EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo) { + return beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo).getFinalResult(); } /** - * Delete an event subscription. + * Create or update an event subscription. * - * Delete an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified + * scope. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String scope, String eventSubscriptionName, Context context) { - beginDelete(scope, eventSubscriptionName, context).getFinalResult(); + public EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo, Context context) { + return beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, context).getFinalResult(); } /** @@ -1408,15 +1219,8 @@ public void delete(String scope, String eventSubscriptionName, Context context) * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1426,27 +1230,11 @@ public void delete(String scope, String eventSubscriptionName, Context context) @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), eventSubscriptionUpdateParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), scope, + eventSubscriptionName, contentType, accept, eventSubscriptionUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1455,15 +1243,8 @@ private Mono>> updateWithResponseAsync(String scope, S * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1473,28 +1254,10 @@ private Mono>> updateWithResponseAsync(String scope, S @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), scope, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, Context.NONE); } /** @@ -1502,15 +1265,8 @@ private Response updateWithResponse(String scope, String eventSubscr * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1521,28 +1277,10 @@ private Response updateWithResponse(String scope, String eventSubscr @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), scope, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, context); } /** @@ -1550,15 +1288,8 @@ private Response updateWithResponse(String scope, String eventSubscr * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1580,15 +1311,8 @@ private PollerFlux, EventSubscriptionInner> b * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1609,15 +1333,8 @@ public SyncPoller, EventSubscriptionInner> be * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1640,15 +1357,8 @@ public SyncPoller, EventSubscriptionInner> be * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1667,15 +1377,8 @@ private Mono updateAsync(String scope, String eventSubsc * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1693,15 +1396,8 @@ public EventSubscriptionInner update(String scope, String eventSubscriptionName, * * Asynchronously updates an existing event subscription. * - * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a - * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1716,332 +1412,173 @@ public EventSubscriptionInner update(String scope, String eventSubscriptionName, } /** - * Get full URL of an event subscription. + * Delete an event subscription. * - * Get the full endpoint URL for an event subscription. + * Delete an existing event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getFullUrlWithResponseAsync(String scope, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String scope, String eventSubscriptionName) { return FluxUtil - .withContext(context -> service.getFullUrl(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), scope, + eventSubscriptionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get full URL of an event subscription. + * Delete an event subscription. * - * Get the full endpoint URL for an event subscription. + * Delete an existing event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getFullUrlAsync(String scope, String eventSubscriptionName) { - return getFullUrlWithResponseAsync(scope, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response deleteWithResponse(String scope, String eventSubscriptionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, eventSubscriptionName, + Context.NONE); } /** - * Get full URL of an event subscription. + * Delete an event subscription. * - * Get the full endpoint URL for an event subscription. + * Delete an existing event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse(String scope, String eventSubscriptionName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getFullUrlSync(this.client.getEndpoint(), scope, eventSubscriptionName, - this.client.getApiVersion(), accept, context); - } - - /** - * Get full URL of an event subscription. - * - * Get the full endpoint URL for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName) { - return getFullUrlWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); + private Response deleteWithResponse(String scope, String eventSubscriptionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, eventSubscriptionName, + context); } /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. + * Delete an event subscription. * - * List all aggregated global event subscriptions under a specific Azure subscription. + * Delete an existing event subscription. * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String scope, String eventSubscriptionName) { + Mono>> mono = deleteWithResponseAsync(scope, eventSubscriptionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. + * Delete an event subscription. * - * List all aggregated global event subscriptions under a specific Azure subscription. + * Delete an existing event subscription. * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listGlobalBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. - * - * List all aggregated global event subscriptions under a specific Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String filter = null; - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listGlobalBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName) { + Response response = deleteWithResponse(scope, eventSubscriptionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. + * Delete an event subscription. * - * List all aggregated global event subscriptions under a specific Azure subscription. + * Delete an existing event subscription. * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName, Context context) { + Response response = deleteWithResponse(scope, eventSubscriptionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. + * Delete an event subscription. * - * List all aggregated global event subscriptions under a specific Azure subscription. + * Delete an existing event subscription. * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono deleteAsync(String scope, String eventSubscriptionName) { + return beginDeleteAsync(scope, eventSubscriptionName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. + * Delete an event subscription. * - * List all aggregated global event subscriptions under a specific Azure subscription. + * Delete an existing event subscription. * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String filter = null; - final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listGlobalBySubscriptionNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String scope, String eventSubscriptionName) { + beginDelete(scope, eventSubscriptionName).getFinalResult(); } /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. + * Delete an event subscription. * - * List all aggregated global event subscriptions under a specific Azure subscription. + * Delete an existing event subscription. * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listGlobalBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String scope, String eventSubscriptionName, Context context) { + beginDelete(scope, eventSubscriptionName, context).getFinalResult(); } /** - * List all global event subscriptions for a topic type. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2052,37 +1589,27 @@ public PagedIterable list(String filter, Integer top, Co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listGlobalBySubscriptionForTopicTypeSinglePageAsync(String topicTypeName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (topicTypeName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listGlobalBySubscriptionForTopicType(this.client.getEndpoint(), - this.client.getSubscriptionId(), topicTypeName, this.client.getApiVersion(), filter, top, accept, context)) + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all global event subscriptions for a topic type. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2093,40 +1620,42 @@ public PagedIterable list(String filter, Integer top, Co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGlobalBySubscriptionForTopicTypeAsync(String topicTypeName, - String filter, Integer top) { - return new PagedFlux<>(() -> listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName, filter, top), - nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listGlobalBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List all global event subscriptions for a topic type. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param topicTypeName Name of the topic type. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGlobalBySubscriptionForTopicTypeAsync(String topicTypeName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName, filter, top), - nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listGlobalBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List all global event subscriptions for a topic type. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2137,39 +1666,25 @@ private PagedFlux listGlobalBySubscriptionForTopicTypeAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalBySubscriptionForTopicTypeSinglePage(String topicTypeName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res = service.listGlobalBySubscriptionForTopicTypeSync( - this.client.getEndpoint(), this.client.getSubscriptionId(), topicTypeName, this.client.getApiVersion(), - filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all global event subscriptions for a topic type. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2181,58 +1696,45 @@ private PagedResponse listGlobalBySubscriptionForTopicTy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalBySubscriptionForTopicTypeSinglePage(String topicTypeName, - String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res = service.listGlobalBySubscriptionForTopicTypeSync( - this.client.getEndpoint(), this.client.getSubscriptionId(), topicTypeName, this.client.getApiVersion(), - filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all global event subscriptions for a topic type. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param topicTypeName Name of the topic type. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listGlobalBySubscriptionForTopicTypeSinglePage(topicTypeName, filter, top), - nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listGlobalBySubscriptionNextSinglePage(nextLink)); } /** - * List all global event subscriptions for a topic type. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2244,22 +1746,26 @@ public PagedIterable listGlobalBySubscriptionForTopicTyp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName, - String filter, Integer top, Context context) { - return new PagedIterable<>( - () -> listGlobalBySubscriptionForTopicTypeSinglePage(topicTypeName, filter, top, context), - nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listGlobalBySubscriptionNextSinglePage(nextLink, context)); } /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all event subscriptions. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all event subscriptions that have been created for a specific resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2274,36 +1780,27 @@ public PagedIterable listGlobalBySubscriptionForTopicTyp * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listByResourceSinglePageAsync(String resourceGroupName, + String providerNamespace, String resourceTypeName, String resourceName, String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, providerNamespace, resourceTypeName, resourceName, + filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all event subscriptions. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all event subscriptions that have been created for a specific resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2317,37 +1814,44 @@ private Mono> listByResourceGroupSinglePag * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, - Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listGlobalByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceAsync(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName, String filter, Integer top) { + return new PagedFlux<>(() -> listByResourceSinglePageAsync(resourceGroupName, providerNamespace, + resourceTypeName, resourceName, filter, top), nextLink -> listByResourceNextSinglePageAsync(nextLink)); } /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all event subscriptions. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all event subscriptions that have been created for a specific resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceAsync(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listGlobalByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceSinglePageAsync(resourceGroupName, providerNamespace, + resourceTypeName, resourceName, filter, top), nextLink -> listByResourceNextSinglePageAsync(nextLink)); } /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all event subscriptions. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all event subscriptions that have been created for a specific resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2361,36 +1865,25 @@ private PagedFlux listByResourceGroupAsync(String resour * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listByResourceSinglePage(String resourceGroupName, + String providerNamespace, String resourceTypeName, String resourceName, String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listByResourceSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, providerNamespace, + resourceTypeName, resourceName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all event subscriptions. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all event subscriptions that have been created for a specific resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2405,55 +1898,49 @@ private PagedResponse listByResourceGroupSinglePage(Stri * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listByResourceSinglePage(String resourceGroupName, + String providerNamespace, String resourceTypeName, String resourceName, String filter, Integer top, + Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listByResourceSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, providerNamespace, + resourceTypeName, resourceName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all event subscriptions. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all event subscriptions that have been created for a specific resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable listByResource(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listGlobalByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceSinglePage(resourceGroupName, providerNamespace, + resourceTypeName, resourceName, filter, top), nextLink -> listByResourceNextSinglePage(nextLink)); } /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all event subscriptions. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all event subscriptions that have been created for a specific resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2468,262 +1955,194 @@ public PagedIterable listByResourceGroup(String resource * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, - Integer top, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listGlobalByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable listByResource(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName, String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listByResourceSinglePage(resourceGroupName, providerNamespace, + resourceTypeName, resourceName, filter, top, context), + nextLink -> listByResourceNextSinglePage(nextLink, context)); } /** - * List all global event subscriptions under a resource group for a topic type. + * Get delivery attributes for an event subscription. * - * List all global event subscriptions under a resource group for a specific topic type. + * Get all delivery attributes for an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGlobalByResourceGroupForTopicTypeSinglePageAsync( - String resourceGroupName, String topicTypeName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicTypeName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private Mono> getDeliveryAttributesWithResponseAsync(String scope, + String eventSubscriptionName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listGlobalByResourceGroupForTopicType(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, topicTypeName, this.client.getApiVersion(), filter, - top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), + this.client.getApiVersion(), scope, eventSubscriptionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all global event subscriptions under a resource group for a topic type. + * Get delivery attributes for an event subscription. * - * List all global event subscriptions under a resource group for a specific topic type. + * Get all delivery attributes for an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGlobalByResourceGroupForTopicTypeAsync(String resourceGroupName, - String topicTypeName, String filter, Integer top) { - return new PagedFlux<>( - () -> listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName, filter, top), - nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync(String scope, + String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List all global event subscriptions under a resource group for a topic type. + * Get delivery attributes for an event subscription. * - * List all global event subscriptions under a resource group for a specific topic type. + * Get all delivery attributes for an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicTypeName Name of the topic type. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGlobalByResourceGroupForTopicTypeAsync(String resourceGroupName, - String topicTypeName) { - final String filter = null; - final Integer top = null; - return new PagedFlux<>( - () -> listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName, filter, top), - nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse(String scope, + String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, + eventSubscriptionName, accept, context); } /** - * List all global event subscriptions under a resource group for a topic type. + * Get delivery attributes for an event subscription. * - * List all global event subscriptions under a resource group for a specific topic type. + * Get all delivery attributes for an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalByResourceGroupForTopicTypeSinglePage( - String resourceGroupName, String topicTypeName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listGlobalByResourceGroupForTopicTypeSync( - this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, topicTypeName, - this.client.getApiVersion(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + public DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); } /** - * List all global event subscriptions under a resource group for a topic type. + * Get full URL of an event subscription. * - * List all global event subscriptions under a resource group for a specific topic type. + * Get the full endpoint URL for an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalByResourceGroupForTopicTypeSinglePage( - String resourceGroupName, String topicTypeName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private Mono> getFullUrlWithResponseAsync(String scope, + String eventSubscriptionName) { final String accept = "application/json"; - Response res = service.listGlobalByResourceGroupForTopicTypeSync( - this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, topicTypeName, - this.client.getApiVersion(), filter, top, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return FluxUtil + .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getApiVersion(), scope, + eventSubscriptionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all global event subscriptions under a resource group for a topic type. + * Get full URL of an event subscription. * - * List all global event subscriptions under a resource group for a specific topic type. + * Get the full endpoint URL for an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicTypeName Name of the topic type. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName, - String topicTypeName) { - final String filter = null; - final Integer top = null; - return new PagedIterable<>( - () -> listGlobalByResourceGroupForTopicTypeSinglePage(resourceGroupName, topicTypeName, filter, top), - nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFullUrlAsync(String scope, String eventSubscriptionName) { + return getFullUrlWithResponseAsync(scope, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List all global event subscriptions under a resource group for a topic type. + * Get full URL of an event subscription. * - * List all global event subscriptions under a resource group for a specific topic type. + * Get the full endpoint URL for an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName, - String topicTypeName, String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listGlobalByResourceGroupForTopicTypeSinglePage(resourceGroupName, - topicTypeName, filter, top, context), - nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFullUrlWithResponse(String scope, String eventSubscriptionName, + Context context) { + final String accept = "application/json"; + return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, + eventSubscriptionName, accept, context); } /** - * List all regional event subscriptions under an Azure subscription. + * Get full URL of an event subscription. * - * List all event subscriptions from the given location under a specific Azure subscription. + * Get the full endpoint URL for an event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName) { + return getFullUrlWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); + } + + /** + * List all global event subscriptions for a topic type. + * + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param location Name of the location. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2738,34 +2157,22 @@ public PagedIterable listGlobalByResourceGroupForTopicTy * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRegionalBySubscriptionSinglePageAsync(String location, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } + private Mono> + listGlobalBySubscriptionForTopicTypeSinglePageAsync(String topicTypeName, String filter, Integer top) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listRegionalBySubscription(this.client.getEndpoint(), - this.client.getSubscriptionId(), location, this.client.getApiVersion(), filter, top, accept, context)) + return FluxUtil.withContext(context -> service.listGlobalBySubscriptionForTopicType(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), topicTypeName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all regional event subscriptions under an Azure subscription. + * List all global event subscriptions for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription. + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param location Name of the location. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2779,37 +2186,37 @@ private Mono> listRegionalBySubscriptionSi * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRegionalBySubscriptionAsync(String location, String filter, - Integer top) { - return new PagedFlux<>(() -> listRegionalBySubscriptionSinglePageAsync(location, filter, top), - nextLink -> listRegionalBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listGlobalBySubscriptionForTopicTypeAsync(String topicTypeName, + String filter, Integer top) { + return new PagedFlux<>(() -> listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName, filter, top), + nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription. + * List all global event subscriptions for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription. + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param location Name of the location. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRegionalBySubscriptionAsync(String location) { + private PagedFlux listGlobalBySubscriptionForTopicTypeAsync(String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listRegionalBySubscriptionSinglePageAsync(location, filter, top), - nextLink -> listRegionalBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listGlobalBySubscriptionForTopicTypeSinglePageAsync(topicTypeName, filter, top), + nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription. + * List all global event subscriptions for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription. + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param location Name of the location. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2823,35 +2230,22 @@ private PagedFlux listRegionalBySubscriptionAsync(String * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalBySubscriptionSinglePage(String location, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } + private PagedResponse listGlobalBySubscriptionForTopicTypeSinglePage(String topicTypeName, + String filter, Integer top) { final String accept = "application/json"; - Response res = service.listRegionalBySubscriptionSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), location, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listGlobalBySubscriptionForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), topicTypeName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all regional event subscriptions under an Azure subscription. + * List all global event subscriptions for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription. + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param location Name of the location. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2866,54 +2260,41 @@ private PagedResponse listRegionalBySubscriptionSinglePa * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalBySubscriptionSinglePage(String location, String filter, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } + private PagedResponse listGlobalBySubscriptionForTopicTypeSinglePage(String topicTypeName, + String filter, Integer top, Context context) { final String accept = "application/json"; - Response res = service.listRegionalBySubscriptionSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), location, this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listGlobalBySubscriptionForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), topicTypeName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all regional event subscriptions under an Azure subscription. + * List all global event subscriptions for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription. + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param location Name of the location. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRegionalBySubscription(String location) { + public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listRegionalBySubscriptionSinglePage(location, filter, top), - nextLink -> listRegionalBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listGlobalBySubscriptionForTopicTypeSinglePage(topicTypeName, filter, top), + nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePage(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription. + * List all global event subscriptions for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription. + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param location Name of the location. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2928,19 +2309,20 @@ public PagedIterable listRegionalBySubscription(String l * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRegionalBySubscription(String location, String filter, Integer top, - Context context) { - return new PagedIterable<>(() -> listRegionalBySubscriptionSinglePage(location, filter, top, context), - nextLink -> listRegionalBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName, + String filter, Integer top, Context context) { + return new PagedIterable<>( + () -> listGlobalBySubscriptionForTopicTypeSinglePage(topicTypeName, filter, top, context), + nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePage(nextLink, context)); } /** - * List all regional event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a resource group for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -2955,40 +2337,25 @@ public PagedIterable listRegionalBySubscription(String l * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRegionalByResourceGroupSinglePageAsync( - String resourceGroupName, String location, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } + private Mono> listGlobalByResourceGroupForTopicTypeSinglePageAsync( + String resourceGroupName, String topicTypeName, String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listRegionalByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, location, this.client.getApiVersion(), filter, top, - accept, context)) + .withContext(context -> service.listGlobalByResourceGroupForTopicType(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, topicTypeName, filter, + top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all regional event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a resource group for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3002,42 +2369,42 @@ private Mono> listRegionalByResourceGroupS * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRegionalByResourceGroupAsync(String resourceGroupName, - String location, String filter, Integer top) { + private PagedFlux listGlobalByResourceGroupForTopicTypeAsync(String resourceGroupName, + String topicTypeName, String filter, Integer top) { return new PagedFlux<>( - () -> listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location, filter, top), - nextLink -> listRegionalByResourceGroupNextSinglePageAsync(nextLink)); + () -> listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName, filter, top), + nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a resource group for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRegionalByResourceGroupAsync(String resourceGroupName, - String location) { + private PagedFlux listGlobalByResourceGroupForTopicTypeAsync(String resourceGroupName, + String topicTypeName) { final String filter = null; final Integer top = null; return new PagedFlux<>( - () -> listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location, filter, top), - nextLink -> listRegionalByResourceGroupNextSinglePageAsync(nextLink)); + () -> listGlobalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, topicTypeName, filter, top), + nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a resource group for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3051,41 +2418,23 @@ private PagedFlux listRegionalByResourceGroupAsync(Strin * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalByResourceGroupSinglePage(String resourceGroupName, - String location, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } + private PagedResponse listGlobalByResourceGroupForTopicTypeSinglePage( + String resourceGroupName, String topicTypeName, String filter, Integer top) { final String accept = "application/json"; Response res - = service.listRegionalByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, location, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listGlobalByResourceGroupForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicTypeName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all regional event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a resource group for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3100,63 +2449,45 @@ private PagedResponse listRegionalByResourceGroupSingleP * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalByResourceGroupSinglePage(String resourceGroupName, - String location, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } + private PagedResponse listGlobalByResourceGroupForTopicTypeSinglePage( + String resourceGroupName, String topicTypeName, String filter, Integer top, Context context) { final String accept = "application/json"; Response res - = service.listRegionalByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, location, this.client.getApiVersion(), filter, top, accept, context); + = service.listGlobalByResourceGroupForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicTypeName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all regional event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a resource group for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRegionalByResourceGroup(String resourceGroupName, - String location) { + public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName, + String topicTypeName) { final String filter = null; final Integer top = null; return new PagedIterable<>( - () -> listRegionalByResourceGroupSinglePage(resourceGroupName, location, filter, top), - nextLink -> listRegionalByResourceGroupNextSinglePage(nextLink)); + () -> listGlobalByResourceGroupForTopicTypeSinglePage(resourceGroupName, topicTypeName, filter, top), + nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePage(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions under a resource group for a topic type. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3171,20 +2502,19 @@ public PagedIterable listRegionalByResourceGroup(String * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRegionalByResourceGroup(String resourceGroupName, String location, - String filter, Integer top, Context context) { - return new PagedIterable<>( - () -> listRegionalByResourceGroupSinglePage(resourceGroupName, location, filter, top, context), - nextLink -> listRegionalByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName, + String topicTypeName, String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listGlobalByResourceGroupForTopicTypeSinglePage(resourceGroupName, + topicTypeName, filter, top, context), + nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePage(nextLink, context)); } /** - * List all regional event subscriptions under an Azure subscription for a topic type. + * List all regional event subscriptions under an Azure subscription. * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3199,39 +2529,23 @@ public PagedIterable listRegionalByResourceGroup(String * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRegionalBySubscriptionForTopicTypeSinglePageAsync( - String location, String topicTypeName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (topicTypeName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private Mono> listRegionalBySubscriptionSinglePageAsync(String location, + String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listRegionalBySubscriptionForTopicType(this.client.getEndpoint(), - this.client.getSubscriptionId(), location, topicTypeName, this.client.getApiVersion(), filter, top, - accept, context)) + .withContext(context -> service.listRegionalBySubscription(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all regional event subscriptions under an Azure subscription for a topic type. + * List all regional event subscriptions under an Azure subscription. * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3245,42 +2559,37 @@ private Mono> listRegionalBySubscriptionFo * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRegionalBySubscriptionForTopicTypeAsync(String location, - String topicTypeName, String filter, Integer top) { - return new PagedFlux<>( - () -> listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName, filter, top), - nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextLink)); + private PagedFlux listRegionalBySubscriptionAsync(String location, String filter, + Integer top) { + return new PagedFlux<>(() -> listRegionalBySubscriptionSinglePageAsync(location, filter, top), + nextLink -> listRegionalBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription for a topic type. + * List all regional event subscriptions under an Azure subscription. * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param location The location name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRegionalBySubscriptionForTopicTypeAsync(String location, - String topicTypeName) { + private PagedFlux listRegionalBySubscriptionAsync(String location) { final String filter = null; final Integer top = null; - return new PagedFlux<>( - () -> listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName, filter, top), - nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listRegionalBySubscriptionSinglePageAsync(location, filter, top), + nextLink -> listRegionalBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription for a topic type. + * List all regional event subscriptions under an Azure subscription. * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3294,41 +2603,21 @@ private PagedFlux listRegionalBySubscriptionForTopicType * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalBySubscriptionForTopicTypeSinglePage(String location, - String topicTypeName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private PagedResponse listRegionalBySubscriptionSinglePage(String location, String filter, + Integer top) { final String accept = "application/json"; - Response res = service.listRegionalBySubscriptionForTopicTypeSync( - this.client.getEndpoint(), this.client.getSubscriptionId(), location, topicTypeName, - this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listRegionalBySubscriptionSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all regional event subscriptions under an Azure subscription for a topic type. + * List all regional event subscriptions under an Azure subscription. * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3343,63 +2632,40 @@ private PagedResponse listRegionalBySubscriptionForTopic * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalBySubscriptionForTopicTypeSinglePage(String location, - String topicTypeName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private PagedResponse listRegionalBySubscriptionSinglePage(String location, String filter, + Integer top, Context context) { final String accept = "application/json"; - Response res = service.listRegionalBySubscriptionForTopicTypeSync( - this.client.getEndpoint(), this.client.getSubscriptionId(), location, topicTypeName, - this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listRegionalBySubscriptionSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all regional event subscriptions under an Azure subscription for a topic type. + * List all regional event subscriptions under an Azure subscription. * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param location The location name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRegionalBySubscriptionForTopicType(String location, - String topicTypeName) { + public PagedIterable listRegionalBySubscription(String location) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listRegionalBySubscriptionForTopicTypeSinglePage(location, topicTypeName, filter, top), - nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listRegionalBySubscriptionSinglePage(location, filter, top), + nextLink -> listRegionalBySubscriptionNextSinglePage(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription for a topic type. + * List all regional event subscriptions under an Azure subscription. * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3414,22 +2680,19 @@ public PagedIterable listRegionalBySubscriptionForTopicT * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRegionalBySubscriptionForTopicType(String location, - String topicTypeName, String filter, Integer top, Context context) { - return new PagedIterable<>( - () -> listRegionalBySubscriptionForTopicTypeSinglePage(location, topicTypeName, filter, top, context), - nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePage(nextLink, context)); + public PagedIterable listRegionalBySubscription(String location, String filter, Integer top, + Context context) { + return new PagedIterable<>(() -> listRegionalBySubscriptionSinglePage(location, filter, top, context), + nextLink -> listRegionalBySubscriptionNextSinglePage(nextLink, context)); } /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all regional event subscriptions under an Azure subscription and resource group. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3444,45 +2707,25 @@ public PagedIterable listRegionalBySubscriptionForTopicT * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRegionalByResourceGroupForTopicTypeSinglePageAsync( - String resourceGroupName, String location, String topicTypeName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (topicTypeName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private Mono> listRegionalByResourceGroupSinglePageAsync( + String resourceGroupName, String location, String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listRegionalByResourceGroupForTopicType(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, location, topicTypeName, - this.client.getApiVersion(), filter, top, accept, context)) + .withContext( + context -> service.listRegionalByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all regional event subscriptions under an Azure subscription and resource group. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3496,46 +2739,42 @@ private Mono> listRegionalByResourceGroupF * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRegionalByResourceGroupForTopicTypeAsync(String resourceGroupName, - String location, String topicTypeName, String filter, Integer top) { - return new PagedFlux<>(() -> listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, - topicTypeName, filter, top), - nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextLink)); + private PagedFlux listRegionalByResourceGroupAsync(String resourceGroupName, + String location, String filter, Integer top) { + return new PagedFlux<>( + () -> listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location, filter, top), + nextLink -> listRegionalByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all regional event subscriptions under an Azure subscription and resource group. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRegionalByResourceGroupForTopicTypeAsync(String resourceGroupName, - String location, String topicTypeName) { + private PagedFlux listRegionalByResourceGroupAsync(String resourceGroupName, + String location) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, - topicTypeName, filter, top), - nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextLink)); + return new PagedFlux<>( + () -> listRegionalByResourceGroupSinglePageAsync(resourceGroupName, location, filter, top), + nextLink -> listRegionalByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all regional event subscriptions under an Azure subscription and resource group. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3549,47 +2788,23 @@ private PagedFlux listRegionalByResourceGroupForTopicTyp * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalByResourceGroupForTopicTypeSinglePage( - String resourceGroupName, String location, String topicTypeName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private PagedResponse listRegionalByResourceGroupSinglePage(String resourceGroupName, + String location, String filter, Integer top) { final String accept = "application/json"; - Response res = service.listRegionalByResourceGroupForTopicTypeSync( - this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, location, topicTypeName, - this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listRegionalByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all regional event subscriptions under an Azure subscription and resource group. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3604,70 +2819,45 @@ private PagedResponse listRegionalByResourceGroupForTopi * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalByResourceGroupForTopicTypeSinglePage( - String resourceGroupName, String location, String topicTypeName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private PagedResponse listRegionalByResourceGroupSinglePage(String resourceGroupName, + String location, String filter, Integer top, Context context) { final String accept = "application/json"; - Response res = service.listRegionalByResourceGroupForTopicTypeSync( - this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, location, topicTypeName, - this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listRegionalByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all regional event subscriptions under an Azure subscription and resource group. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName, - String location, String topicTypeName) { + public PagedIterable listRegionalByResourceGroup(String resourceGroupName, + String location) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listRegionalByResourceGroupForTopicTypeSinglePage(resourceGroupName, location, - topicTypeName, filter, top), nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePage(nextLink)); + return new PagedIterable<>( + () -> listRegionalByResourceGroupSinglePage(resourceGroupName, location, filter, top), + nextLink -> listRegionalByResourceGroupNextSinglePage(nextLink)); } /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * List all regional event subscriptions under an Azure subscription and resource group. * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. - * @param topicTypeName Name of the topic type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3682,22 +2872,20 @@ public PagedIterable listRegionalByResourceGroupForTopic * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName, - String location, String topicTypeName, String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listRegionalByResourceGroupForTopicTypeSinglePage(resourceGroupName, location, - topicTypeName, filter, top, context), - nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePage(nextLink, context)); + public PagedIterable listRegionalByResourceGroup(String resourceGroupName, String location, + String filter, Integer top, Context context) { + return new PagedIterable<>( + () -> listRegionalByResourceGroupSinglePage(resourceGroupName, location, filter, top, context), + nextLink -> listRegionalByResourceGroupNextSinglePage(nextLink, context)); } /** - * List all event subscriptions. + * List all regional event subscriptions under an Azure subscription for a topic type. * - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3712,50 +2900,25 @@ public PagedIterable listRegionalByResourceGroupForTopic * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceSinglePageAsync(String resourceGroupName, - String providerNamespace, String resourceTypeName, String resourceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (providerNamespace == null) { - return Mono - .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); - } - if (resourceTypeName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private Mono> listRegionalBySubscriptionForTopicTypeSinglePageAsync( + String location, String topicTypeName, String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResource(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, providerNamespace, resourceTypeName, resourceName, this.client.getApiVersion(), - filter, top, accept, context)) + .withContext(context -> service.listRegionalBySubscriptionForTopicType(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, topicTypeName, filter, top, + accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all event subscriptions. + * List all regional event subscriptions under an Azure subscription for a topic type. * - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3769,44 +2932,42 @@ private Mono> listByResourceSinglePageAsyn * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceAsync(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName, String filter, Integer top) { - return new PagedFlux<>(() -> listByResourceSinglePageAsync(resourceGroupName, providerNamespace, - resourceTypeName, resourceName, filter, top), nextLink -> listByResourceNextSinglePageAsync(nextLink)); + private PagedFlux listRegionalBySubscriptionForTopicTypeAsync(String location, + String topicTypeName, String filter, Integer top) { + return new PagedFlux<>( + () -> listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName, filter, top), + nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextLink)); } /** - * List all event subscriptions. + * List all regional event subscriptions under an Azure subscription for a topic type. * - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceAsync(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName) { + private PagedFlux listRegionalBySubscriptionForTopicTypeAsync(String location, + String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceSinglePageAsync(resourceGroupName, providerNamespace, - resourceTypeName, resourceName, filter, top), nextLink -> listByResourceNextSinglePageAsync(nextLink)); + return new PagedFlux<>( + () -> listRegionalBySubscriptionForTopicTypeSinglePageAsync(location, topicTypeName, filter, top), + nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(nextLink)); } /** - * List all event subscriptions. + * List all regional event subscriptions under an Azure subscription for a topic type. * - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3820,51 +2981,23 @@ private PagedFlux listByResourceAsync(String resourceGro * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceSinglePage(String resourceGroupName, - String providerNamespace, String resourceTypeName, String resourceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (providerNamespace == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); - } - if (resourceTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private PagedResponse listRegionalBySubscriptionForTopicTypeSinglePage(String location, + String topicTypeName, String filter, Integer top) { final String accept = "application/json"; - Response res = service.listByResourceSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, providerNamespace, resourceTypeName, resourceName, - this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listRegionalBySubscriptionForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, topicTypeName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all event subscriptions. + * List all regional event subscriptions under an Azure subscription for a topic type. * - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3879,75 +3012,45 @@ private PagedResponse listByResourceSinglePage(String re * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceSinglePage(String resourceGroupName, - String providerNamespace, String resourceTypeName, String resourceName, String filter, Integer top, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (providerNamespace == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); - } - if (resourceTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private PagedResponse listRegionalBySubscriptionForTopicTypeSinglePage(String location, + String topicTypeName, String filter, Integer top, Context context) { final String accept = "application/json"; - Response res = service.listByResourceSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, providerNamespace, resourceTypeName, resourceName, - this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listRegionalBySubscriptionForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, topicTypeName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all event subscriptions. + * List all regional event subscriptions under an Azure subscription for a topic type. * - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResource(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName) { + public PagedIterable listRegionalBySubscriptionForTopicType(String location, + String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceSinglePage(resourceGroupName, providerNamespace, - resourceTypeName, resourceName, filter, top), nextLink -> listByResourceNextSinglePage(nextLink)); + return new PagedIterable<>( + () -> listRegionalBySubscriptionForTopicTypeSinglePage(location, topicTypeName, filter, top), + nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePage(nextLink)); } /** - * List all event subscriptions. + * List all regional event subscriptions under an Azure subscription for a topic type. * - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3962,21 +3065,22 @@ public PagedIterable listByResource(String resourceGroup * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResource(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName, String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listByResourceSinglePage(resourceGroupName, providerNamespace, - resourceTypeName, resourceName, filter, top, context), - nextLink -> listByResourceNextSinglePage(nextLink, context)); + public PagedIterable listRegionalBySubscriptionForTopicType(String location, + String topicTypeName, String filter, Integer top, Context context) { + return new PagedIterable<>( + () -> listRegionalBySubscriptionForTopicTypeSinglePage(location, topicTypeName, filter, top, context), + nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePage(nextLink, context)); } /** - * List all event subscriptions for a specific domain topic. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. * - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and + * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -3991,44 +3095,27 @@ public PagedIterable listByResource(String resourceGroup * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDomainTopicSinglePageAsync(String resourceGroupName, - String domainName, String topicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } + private Mono> listRegionalByResourceGroupForTopicTypeSinglePageAsync( + String resourceGroupName, String location, String topicTypeName, String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByDomainTopic(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, this.client.getApiVersion(), - filter, top, accept, context)) + .withContext(context -> service.listRegionalByResourceGroupForTopicType(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, location, + topicTypeName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all event subscriptions for a specific domain topic. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. * - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and + * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -4042,44 +3129,46 @@ private Mono> listByDomainTopicSinglePageA * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDomainTopicAsync(String resourceGroupName, String domainName, - String topicName, String filter, Integer top) { - return new PagedFlux<>( - () -> listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName, filter, top), - nextLink -> listByDomainTopicNextSinglePageAsync(nextLink)); + private PagedFlux listRegionalByResourceGroupForTopicTypeAsync(String resourceGroupName, + String location, String topicTypeName, String filter, Integer top) { + return new PagedFlux<>(() -> listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, + topicTypeName, filter, top), + nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextLink)); } /** - * List all event subscriptions for a specific domain topic. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. * - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and + * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDomainTopicAsync(String resourceGroupName, String domainName, - String topicName) { + private PagedFlux listRegionalByResourceGroupForTopicTypeAsync(String resourceGroupName, + String location, String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedFlux<>( - () -> listByDomainTopicSinglePageAsync(resourceGroupName, domainName, topicName, filter, top), - nextLink -> listByDomainTopicNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listRegionalByResourceGroupForTopicTypeSinglePageAsync(resourceGroupName, location, + topicTypeName, filter, top), + nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(nextLink)); } /** - * List all event subscriptions for a specific domain topic. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. * - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and + * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -4093,46 +3182,25 @@ private PagedFlux listByDomainTopicAsync(String resource * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByDomainTopicSinglePage(String resourceGroupName, - String domainName, String topicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } + private PagedResponse listRegionalByResourceGroupForTopicTypeSinglePage( + String resourceGroupName, String location, String topicTypeName, String filter, Integer top) { final String accept = "application/json"; - Response res = service.listByDomainTopicSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, this.client.getApiVersion(), - filter, top, accept, Context.NONE); + Response res = service.listRegionalByResourceGroupForTopicTypeSync( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + location, topicTypeName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all event subscriptions for a specific domain topic. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. * - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and + * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -4147,69 +3215,48 @@ private PagedResponse listByDomainTopicSinglePage(String * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByDomainTopicSinglePage(String resourceGroupName, - String domainName, String topicName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } + private PagedResponse listRegionalByResourceGroupForTopicTypeSinglePage( + String resourceGroupName, String location, String topicTypeName, String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByDomainTopicSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listRegionalByResourceGroupForTopicTypeSync( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + location, topicTypeName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all event subscriptions for a specific domain topic. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. * - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and + * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, - String topicName) { + public PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName, + String location, String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listByDomainTopicSinglePage(resourceGroupName, domainName, topicName, filter, top), - nextLink -> listByDomainTopicNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listRegionalByResourceGroupForTopicTypeSinglePage(resourceGroupName, location, + topicTypeName, filter, top), nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePage(nextLink)); } /** - * List all event subscriptions for a specific domain topic. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. * - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions from the given location under a specific Azure subscription and resource group and + * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -4221,17 +3268,19 @@ public PagedIterable listByDomainTopic(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, - String topicName, String filter, Integer top, Context context) { - return new PagedIterable<>( - () -> listByDomainTopicSinglePage(resourceGroupName, domainName, topicName, filter, top, context), - nextLink -> listByDomainTopicNextSinglePage(nextLink, context)); + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName, + String location, String topicTypeName, String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listRegionalByResourceGroupForTopicTypeSinglePage(resourceGroupName, location, + topicTypeName, filter, top, context), + nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePage(nextLink, context)); } /** + * List all global event subscriptions under an Azure subscription and resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4242,24 +3291,19 @@ public PagedIterable listByDomainTopic(String resourceGr * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGlobalBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listGlobalByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listGlobalBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listGlobalByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all global event subscriptions under an Azure subscription and resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4269,24 +3313,17 @@ private Mono> listGlobalBySubscriptionNext * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listGlobalByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listGlobalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listGlobalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all global event subscriptions under an Azure subscription and resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4297,25 +3334,18 @@ private PagedResponse listGlobalBySubscriptionNextSingle * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalBySubscriptionNextSinglePage(String nextLink, + private PagedResponse listGlobalByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listGlobalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listGlobalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all event subscriptions for a specific domain topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4326,25 +3356,18 @@ private PagedResponse listGlobalBySubscriptionNextSingle * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByDomainTopicNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listGlobalBySubscriptionForTopicTypeNext(nextLink, - this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByDomainTopicNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all event subscriptions for a specific domain topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4354,24 +3377,17 @@ private PagedResponse listGlobalBySubscriptionNextSingle * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalBySubscriptionForTopicTypeNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByDomainTopicNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res = service.listGlobalBySubscriptionForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); + Response res + = service.listByDomainTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all event subscriptions for a specific domain topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4382,80 +3398,65 @@ private PagedResponse listGlobalBySubscriptionForTopicTy * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalBySubscriptionForTopicTypeNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByDomainTopicNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res = service.listGlobalBySubscriptionForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, context); + Response res + = service.listByDomainTopicNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGlobalByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listGlobalBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listGlobalByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listGlobalBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listGlobalBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listGlobalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listGlobalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4463,28 +3464,24 @@ private PagedResponse listGlobalByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalByResourceGroupNextSinglePage(String nextLink, + private PagedResponse listGlobalBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listGlobalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listGlobalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all event subscriptions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4495,25 +3492,18 @@ private PagedResponse listGlobalByResourceGroupNextSingl * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listGlobalByResourceGroupForTopicTypeNext(nextLink, - this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByResourceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all event subscriptions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4523,24 +3513,17 @@ private PagedResponse listGlobalByResourceGroupNextSingl * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalByResourceGroupForTopicTypeNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res = service.listGlobalByResourceGroupForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); + Response res + = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all event subscriptions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4551,25 +3534,17 @@ private PagedResponse listGlobalByResourceGroupForTopicT * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listGlobalByResourceGroupForTopicTypeNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res = service.listGlobalByResourceGroupForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, context); + Response res + = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all global event subscriptions for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4580,24 +3555,20 @@ private PagedResponse listGlobalByResourceGroupForTopicT * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRegionalBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> + listGlobalBySubscriptionForTopicTypeNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listRegionalBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listGlobalBySubscriptionForTopicTypeNext(nextLink, + this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all global event subscriptions for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4607,24 +3578,17 @@ private Mono> listRegionalBySubscriptionNe * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listGlobalBySubscriptionForTopicTypeNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res - = service.listRegionalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listGlobalBySubscriptionForTopicTypeNextSync(nextLink, + this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all global event subscriptions for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4635,25 +3599,18 @@ private PagedResponse listRegionalBySubscriptionNextSing * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalBySubscriptionNextSinglePage(String nextLink, + private PagedResponse listGlobalBySubscriptionForTopicTypeNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listRegionalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listGlobalBySubscriptionForTopicTypeNextSync(nextLink, + this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all global event subscriptions under a resource group for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4665,23 +3622,19 @@ private PagedResponse listRegionalBySubscriptionNextSing */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listRegionalByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + listGlobalByResourceGroupForTopicTypeNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.listRegionalByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext(context -> service.listGlobalByResourceGroupForTopicTypeNext(nextLink, + this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all global event subscriptions under a resource group for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4691,24 +3644,17 @@ private PagedResponse listRegionalBySubscriptionNextSing * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listGlobalByResourceGroupForTopicTypeNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res - = service.listRegionalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listGlobalByResourceGroupForTopicTypeNextSync(nextLink, + this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all global event subscriptions under a resource group for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4719,25 +3665,18 @@ private PagedResponse listRegionalByResourceGroupNextSin * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalByResourceGroupNextSinglePage(String nextLink, + private PagedResponse listGlobalByResourceGroupForTopicTypeNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listRegionalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listGlobalByResourceGroupForTopicTypeNextSync(nextLink, + this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all regional event subscriptions under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4748,25 +3687,19 @@ private PagedResponse listRegionalByResourceGroupNextSin * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listRegionalBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listRegionalBySubscriptionForTopicTypeNext(nextLink, - this.client.getEndpoint(), accept, context)) + .withContext( + context -> service.listRegionalBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all regional event subscriptions under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4776,25 +3709,17 @@ private PagedResponse listRegionalByResourceGroupNextSin * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listRegionalBySubscriptionForTopicTypeNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listRegionalBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res = service.listRegionalBySubscriptionForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); + Response res + = service.listRegionalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all regional event subscriptions under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4805,25 +3730,18 @@ private PagedResponse listRegionalByResourceGroupNextSin * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalBySubscriptionForTopicTypeNextSinglePage(String nextLink, + private PagedResponse listRegionalBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listRegionalBySubscriptionForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, context); + Response res + = service.listRegionalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all regional event subscriptions under an Azure subscription and resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4835,24 +3753,18 @@ private PagedResponse listRegionalBySubscriptionForTopic */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + listRegionalByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listRegionalByResourceGroupForTopicTypeNext(nextLink, - this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext( + context -> service.listRegionalByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all regional event subscriptions under an Azure subscription and resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4862,25 +3774,17 @@ private PagedResponse listRegionalBySubscriptionForTopic * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listRegionalByResourceGroupForTopicTypeNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listRegionalByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res = service.listRegionalByResourceGroupForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); + Response res + = service.listRegionalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all regional event subscriptions under an Azure subscription and resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4891,25 +3795,18 @@ private PagedResponse listRegionalBySubscriptionForTopic * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRegionalByResourceGroupForTopicTypeNextSinglePage(String nextLink, + private PagedResponse listRegionalByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listRegionalByResourceGroupForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, context); + Response res + = service.listRegionalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4920,23 +3817,20 @@ private PagedResponse listRegionalByResourceGroupForTopi * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> + listRegionalBySubscriptionForTopicTypeNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listRegionalBySubscriptionForTopicTypeNext(nextLink, + this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4946,24 +3840,18 @@ private Mono> listByResourceNextSinglePage * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse + listRegionalBySubscriptionForTopicTypeNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res - = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listRegionalBySubscriptionForTopicTypeNextSync(nextLink, + this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all regional event subscriptions under an Azure subscription for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -4974,24 +3862,18 @@ private PagedResponse listByResourceNextSinglePage(Strin * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listRegionalBySubscriptionForTopicTypeNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; - Response res - = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listRegionalBySubscriptionForTopicTypeNextSync(nextLink, + this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5002,23 +3884,20 @@ private PagedResponse listByResourceNextSinglePage(Strin * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDomainTopicNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> + listRegionalByResourceGroupForTopicTypeNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByDomainTopicNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listRegionalByResourceGroupForTopicTypeNext(nextLink, + this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5028,24 +3907,18 @@ private Mono> listByDomainTopicNextSingleP * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByDomainTopicNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse + listRegionalByResourceGroupForTopicTypeNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res - = service.listByDomainTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listRegionalByResourceGroupForTopicTypeNextSync(nextLink, + this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5056,22 +3929,12 @@ private PagedResponse listByDomainTopicNextSinglePage(St * @return result of the List EventSubscriptions operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByDomainTopicNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listRegionalByResourceGroupForTopicTypeNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; - Response res - = service.listByDomainTopicNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listRegionalByResourceGroupForTopicTypeNextSync(nextLink, + this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(EventSubscriptionsClientImpl.class); } 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 cacb8b9350afa..7bf2b83c088d2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,37 +31,37 @@ public EventSubscriptionsImpl(EventSubscriptionsClient innerClient, this.serviceManager = serviceManager; } - public Response getDeliveryAttributesWithResponse(String scope, - String eventSubscriptionName, Context context) { - Response inner - = this.serviceClient().getDeliveryAttributesWithResponse(scope, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner - = this.serviceClient().getDeliveryAttributes(scope, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, + String topicName) { + PagedIterable inner + = this.serviceClient().listByDomainTopic(resourceGroupName, domainName, topicName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, + String topicName, String filter, Integer top, Context context) { + PagedIterable inner + = this.serviceClient().listByDomainTopic(resourceGroupName, domainName, topicName, filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } public Response getWithResponse(String scope, String eventSubscriptionName, Context context) { Response inner = this.serviceClient().getWithResponse(scope, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionImpl(inner.getValue(), this.manager())); } public EventSubscription get(String scope, String eventSubscriptionName) { @@ -81,18 +81,56 @@ public void delete(String scope, String eventSubscriptionName, Context context) this.serviceClient().delete(scope, eventSubscriptionName, context); } - public Response getFullUrlWithResponse(String scope, String eventSubscriptionName, - Context context) { - Response inner - = this.serviceClient().getFullUrlWithResponse(scope, eventSubscriptionName, context); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable listByResource(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName) { + PagedIterable inner + = this.serviceClient().listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable listByResource(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName, String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient() + .listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public Response getDeliveryAttributesWithResponse(String scope, + String eventSubscriptionName, Context context) { + Response inner + = this.serviceClient().getDeliveryAttributesWithResponse(scope, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } + + public DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner + = this.serviceClient().getDeliveryAttributes(scope, eventSubscriptionName); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + return new DeliveryAttributeListResultImpl(inner, this.manager()); } else { return null; } } + public Response getFullUrlWithResponse(String scope, String eventSubscriptionName, + Context context) { + Response inner + = this.serviceClient().getFullUrlWithResponse(scope, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + } + public EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptionName) { EventSubscriptionFullUrlInner inner = this.serviceClient().getFullUrl(scope, eventSubscriptionName); if (inner != null) { @@ -102,16 +140,6 @@ public EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptio } } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName) { PagedIterable inner = this.serviceClient().listGlobalBySubscriptionForTopicType(topicTypeName); @@ -125,18 +153,6 @@ public PagedIterable listGlobalBySubscriptionForTopicType(Str return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName, String topicTypeName) { PagedIterable inner @@ -204,34 +220,6 @@ public PagedIterable listRegionalByResourceGroupForTopicType( return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public PagedIterable listByResource(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName) { - PagedIterable inner - = this.serviceClient().listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable listByResource(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName, String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient() - .listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, - String topicName) { - PagedIterable inner - = this.serviceClient().listByDomainTopic(resourceGroupName, domainName, topicName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, - String topicName, String filter, Integer top, Context context) { - PagedIterable inner - = this.serviceClient().listByDomainTopic(resourceGroupName, domainName, topicName, filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - public EventSubscription getById(String id) { String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", "scope"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventTypeImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventTypeImpl.java index f7fcfe23bc25a..07b27b2c256e2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventTypeImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventTypeImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.EventTypeInner; import com.azure.resourcemanager.eventgrid.models.EventType; @@ -29,6 +30,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicImpl.java index 57f17c6c2bcb9..d3449ffb912f9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java index 748c3e7194594..33f1cf78ea1f4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -21,7 +21,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.eventgrid.fluent.ExtensionTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.ExtensionTopicInner; import reactor.core.publisher.Mono; @@ -55,22 +54,24 @@ public final class ExtensionTopicsClientImpl implements ExtensionTopicsClient { * The interface defining all the services for EventGridManagementClientExtensionTopics to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientExtensionTopics") public interface ExtensionTopicsService { @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.EventGrid/extensionTopics/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, @PathParam("scope") String scope, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.EventGrid/extensionTopics/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, @PathParam("scope") String scope, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @HeaderParam("Accept") String accept, Context context); } /** @@ -78,31 +79,20 @@ Response getSync(@HostParam("$host") String endpoint, @Path * * Get the properties of an extension topic. * - * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, - * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an extension topic along with {@link Response} on successful completion of - * {@link Mono}. + * @return properties of an extension topic. + * + * Get the properties of an extension topic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String scope) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.get(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context)) + context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -111,16 +101,13 @@ private Mono> getWithResponseAsync(String scope) { * * Get the properties of an extension topic. * - * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, - * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an extension topic on successful completion of {@link Mono}. + * @return properties of an extension topic. + * + * Get the properties of an extension topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String scope) { @@ -132,30 +119,19 @@ private Mono getAsync(String scope) { * * Get the properties of an extension topic. * - * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, - * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an extension topic along with {@link Response}. + * @return properties of an extension topic. + * + * Get the properties of an extension topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String scope, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context); } /** @@ -163,21 +139,16 @@ public Response getWithResponse(String scope, Context conte * * Get the properties of an extension topic. * - * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, - * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an extension topic. + * @return properties of an extension topic. + * + * Get the properties of an extension topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public ExtensionTopicInner get(String scope) { return getWithResponse(scope, Context.NONE).getValue(); } - - private static final ClientLogger LOGGER = new ClientLogger(ExtensionTopicsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java index f422e76df9ae8..b7ba21ea7f6e2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -28,12 +28,8 @@ public ExtensionTopicsImpl(ExtensionTopicsClient innerClient, public Response getWithResponse(String scope, Context context) { Response inner = this.serviceClient().getWithResponse(scope, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ExtensionTopicImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExtensionTopicImpl(inner.getValue(), this.manager())); } public ExtensionTopic get(String scope) { 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 74f746a8c8ec9..6bbb243de49b6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -10,9 +10,11 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.eventgrid.models.AutoScaleConfiguration; import com.azure.resourcemanager.eventgrid.models.CustomDomainOwnershipValidationResult; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.IpAddressType; import com.azure.resourcemanager.eventgrid.models.Namespace; import com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; @@ -24,6 +26,7 @@ import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; +import com.azure.resourcemanager.eventgrid.models.UpdateAutoScaleConfiguration; import com.azure.resourcemanager.eventgrid.models.UpdateTopicSpacesConfigurationInfo; import com.azure.resourcemanager.eventgrid.models.UpdateTopicsConfigurationInfo; import java.util.Collections; @@ -117,6 +120,14 @@ public TlsVersion minimumTlsVersionAllowed() { return this.innerModel().minimumTlsVersionAllowed(); } + public IpAddressType ipAddressType() { + return this.innerModel().ipAddressType(); + } + + public AutoScaleConfiguration autoScaleConfiguration() { + return this.innerModel().autoScaleConfiguration(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -322,6 +333,21 @@ public NamespaceImpl withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAl return this; } + public NamespaceImpl withIpAddressType(IpAddressType ipAddressType) { + if (isInCreateMode()) { + this.innerModel().withIpAddressType(ipAddressType); + return this; + } else { + this.updateNamespaceUpdateParameters.withIpAddressType(ipAddressType); + return this; + } + } + + public NamespaceImpl withAutoScaleConfiguration(AutoScaleConfiguration autoScaleConfiguration) { + this.innerModel().withAutoScaleConfiguration(autoScaleConfiguration); + return this; + } + public NamespaceImpl withTopicSpacesConfiguration(UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration) { this.updateNamespaceUpdateParameters.withTopicSpacesConfiguration(topicSpacesConfiguration); return this; @@ -332,6 +358,11 @@ public NamespaceImpl withTopicsConfiguration(UpdateTopicsConfigurationInfo topic return this; } + public NamespaceImpl withAutoScaleConfiguration(UpdateAutoScaleConfiguration autoScaleConfiguration) { + this.updateNamespaceUpdateParameters.withAutoScaleConfiguration(autoScaleConfiguration); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceSharedAccessKeysImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceSharedAccessKeysImpl.java index 4bb560ea7dbbb..0e88d7bc06a33 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceSharedAccessKeysImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceSharedAccessKeysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 318dd486afe0b..2f2ffbdaa4406 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient; 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.implementation.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; @@ -74,165 +73,157 @@ public final class NamespaceTopicEventSubscriptionsClientImpl implements Namespa * The interface defining all the services for EventGridManagementClientNamespaceTopicEventSubscriptions to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientNamespaceTopicEventSubscriptions") public interface NamespaceTopicEventSubscriptionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespaceTopic(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespaceTopic(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("topicName") String topicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByNamespaceTopicSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByNamespaceTopicSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("topicName") String topicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getDeliveryAttributes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getDeliveryAttributesSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getDeliveryAttributesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getFullUrl(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getFullUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getFullUrlSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getFullUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceTopicNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -240,7 +231,7 @@ Mono> listByNamespaceTopicNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByNamespaceTopicNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -249,46 +240,26 @@ Response listByNamespaceTopicNextSync( * * Get properties of an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic along with {@link Response} on successful - * completion of {@link Mono}. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -297,14 +268,16 @@ private Mono> getWithResponseAsync(String resourceGr * * Get properties of an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic on successful completion of {@link Mono}. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String namespaceName, String topicName, @@ -318,7 +291,7 @@ private Mono getAsync(String resourceGroupName, String namesp * * Get properties of an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param eventSubscriptionName Name of the event subscription to be found. @@ -326,40 +299,16 @@ private Mono getAsync(String resourceGroupName, String namesp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic along with {@link Response}. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, namespaceName, topicName, eventSubscriptionName, accept, context); } /** @@ -367,14 +316,16 @@ public Response getWithResponse(String resourceGroupName, Str * * Get properties of an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public SubscriptionInner get(String resourceGroupName, String namespaceName, String topicName, @@ -389,11 +340,10 @@ public SubscriptionInner get(String resourceGroupName, String namespaceName, Str * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -404,39 +354,12 @@ public SubscriptionInner get(String resourceGroupName, String namespaceName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -446,11 +369,10 @@ private Mono>> createOrUpdateWithResponseAsync(String * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -461,42 +383,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionInfo, Context.NONE); } /** @@ -505,11 +396,10 @@ private Response createOrUpdateWithResponse(String resourceGroupName * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @param context The context to associate with this operation. @@ -521,42 +411,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionInfo, context); } /** @@ -565,11 +424,10 @@ private Response createOrUpdateWithResponse(String resourceGroupName * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -593,11 +451,10 @@ private PollerFlux, SubscriptionInner> beginCreate * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -620,11 +477,10 @@ public SyncPoller, SubscriptionInner> beginCreateO * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @param context The context to associate with this operation. @@ -649,11 +505,10 @@ public SyncPoller, SubscriptionInner> beginCreateO * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -674,11 +529,10 @@ private Mono createOrUpdateAsync(String resourceGroupName, St * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -699,11 +553,10 @@ public SubscriptionInner createOrUpdate(String resourceGroupName, String namespa * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 50 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and * others. * @param context The context to associate with this operation. @@ -720,587 +573,421 @@ public SubscriptionInner createOrUpdate(String resourceGroupName, String namespa } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, - String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, + String topicName, String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, Context.NONE); } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, context); } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName, - String topicName, String eventSubscriptionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, SubscriptionInner> beginUpdateAsync(String resourceGroupName, + String namespaceName, String topicName, String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, namespaceName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SubscriptionInner.class, SubscriptionInner.class, this.client.getContext()); } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, - String topicName, String eventSubscriptionName) { - Response response - = deleteWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, + String namespaceName, String topicName, String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, namespaceName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters); + return this.client.getLroResult(response, SubscriptionInner.class, + SubscriptionInner.class, Context.NONE); } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, - String topicName, String eventSubscriptionName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, + String namespaceName, String topicName, String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, namespaceName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters, context); + return this.client.getLroResult(response, SubscriptionInner.class, + SubscriptionInner.class, context); } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return event Subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdateAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, namespaceName, topicName, eventSubscriptionName).getFinalResult(); + public SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters).getFinalResult(); } /** - * Delete an event subscription of a namespace topic. + * Update event subscription of a namespace topic. * - * Delete an existing event subscription of a namespace topic. + * Update an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, - Context context) { - beginDelete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context).getFinalResult(); + public SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, context).getFinalResult(); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, - String topicName, String eventSubscriptionName, - SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, + String topicName, String eventSubscriptionName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + Context.NONE); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + context); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Subscription. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SubscriptionInner> beginUpdateAsync(String resourceGroupName, - String namespaceName, String topicName, String eventSubscriptionName, - SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, namespaceName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SubscriptionInner.class, SubscriptionInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName, + String topicName, String eventSubscriptionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, - String namespaceName, String topicName, String eventSubscriptionName, - SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, namespaceName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, SubscriptionInner.class, - SubscriptionInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, + String topicName, String eventSubscriptionName) { + Response response + = deleteWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, - String namespaceName, String topicName, String eventSubscriptionName, - SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, namespaceName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters, context); - return this.client.getLroResult(response, SubscriptionInner.class, - SubscriptionInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, + String topicName, String eventSubscriptionName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String namespaceName, String topicName, + String eventSubscriptionName) { + return beginDeleteAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters).getFinalResult(); + public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + beginDelete(resourceGroupName, namespaceName, topicName, eventSubscriptionName).getFinalResult(); } /** - * Update event subscription of a namespace topic. + * Delete an event subscription of a namespace topic. * - * Update an existing event subscription of a namespace topic. + * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, - String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, + Context context) { + beginDelete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context).getFinalResult(); } /** @@ -1308,7 +995,7 @@ public SubscriptionInner update(String resourceGroupName, String namespaceName, * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1327,29 +1014,11 @@ public SubscriptionInner update(String resourceGroupName, String namespaceName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceTopicSinglePageAsync(String resourceGroupName, String namespaceName, String topicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByNamespaceTopic(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByNamespaceTopic(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, filter, top, accept, + context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1360,7 +1029,7 @@ private Mono> listByNamespaceTopicSinglePageAsy * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1388,7 +1057,7 @@ private PagedFlux listByNamespaceTopicAsync(String resourceGr * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1411,7 +1080,7 @@ private PagedFlux listByNamespaceTopicAsync(String resourceGr * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1429,31 +1098,9 @@ private PagedFlux listByNamespaceTopicAsync(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceTopicSinglePage(String resourceGroupName, String namespaceName, String topicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceTopicSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1464,7 +1111,7 @@ private PagedResponse listByNamespaceTopicSinglePage(String r * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1483,32 +1130,10 @@ private PagedResponse listByNamespaceTopicSinglePage(String r @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceTopicSinglePage(String resourceGroupName, String namespaceName, String topicName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listByNamespaceTopicSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listByNamespaceTopicSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, + filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1518,7 +1143,7 @@ private PagedResponse listByNamespaceTopicSinglePage(String r * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1541,7 +1166,7 @@ public PagedIterable listByNamespaceTopic(String resourceGrou * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1570,46 +1195,26 @@ public PagedIterable listByNamespaceTopic(String resourceGrou * * Get all delivery attributes for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic along with {@link Response} on + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeliveryAttributesWithResponseAsync( String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, - this.client.getApiVersion(), accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, + topicName, eventSubscriptionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1618,14 +1223,16 @@ private Mono> getDeliveryAttributesWi * * Get all delivery attributes for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic on successful completion of + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1640,48 +1247,24 @@ private Mono getDeliveryAttributesAsync(String * * Get all delivery attributes for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic along with {@link Response}. + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, + return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, accept, context); } @@ -1690,14 +1273,16 @@ public Response getDeliveryAttributesWithRespo * * Get all delivery attributes for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic. + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String namespaceName, @@ -1711,46 +1296,26 @@ public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGro * * Get the full endpoint URL for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic along with {@link Response} on + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getFullUrlWithResponseAsync(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, - context)) + .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1759,14 +1324,16 @@ private Mono> getFullUrlWithResponseAsync(Str * * Get the full endpoint URL for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic on successful completion of + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1781,48 +1348,25 @@ private Mono getFullUrlAsync(String resourceGroupName, * * Get the full endpoint URL for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getFullUrlSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, accept, + context); } /** @@ -1830,14 +1374,16 @@ public Response getFullUrlWithResponse(String resource * * Get the full endpoint URL for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic. + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public SubscriptionFullUrlInner getFullUrl(String resourceGroupName, String namespaceName, String topicName, @@ -1847,6 +1393,8 @@ public SubscriptionFullUrlInner getFullUrl(String resourceGroupName, String name } /** + * List event subscriptions of a namespace topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1858,13 +1406,6 @@ public SubscriptionFullUrlInner getFullUrl(String resourceGroupName, String name */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceTopicNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1875,6 +1416,8 @@ private Mono> listByNamespaceTopicNextSinglePag } /** + * List event subscriptions of a namespace topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1885,15 +1428,6 @@ private Mono> listByNamespaceTopicNextSinglePag */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceTopicNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1902,6 +1436,8 @@ private PagedResponse listByNamespaceTopicNextSinglePage(Stri } /** + * List event subscriptions of a namespace topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1913,21 +1449,10 @@ private PagedResponse listByNamespaceTopicNextSinglePage(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceTopicNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceTopicNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(NamespaceTopicEventSubscriptionsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java index cf2450086acad..d20457a659b64 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -35,12 +35,8 @@ public Response getWithResponse(String resourceGroupName, String n String eventSubscriptionName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SubscriptionImpl(inner.getValue(), this.manager())); } public Subscription get(String resourceGroupName, String namespaceName, String topicName, @@ -82,12 +78,8 @@ public Response getDeliveryAttributesWithResponse(S Response inner = this.serviceClient() .getDeliveryAttributesWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); } public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String namespaceName, @@ -105,12 +97,8 @@ public Response getFullUrlWithResponse(String resourceGroup String topicName, String eventSubscriptionName, Context context) { Response inner = this.serviceClient() .getFullUrlWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SubscriptionFullUrlImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SubscriptionFullUrlImpl(inner.getValue(), this.manager())); } public SubscriptionFullUrl getFullUrl(String resourceGroupName, String namespaceName, String topicName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java index 6a04537ab36bc..cf9224ce0aef1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 5e0ca4179a09a..568dcf7278278 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,14 +32,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; import com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.implementation.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; @@ -74,161 +73,151 @@ public final class NamespaceTopicsClientImpl implements NamespaceTopicsClient { * The interface defining all the services for EventGridManagementClientNamespaceTopics to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientNamespaceTopics") public interface NamespaceTopicsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicName") String topicName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicName") String topicName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NamespaceTopicInner namespaceTopicInfo, @HeaderParam("Accept") String accept, + @PathParam("topicName") String topicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NamespaceTopicInner namespaceTopicInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NamespaceTopicInner namespaceTopicInfo, @HeaderParam("Accept") String accept, + @PathParam("topicName") String topicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NamespaceTopicInner namespaceTopicInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, + @PathParam("topicName") String topicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, + @PathParam("topicName") String topicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByNamespaceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByNamespaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSharedAccessKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listSharedAccessKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicName") String topicName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSharedAccessKeysSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSharedAccessKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicName") String topicName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/regenerateKey") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKey(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> regenerateKey(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicName") String topicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/regenerateKey") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response regenerateKeySync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response regenerateKeySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicName") String topicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicName") String topicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -236,7 +225,7 @@ Mono> listByNamespaceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByNamespaceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -245,39 +234,23 @@ Response listByNamespaceNextSync( * * Get properties of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic along with {@link Response} on successful completion of {@link Mono}. + * @return a namespace topic. + * + * Get properties of a namespace topic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String topicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -286,13 +259,15 @@ private Mono> getWithResponseAsync(String resource * * Get properties of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic on successful completion of {@link Mono}. + * @return a namespace topic. + * + * Get properties of a namespace topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String namespaceName, String topicName) { @@ -305,43 +280,23 @@ private Mono getAsync(String resourceGroupName, String name * * Get properties of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic along with {@link Response}. + * @return a namespace topic. + * + * Get properties of a namespace topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String topicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, namespaceName, topicName, accept, context); } /** @@ -349,13 +304,15 @@ public Response getWithResponse(String resourceGroupName, S * * Get properties of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic. + * @return a namespace topic. + * + * Get properties of a namespace topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceTopicInner get(String resourceGroupName, String namespaceName, String topicName) { @@ -367,7 +324,7 @@ public NamespaceTopicInner get(String resourceGroupName, String namespaceName, S * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -379,35 +336,12 @@ public NamespaceTopicInner get(String resourceGroupName, String namespaceName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (namespaceTopicInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter namespaceTopicInfo is required and cannot be null.")); - } else { - namespaceTopicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), namespaceTopicInfo, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + namespaceTopicInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -416,7 +350,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -428,37 +362,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (namespaceTopicInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceTopicInfo is required and cannot be null.")); - } else { - namespaceTopicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), namespaceTopicInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + namespaceTopicInfo, Context.NONE); } /** @@ -466,7 +374,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -479,37 +387,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (namespaceTopicInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceTopicInfo is required and cannot be null.")); - } else { - namespaceTopicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), namespaceTopicInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + namespaceTopicInfo, context); } /** @@ -517,7 +399,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -540,7 +422,7 @@ private PollerFlux, NamespaceTopicInner> beginCr * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -563,7 +445,7 @@ public SyncPoller, NamespaceTopicInner> beginCre * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -588,7 +470,7 @@ public SyncPoller, NamespaceTopicInner> beginCre * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -609,7 +491,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -629,7 +511,7 @@ public NamespaceTopicInner createOrUpdate(String resourceGroupName, String names * * Asynchronously creates a new namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param namespaceTopicInfo Namespace topic information. @@ -647,534 +529,391 @@ public NamespaceTopicInner createOrUpdate(String resourceGroupName, String names } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return namespace topic details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, - String topicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, + String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + namespaceTopicUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return namespace topic details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + namespaceTopicUpdateParameters, Context.NONE); } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return namespace topic details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + namespaceTopicUpdateParameters, context); } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of namespace topic details. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName, - String topicName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName, topicName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, NamespaceTopicInner> beginUpdateAsync(String resourceGroupName, + String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NamespaceTopicInner.class, NamespaceTopicInner.class, this.client.getContext()); } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of namespace topic details. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, - String topicName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, topicName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, + String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + Response response + = updateWithResponse(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters); + return this.client.getLroResult(response, NamespaceTopicInner.class, + NamespaceTopicInner.class, Context.NONE); } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of namespace topic details. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, - String topicName, Context context) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, topicName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, + String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + Context context) { + Response response + = updateWithResponse(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context); + return this.client.getLroResult(response, NamespaceTopicInner.class, + NamespaceTopicInner.class, context); } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return namespace topic details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String namespaceName, String topicName) { - return beginDeleteAsync(resourceGroupName, namespaceName, topicName).last() + private Mono updateAsync(String resourceGroupName, String namespaceName, String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + return beginUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return namespace topic details. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String namespaceName, String topicName) { - beginDelete(resourceGroupName, namespaceName, topicName).getFinalResult(); + public NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + return beginUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters) + .getFinalResult(); } /** - * Delete a namespace topic. + * Update a namespace topic. * - * Delete existing namespace topic. + * Asynchronously updates a namespace topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return namespace topic details. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String namespaceName, String topicName, Context context) { - beginDelete(resourceGroupName, namespaceName, topicName, context).getFinalResult(); + public NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context) + .getFinalResult(); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, - String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (namespaceTopicUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter namespaceTopicUpdateParameters is required and cannot be null.")); - } else { - namespaceTopicUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, + String topicName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), - namespaceTopicUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, - NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (namespaceTopicUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter namespaceTopicUpdateParameters is required and cannot be null.")); - } else { - namespaceTopicUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), namespaceTopicUpdateParameters, accept, - Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, Context.NONE); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, - NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (namespaceTopicUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter namespaceTopicUpdateParameters is required and cannot be null.")); - } else { - namespaceTopicUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), namespaceTopicUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, context); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of namespace topic details. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NamespaceTopicInner> beginUpdateAsync(String resourceGroupName, - String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NamespaceTopicInner.class, NamespaceTopicInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName, + String topicName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName, topicName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace topic details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, - String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters); - return this.client.getLroResult(response, NamespaceTopicInner.class, - NamespaceTopicInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, + String topicName) { + Response response = deleteWithResponse(resourceGroupName, namespaceName, topicName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace topic details. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, - String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, - Context context) { - Response response - = updateWithResponse(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context); - return this.client.getLroResult(response, NamespaceTopicInner.class, - NamespaceTopicInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, + String topicName, Context context) { + Response response = deleteWithResponse(resourceGroupName, namespaceName, topicName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String namespaceName, String topicName, - NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - return beginUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters).last() + private Mono deleteAsync(String resourceGroupName, String namespaceName, String topicName) { + return beginDeleteAsync(resourceGroupName, namespaceName, topicName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, - NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - return beginUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters) - .getFinalResult(); + public void delete(String resourceGroupName, String namespaceName, String topicName) { + beginDelete(resourceGroupName, namespaceName, topicName).getFinalResult(); } /** - * Update a namespace topic. + * Delete a namespace topic. * - * Asynchronously updates a namespace topic with the specified parameters. + * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, - NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context) - .getFinalResult(); + public void delete(String resourceGroupName, String namespaceName, String topicName, Context context) { + beginDelete(resourceGroupName, namespaceName, topicName, context).getFinalResult(); } /** @@ -1182,7 +921,7 @@ public NamespaceTopicInner update(String resourceGroupName, String namespaceName * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1200,25 +939,10 @@ public NamespaceTopicInner update(String resourceGroupName, String namespaceName @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1229,7 +953,7 @@ private Mono> listByNamespaceSinglePageAsync( * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1255,7 +979,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroup * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1275,7 +999,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroup * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1292,28 +1016,10 @@ private PagedFlux listByNamespaceAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1323,7 +1029,7 @@ private PagedResponse listByNamespaceSinglePage(String reso * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1341,28 +1047,10 @@ private PagedResponse listByNamespaceSinglePage(String reso @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1372,7 +1060,7 @@ private PagedResponse listByNamespaceSinglePage(String reso * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1392,7 +1080,7 @@ public PagedIterable listByNamespace(String resourceGroupNa * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1420,9 +1108,9 @@ public PagedIterable listByNamespace(String resourceGroupNa * * List the two keys used to publish to a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1431,29 +1119,10 @@ public PagedIterable listByNamespace(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSharedAccessKeysWithResponseAsync(String resourceGroupName, String namespaceName, String topicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1462,9 +1131,9 @@ private Mono> listSharedAccessKeysWithRespo * * List the two keys used to publish to a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1482,9 +1151,9 @@ private Mono listSharedAccessKeysAsync(String resour * * List the two keys used to publish to a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1494,31 +1163,9 @@ private Mono listSharedAccessKeysAsync(String resour @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String namespaceName, String topicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), accept, context); + return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, accept, context); } /** @@ -1526,9 +1173,9 @@ public Response listSharedAccessKeysWithResponse(Str * * List the two keys used to publish to a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1545,9 +1192,9 @@ public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1557,35 +1204,12 @@ public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> regenerateKeyWithResponseAsync(String resourceGroupName, String namespaceName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicName, this.client.getApiVersion(), regenerateKeyRequest, accept, - context)) + .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + regenerateKeyRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1594,9 +1218,9 @@ private Mono>> regenerateKeyWithResponseAsync(String r * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1606,37 +1230,11 @@ private Mono>> regenerateKeyWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String namespaceName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), regenerateKeyRequest, accept, Context.NONE); + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + regenerateKeyRequest, Context.NONE); } /** @@ -1644,9 +1242,9 @@ private Response regenerateKeyWithResponse(String resourceGroupName, * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1657,37 +1255,11 @@ private Response regenerateKeyWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String namespaceName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicName, this.client.getApiVersion(), regenerateKeyRequest, accept, context); + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, + regenerateKeyRequest, context); } /** @@ -1695,9 +1267,9 @@ private Response regenerateKeyWithResponse(String resourceGroupName, * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1720,9 +1292,9 @@ private PollerFlux, TopicSharedAccessKeys * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1744,9 +1316,9 @@ public SyncPoller, TopicSharedAccessKeysI * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1769,9 +1341,9 @@ public SyncPoller, TopicSharedAccessKeysI * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1790,9 +1362,9 @@ private Mono regenerateKeyAsync(String resourceGroup * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1810,9 +1382,9 @@ public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1828,6 +1400,8 @@ public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String } /** + * List namespace topics under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1839,13 +1413,6 @@ public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1855,6 +1422,8 @@ private Mono> listByNamespaceNextSinglePageAs } /** + * List namespace topics under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1865,15 +1434,6 @@ private Mono> listByNamespaceNextSinglePageAs */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1882,6 +1442,8 @@ private PagedResponse listByNamespaceNextSinglePage(String } /** + * List namespace topics under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1893,21 +1455,10 @@ private PagedResponse listByNamespaceNextSinglePage(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(NamespaceTopicsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java index 78de835792289..2e9ff4fd3298f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -34,12 +34,8 @@ public Response getWithResponse(String resourceGroupName, String Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, namespaceName, topicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NamespaceTopicImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NamespaceTopicImpl(inner.getValue(), this.manager())); } public NamespaceTopic get(String resourceGroupName, String namespaceName, String topicName) { @@ -76,12 +72,8 @@ public Response listSharedAccessKeysWithResponse(String r String namespaceName, String topicName, Context context) { Response inner = this.serviceClient() .listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, topicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TopicSharedAccessKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TopicSharedAccessKeysImpl(inner.getValue(), this.manager())); } public TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String namespaceName, 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 92a1428322438..16eb98474fd3e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,16 +32,15 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.NamespacesClient; import com.azure.resourcemanager.eventgrid.fluent.models.CustomDomainOwnershipValidationResultInner; import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.implementation.models.NamespacesListResult; import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; import com.azure.resourcemanager.eventgrid.models.NamespaceUpdateParameters; -import com.azure.resourcemanager.eventgrid.models.NamespacesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -75,122 +74,114 @@ public final class NamespacesClientImpl implements NamespacesClient { * The interface defining all the services for EventGridManagementClientNamespaces to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientNamespaces") public interface NamespacesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") NamespaceInner namespaceInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NamespaceInner namespaceInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") NamespaceInner namespaceInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NamespaceInner namespaceInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NamespaceUpdateParameters namespaceUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NamespaceUpdateParameters namespaceUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NamespaceUpdateParameters namespaceUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NamespaceUpdateParameters namespaceUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -198,90 +189,86 @@ Response listByResourceGroupSync(@HostParam("$host") Strin @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSharedAccessKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listSharedAccessKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSharedAccessKeysSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSharedAccessKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/regenerateKey") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKey(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> regenerateKey(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NamespaceRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NamespaceRegenerateKeyRequest regenerateKeyRequest, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/regenerateKey") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response regenerateKeySync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response regenerateKeySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NamespaceRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NamespaceRegenerateKeyRequest regenerateKeyRequest, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/validateCustomDomainOwnership") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateCustomDomainOwnership(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> validateCustomDomainOwnership(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/validateCustomDomainOwnership") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response validateCustomDomainOwnershipSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response validateCustomDomainOwnershipSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -290,36 +277,22 @@ Response listByResourceGroupNextSync( * * Get properties of a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace along with {@link Response} on successful completion of {@link Mono}. + * @return a namespace. + * + * Get properties of a namespace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String namespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -328,12 +301,14 @@ private Mono> getByResourceGroupWithResponseAsync(Strin * * Get properties of a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace on successful completion of {@link Mono}. + * @return a namespace. + * + * Get properties of a namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName) { @@ -346,38 +321,22 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S * * Get properties of a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace along with {@link Response}. + * @return a namespace. + * + * Get properties of a namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context); } /** @@ -385,12 +344,14 @@ public Response getByResourceGroupWithResponse(String resourceGr * * Get properties of a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace. + * @return a namespace. + * + * Get properties of a namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { @@ -402,7 +363,7 @@ public NamespaceInner getByResourceGroup(String resourceGroupName, String namesp * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -413,30 +374,12 @@ public NamespaceInner getByResourceGroup(String resourceGroupName, String namesp @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (namespaceInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceInfo is required and cannot be null.")); - } else { - namespaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), namespaceInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, namespaceInfo, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -445,7 +388,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -456,33 +399,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (namespaceInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceInfo is required and cannot be null.")); - } else { - namespaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), namespaceInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, namespaceInfo, + Context.NONE); } /** @@ -490,7 +411,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @param context The context to associate with this operation. @@ -502,33 +423,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (namespaceInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceInfo is required and cannot be null.")); - } else { - namespaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), namespaceInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, namespaceInfo, + context); } /** @@ -536,7 +435,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -558,7 +457,7 @@ private PollerFlux, NamespaceInner> beginCreateOrUpda * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -579,7 +478,7 @@ public SyncPoller, NamespaceInner> beginCreateOrUpdat * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @param context The context to associate with this operation. @@ -602,7 +501,7 @@ public SyncPoller, NamespaceInner> beginCreateOrUpdat * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -622,7 +521,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -640,7 +539,7 @@ public NamespaceInner createOrUpdate(String resourceGroupName, String namespaceN * * Asynchronously creates or updates a new namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param namespaceInfo Namespace information. * @param context The context to associate with this operation. @@ -656,491 +555,372 @@ public NamespaceInner createOrUpdate(String resourceGroupName, String namespaceN } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return namespace resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, + namespaceUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return namespace resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String namespaceName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, + namespaceUpdateParameters, Context.NONE); } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return namespace resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String namespaceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, + namespaceUpdateParameters, context); } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of namespace resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, NamespaceInner> beginUpdateAsync(String resourceGroupName, + String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, namespaceName, namespaceUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NamespaceInner.class, NamespaceInner.class, this.client.getContext()); } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of namespace resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, + String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, namespaceName, namespaceUpdateParameters); + return this.client.getLroResult(response, NamespaceInner.class, + NamespaceInner.class, Context.NONE); } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of namespace resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, + String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters, Context context) { + Response response + = updateWithResponse(resourceGroupName, namespaceName, namespaceUpdateParameters, context); + return this.client.getLroResult(response, NamespaceInner.class, + NamespaceInner.class, context); } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return namespace resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String namespaceName) { - return beginDeleteAsync(resourceGroupName, namespaceName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters) { + return beginUpdateAsync(resourceGroupName, namespaceName, namespaceUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return namespace resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String namespaceName) { - beginDelete(resourceGroupName, namespaceName).getFinalResult(); + public NamespaceInner update(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters) { + return beginUpdate(resourceGroupName, namespaceName, namespaceUpdateParameters).getFinalResult(); } /** - * Delete a namespace. + * Update a namespace. * - * Delete existing namespace. + * Asynchronously updates a namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return namespace resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String namespaceName, Context context) { - beginDelete(resourceGroupName, namespaceName, context).getFinalResult(); + public NamespaceInner update(String resourceGroupName, String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, namespaceName, namespaceUpdateParameters, context).getFinalResult(); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (namespaceUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter namespaceUpdateParameters is required and cannot be null.")); - } else { - namespaceUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName) { return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), namespaceUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (namespaceUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter namespaceUpdateParameters is required and cannot be null.")); - } else { - namespaceUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), namespaceUpdateParameters, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String namespaceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, Context.NONE); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (namespaceUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter namespaceUpdateParameters is required and cannot be null.")); - } else { - namespaceUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), namespaceUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String namespaceName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, context); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of namespace resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NamespaceInner> beginUpdateAsync(String resourceGroupName, - String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, namespaceName, namespaceUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NamespaceInner.class, NamespaceInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, - String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, namespaceName, namespaceUpdateParameters); - return this.client.getLroResult(response, NamespaceInner.class, - NamespaceInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName) { + Response response = deleteWithResponse(resourceGroupName, namespaceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, - String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters, Context context) { - Response response - = updateWithResponse(resourceGroupName, namespaceName, namespaceUpdateParameters, context); - return this.client.getLroResult(response, NamespaceInner.class, - NamespaceInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, namespaceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters) { - return beginUpdateAsync(resourceGroupName, namespaceName, namespaceUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String namespaceName) { + return beginDeleteAsync(resourceGroupName, namespaceName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NamespaceInner update(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters) { - return beginUpdate(resourceGroupName, namespaceName, namespaceUpdateParameters).getFinalResult(); + public void delete(String resourceGroupName, String namespaceName) { + beginDelete(resourceGroupName, namespaceName).getFinalResult(); } /** - * Update a namespace. + * Delete a namespace. * - * Asynchronously updates a namespace with the specified parameters. + * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NamespaceInner update(String resourceGroupName, String namespaceName, - NamespaceUpdateParameters namespaceUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, namespaceName, namespaceUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String namespaceName, Context context) { + beginDelete(resourceGroupName, namespaceName, context).getFinalResult(); } /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1155,29 +935,23 @@ public NamespaceInner update(String resourceGroupName, String namespaceName, * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1191,33 +965,36 @@ private Mono> listSinglePageAsync(String filter, I * @return result of the List Namespaces operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1231,29 +1008,22 @@ private PagedFlux listAsync() { * @return result of the List Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1268,46 +1038,41 @@ private PagedResponse listSinglePage(String filter, Integer top) * @return result of the List Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1322,17 +1087,17 @@ public PagedIterable list() { * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1347,36 +1112,21 @@ public PagedIterable list(String filter, Integer top, Context co * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1390,36 +1140,33 @@ private Mono> listByResourceGroupSinglePageAsync(S * @return result of the List Namespaces operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1433,36 +1180,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN * @return result of the List Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1477,55 +1207,36 @@ private PagedResponse listByResourceGroupSinglePage(String resou * @return result of the List Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1540,10 +1251,9 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1551,7 +1261,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * * List the two keys used to publish to a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1561,26 +1271,10 @@ public PagedIterable listByResourceGroup(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSharedAccessKeysWithResponseAsync(String resourceGroupName, String namespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1589,7 +1283,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * * List the two keys used to publish to a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1608,7 +1302,7 @@ private Mono listSharedAccessKeysAsync(String re * * List the two keys used to publish to a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1619,27 +1313,9 @@ private Mono listSharedAccessKeysAsync(String re @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String namespaceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; - return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), accept, context); + return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context); } /** @@ -1647,7 +1323,7 @@ public Response listSharedAccessKeysWithResponse * * List the two keys used to publish to a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1664,8 +1340,8 @@ public NamespaceSharedAccessKeysInner listSharedAccessKeys(String resourceGroupN * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1675,31 +1351,12 @@ public NamespaceSharedAccessKeysInner listSharedAccessKeys(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> regenerateKeyWithResponseAsync(String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), regenerateKeyRequest, accept, context)) + .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, + regenerateKeyRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1708,8 +1365,8 @@ private Mono>> regenerateKeyWithResponseAsync(String r * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1719,33 +1376,11 @@ private Mono>> regenerateKeyWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), regenerateKeyRequest, accept, Context.NONE); + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, + regenerateKeyRequest, Context.NONE); } /** @@ -1753,8 +1388,8 @@ private Response regenerateKeyWithResponse(String resourceGroupName, * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1765,33 +1400,11 @@ private Response regenerateKeyWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), regenerateKeyRequest, accept, context); + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, + regenerateKeyRequest, context); } /** @@ -1799,8 +1412,8 @@ private Response regenerateKeyWithResponse(String resourceGroupName, * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1823,8 +1436,8 @@ private Response regenerateKeyWithResponse(String resourceGroupName, * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1845,8 +1458,8 @@ public SyncPoller, NamespaceSharedAcc * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1869,8 +1482,8 @@ public SyncPoller, NamespaceSharedAcc * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1889,8 +1502,8 @@ private Mono regenerateKeyAsync(String resourceG * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1908,8 +1521,8 @@ public NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, St * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1928,8 +1541,8 @@ public NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, St * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1939,26 +1552,11 @@ public NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateCustomDomainOwnershipWithResponseAsync(String resourceGroupName, String namespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateCustomDomainOwnership(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, this.client.getApiVersion(), accept, - context)) + .withContext( + context -> service.validateCustomDomainOwnership(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1967,8 +1565,8 @@ private Mono>> validateCustomDomainOwnershipWithRespon * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1977,27 +1575,9 @@ private Mono>> validateCustomDomainOwnershipWithRespon @ServiceMethod(returns = ReturnType.SINGLE) private Response validateCustomDomainOwnershipWithResponse(String resourceGroupName, String namespaceName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; - return service.validateCustomDomainOwnershipSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), accept, Context.NONE); + return service.validateCustomDomainOwnershipSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, Context.NONE); } /** @@ -2005,8 +1585,8 @@ private Response validateCustomDomainOwnershipWithResponse(String re * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2016,27 +1596,9 @@ private Response validateCustomDomainOwnershipWithResponse(String re @ServiceMethod(returns = ReturnType.SINGLE) private Response validateCustomDomainOwnershipWithResponse(String resourceGroupName, String namespaceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; - return service.validateCustomDomainOwnershipSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), accept, context); + return service.validateCustomDomainOwnershipSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context); } /** @@ -2044,8 +1606,8 @@ private Response validateCustomDomainOwnershipWithResponse(String re * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2068,8 +1630,8 @@ private Response validateCustomDomainOwnershipWithResponse(String re * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2091,8 +1653,8 @@ private Response validateCustomDomainOwnershipWithResponse(String re * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2116,8 +1678,8 @@ private Response validateCustomDomainOwnershipWithResponse(String re * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2135,8 +1697,8 @@ private Response validateCustomDomainOwnershipWithResponse(String re * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2153,8 +1715,8 @@ public CustomDomainOwnershipValidationResultInner validateCustomDomainOwnership( * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2168,6 +1730,8 @@ public CustomDomainOwnershipValidationResultInner validateCustomDomainOwnership( } /** + * List namespaces under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2178,24 +1742,19 @@ public CustomDomainOwnershipValidationResultInner validateCustomDomainOwnership( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List namespaces under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2205,24 +1764,17 @@ private Mono> listBySubscriptionNextSinglePageAsyn * @return result of the List Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List namespaces under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2233,24 +1785,17 @@ private PagedResponse listBySubscriptionNextSinglePage(String ne * @return result of the List Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List namespaces under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2261,24 +1806,19 @@ private PagedResponse listBySubscriptionNextSinglePage(String ne * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List namespaces under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2288,24 +1828,17 @@ private Mono> listByResourceGroupNextSinglePageAsy * @return result of the List Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List namespaces under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2316,22 +1849,11 @@ private PagedResponse listByResourceGroupNextSinglePage(String n * @return result of the List Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(NamespacesClientImpl.class); } 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 1bd705cfd0f4e..63462f4d77d23 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -36,12 +36,8 @@ public Response getByResourceGroupWithResponse(String resourceGroupNa Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, namespaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NamespaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NamespaceImpl(inner.getValue(), this.manager())); } public Namespace getByResourceGroup(String resourceGroupName, String namespaceName) { @@ -61,16 +57,6 @@ public void delete(String resourceGroupName, String namespaceName, Context conte this.serviceClient().delete(resourceGroupName, namespaceName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); @@ -83,16 +69,22 @@ public PagedIterable listByResourceGroup(String resourceGroupName, St return ResourceManagerUtils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); + } + public Response listSharedAccessKeysWithResponse(String resourceGroupName, String namespaceName, Context context) { Response inner = this.serviceClient().listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NamespaceSharedAccessKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NamespaceSharedAccessKeysImpl(inner.getValue(), this.manager())); } public NamespaceSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String namespaceName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationImpl.java index 50f1c04cc8329..5c29133f12a35 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfiguration; @@ -37,6 +38,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public NetworkSecurityPerimeterConfigProvisioningState provisioningState() { return this.innerModel().provisioningState(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java index 419721ebfba7b..bc92c809c0bf9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -28,12 +28,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient; import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationList; +import com.azure.resourcemanager.eventgrid.implementation.models.NetworkSecurityPerimeterConfigurationList; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,77 +69,91 @@ public final class NetworkSecurityPerimeterConfigurationsClientImpl * The interface defining all the services for EventGridManagementClientNetworkSecurityPerimeterConfigurations to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientNetworkSecurityPerimeterConfigurations") public interface NetworkSecurityPerimeterConfigurationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, @PathParam("resourceName") String resourceName, @PathParam("perimeterGuid") String perimeterGuid, - @PathParam("associationName") String associationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("associationName") String associationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, @PathParam("resourceName") String resourceName, @PathParam("perimeterGuid") String perimeterGuid, - @PathParam("associationName") String associationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("associationName") String associationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, + @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, + @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}/reconcile") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reconcile(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> reconcile(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, @PathParam("resourceName") String resourceName, @PathParam("perimeterGuid") String perimeterGuid, - @PathParam("associationName") String associationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("associationName") String associationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations/{perimeterGuid}.{associationName}/reconcile") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response reconcileSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response reconcileSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, @PathParam("resourceName") String resourceName, @PathParam("perimeterGuid") String perimeterGuid, - @PathParam("associationName") String associationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("associationName") String associationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, - @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion, + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{resourceType}/{resourceName}/networkSecurityPerimeterConfigurations") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceType") NetworkSecurityPerimeterResourceType resourceType, - @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion, + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -149,51 +162,28 @@ Response listSync(@HostParam("$host") * * Get a specific network security perimeter configuration with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response} on + * @return a specific network security perimeter configuration. + * + * Get a specific network security perimeter configuration with a topic or domain along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - return Mono.error(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceType, resourceName, perimeterGuid, + associationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -202,15 +192,17 @@ private Mono> getWithRespon * * Get a specific network security perimeter configuration with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain on successful completion of + * @return a specific network security perimeter configuration. + * + * Get a specific network security perimeter configuration with a topic or domain on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -226,54 +218,26 @@ private Mono getAsync(String resourc * * Get a specific network security perimeter configuration with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response}. + * @return a specific network security perimeter configuration. + * + * Get a specific network security perimeter configuration with a topic or domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceType, resourceName, perimeterGuid, associationName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, accept, context); } /** @@ -281,15 +245,17 @@ public Response getWithResponse(Stri * * Get a specific network security perimeter configuration with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain. + * @return a specific network security perimeter configuration. + * + * Get a specific network security perimeter configuration with a topic or domain. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, @@ -299,15 +265,169 @@ public NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, Context.NONE).getValue(); } + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceType, resourceName, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceType, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceType, resourceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceType, resourceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceType, resourceName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceType, resourceName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + /** * Reconcile a specific network security perimeter configuration for a given network security perimeter association. * * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,36 +440,11 @@ public NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, private Mono>> reconcileWithResponseAsync(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - return Mono.error(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.reconcile(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.reconcile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceType, resourceName, perimeterGuid, + associationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -359,9 +454,9 @@ private Mono>> reconcileWithResponseAsync(String resou * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -373,40 +468,10 @@ private Mono>> reconcileWithResponseAsync(String resou private Response reconcileWithResponse(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } final String accept = "application/json"; - return service.reconcileSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceType, resourceName, perimeterGuid, associationName, this.client.getApiVersion(), accept, - Context.NONE); + return service.reconcileSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceType, resourceName, perimeterGuid, + associationName, accept, Context.NONE); } /** @@ -415,9 +480,9 @@ private Response reconcileWithResponse(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. @@ -430,39 +495,10 @@ private Response reconcileWithResponse(String resourceGroupName, private Response reconcileWithResponse(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (perimeterGuid == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter perimeterGuid is required and cannot be null.")); - } - if (associationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); - } final String accept = "application/json"; - return service.reconcileSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceType, resourceName, perimeterGuid, associationName, this.client.getApiVersion(), accept, context); + return service.reconcileSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceType, resourceName, perimeterGuid, + associationName, accept, context); } /** @@ -471,9 +507,9 @@ private Response reconcileWithResponse(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -500,9 +536,9 @@ private Response reconcileWithResponse(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -529,9 +565,9 @@ private Response reconcileWithResponse(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. @@ -559,9 +595,9 @@ private Response reconcileWithResponse(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -583,9 +619,9 @@ private Mono reconcileAsync(String r * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -607,9 +643,9 @@ public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroup * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. @@ -629,202 +665,72 @@ public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroup /** * Get all network security perimeter configurations for resource. * - * Get all network security perimeter configurations associated with a topic or domain. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain along with + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain along with * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceType, resourceName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all network security perimeter configurations for resource. * - * Get all network security perimeter configurations associated with a topic or domain. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceType, resourceName)); - } - - /** - * Get all network security perimeter configurations for resource. + * @return all network security perimeter configurations for resource. * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain along with + * Get all network security perimeter configurations associated with a topic or domain along with * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceType, resourceName, this.client.getApiVersion(), accept, Context.NONE); + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** * Get all network security perimeter configurations for resource. * - * Get all network security perimeter configurations associated with a topic or domain. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain along with + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain along with * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceType is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceType, resourceName, this.client.getApiVersion(), accept, context); + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceType, resourceName)); - } - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceType, resourceName, context)); - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkSecurityPerimeterConfigurationsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java index 3c5277cf48c64..aeca57e2ee71c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -33,12 +33,8 @@ public Response getWithResponse(String re String associationName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkSecurityPerimeterConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkSecurityPerimeterConfigurationImpl(inner.getValue(), this.manager())); } public NetworkSecurityPerimeterConfiguration get(String resourceGroupName, @@ -53,6 +49,22 @@ public NetworkSecurityPerimeterConfiguration get(String resourceGroupName, } } + public PagedIterable list(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceType, resourceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceType, resourceName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); + } + public NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName) { @@ -77,22 +89,6 @@ public NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, } } - public PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, resourceType, resourceName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, resourceType, resourceName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); - } - private NetworkSecurityPerimeterConfigurationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationImpl.java index 2073d27d6ffa5..560601c3aa9a3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java index 27871e08d5191..97a9d9358c8c0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -10,6 +10,7 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -24,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.eventgrid.fluent.OperationsClient; import com.azure.resourcemanager.eventgrid.fluent.models.OperationInner; -import com.azure.resourcemanager.eventgrid.models.OperationsListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.OperationsListResult; import reactor.core.publisher.Mono; /** @@ -59,22 +59,36 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for EventGridManagementClientOperations to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.EventGrid/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.EventGrid/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -89,16 +103,12 @@ Response listSync(@HostParam("$host") String endpoint, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -113,7 +123,7 @@ private Mono> listSinglePageAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -127,16 +137,11 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -152,16 +157,11 @@ private PagedResponse listSinglePage() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -175,7 +175,7 @@ private PagedResponse listSinglePage(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -191,8 +191,67 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } - private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); + /** + * List available operations. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List Operations operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List available operations. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List Operations operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List available operations. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List Operations operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java index 9d8fa41140f15..b3e4fbd5ee019 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationImpl.java index 382a78f6deba4..7b5a6a4337b8a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -35,14 +35,6 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String location() { - return this.innerModel().location(); - } - public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -52,6 +44,14 @@ public Map tags() { } } + public String location() { + return this.innerModel().location(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public PartnerAuthorization partnerAuthorization() { return this.innerModel().partnerAuthorization(); } 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 cf05da127a7ae..ae3421261e739 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,14 +32,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationInner; +import com.azure.resourcemanager.eventgrid.implementation.models.PartnerConfigurationsListResult; import com.azure.resourcemanager.eventgrid.models.Partner; 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; @@ -73,109 +72,105 @@ public final class PartnerConfigurationsClientImpl implements PartnerConfigurati * The interface defining all the services for EventGridManagementClientPartnerConfigurations to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPartnerConfigurations") public interface PartnerConfigurationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerConfigurationInner partnerConfigurationInfo, - @HeaderParam("Accept") String accept, Context context); + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerConfigurationInner partnerConfigurationInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerConfigurationInner partnerConfigurationInfo, - @HeaderParam("Accept") String accept, Context context); + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerConfigurationInner partnerConfigurationInfo, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -183,53 +178,65 @@ Mono> list(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default/authorizePartner") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> authorizePartner(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") Partner partnerInfo, @HeaderParam("Accept") String accept, Context context); + Mono> authorizePartner(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") Partner partnerInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default/authorizePartner") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response authorizePartnerSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") Partner partnerInfo, @HeaderParam("Accept") String accept, Context context); + Response authorizePartnerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") Partner partnerInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default/unauthorizePartner") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> unauthorizePartner(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") Partner partnerInfo, @HeaderParam("Accept") String accept, Context context); + Mono> unauthorizePartner(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") Partner partnerInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default/unauthorizePartner") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response unauthorizePartnerSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") Partner partnerInfo, @HeaderParam("Accept") String accept, Context context); + Response unauthorizePartnerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") Partner partnerInfo, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -237,7 +244,7 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -246,31 +253,20 @@ Response listBySubscriptionNextSync( * * Get properties of a partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return a partner configuration. + * + * Get properties of a partner configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -279,11 +275,13 @@ private Mono> getByResourceGroupWithResponse * * Get properties of a partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner configuration on successful completion of {@link Mono}. + * @return a partner configuration. + * + * Get properties of a partner configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName) { @@ -295,33 +293,21 @@ private Mono getByResourceGroupAsync(String resourceG * * Get properties of a partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner configuration along with {@link Response}. + * @return a partner configuration. + * + * Get properties of a partner configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context); } /** @@ -329,11 +315,13 @@ public Response getByResourceGroupWithResponse(String * * Get properties of a partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner configuration. + * @return a partner configuration. + * + * Get properties of a partner configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) public PartnerConfigurationInner getByResourceGroup(String resourceGroupName) { @@ -345,7 +333,7 @@ public PartnerConfigurationInner getByResourceGroup(String resourceGroupName) { * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -355,28 +343,12 @@ public PartnerConfigurationInner getByResourceGroup(String resourceGroupName) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerConfigurationInfo == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerConfigurationInfo is required and cannot be null.")); - } else { - partnerConfigurationInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), partnerConfigurationInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerConfigurationInfo, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -385,7 +357,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -395,30 +367,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerConfigurationInfo == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter partnerConfigurationInfo is required and cannot be null.")); - } else { - partnerConfigurationInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), partnerConfigurationInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerConfigurationInfo, + Context.NONE); } /** @@ -426,7 +379,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -437,30 +390,10 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerConfigurationInfo == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter partnerConfigurationInfo is required and cannot be null.")); - } else { - partnerConfigurationInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), partnerConfigurationInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerConfigurationInfo, context); } /** @@ -468,7 +401,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -490,7 +423,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -510,7 +443,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -532,7 +465,7 @@ public SyncPoller, PartnerConfigurationInn * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -551,7 +484,7 @@ private Mono createOrUpdateAsync(String resourceGroup * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -569,7 +502,7 @@ public PartnerConfigurationInner createOrUpdate(String resourceGroupName, * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -584,441 +517,347 @@ public PartnerConfigurationInner createOrUpdate(String resourceGroupName, } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return partner configuration information along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, + partnerConfigurationUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return partner configuration information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, + partnerConfigurationUpdateParameters, Context.NONE); } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return partner configuration information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, + partnerConfigurationUpdateParameters, context); } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of partner configuration information. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, PartnerConfigurationInner> beginUpdateAsync( + String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, partnerConfigurationUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PartnerConfigurationInner.class, PartnerConfigurationInner.class, this.client.getContext()); } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of partner configuration information. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName) { - Response response = deleteWithResponse(resourceGroupName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, PartnerConfigurationInner> beginUpdate( + String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, partnerConfigurationUpdateParameters); + return this.client.getLroResult(response, + PartnerConfigurationInner.class, PartnerConfigurationInner.class, Context.NONE); } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of partner configuration information. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, Context context) { - Response response = deleteWithResponse(resourceGroupName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, PartnerConfigurationInner> beginUpdate( + String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, + Context context) { + Response response + = updateWithResponse(resourceGroupName, partnerConfigurationUpdateParameters, context); + return this.client.getLroResult(response, + PartnerConfigurationInner.class, PartnerConfigurationInner.class, context); } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return partner configuration information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName) { - return beginDeleteAsync(resourceGroupName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { + return beginUpdateAsync(resourceGroupName, partnerConfigurationUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName) { - beginDelete(resourceGroupName).getFinalResult(); + public PartnerConfigurationInner update(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { + return beginUpdate(resourceGroupName, partnerConfigurationUpdateParameters).getFinalResult(); } /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, Context context) { - beginDelete(resourceGroupName, context).getFinalResult(); + public PartnerConfigurationInner update(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, partnerConfigurationUpdateParameters, context).getFinalResult(); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerConfigurationUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter partnerConfigurationUpdateParameters is required and cannot be null.")); - } else { - partnerConfigurationUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), partnerConfigurationUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerConfigurationUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerConfigurationUpdateParameters is required and cannot be null.")); - } else { - partnerConfigurationUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), partnerConfigurationUpdateParameters, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, Context.NONE); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerConfigurationUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerConfigurationUpdateParameters is required and cannot be null.")); - } else { - partnerConfigurationUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), partnerConfigurationUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, context); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of partner configuration information. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PartnerConfigurationInner> beginUpdateAsync( - String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, partnerConfigurationUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PartnerConfigurationInner.class, PartnerConfigurationInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of partner configuration information. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerConfigurationInner> beginUpdate( - String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, partnerConfigurationUpdateParameters); - return this.client.getLroResult(response, - PartnerConfigurationInner.class, PartnerConfigurationInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName) { + Response response = deleteWithResponse(resourceGroupName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of partner configuration information. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerConfigurationInner> beginUpdate( - String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, - Context context) { - Response response - = updateWithResponse(resourceGroupName, partnerConfigurationUpdateParameters, context); - return this.client.getLroResult(response, - PartnerConfigurationInner.class, PartnerConfigurationInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, Context context) { + Response response = deleteWithResponse(resourceGroupName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - return beginUpdateAsync(resourceGroupName, partnerConfigurationUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName) { + return beginDeleteAsync(resourceGroupName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerConfigurationInner update(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - return beginUpdate(resourceGroupName, partnerConfigurationUpdateParameters).getFinalResult(); + public void delete(String resourceGroupName) { + beginDelete(resourceGroupName).getFinalResult(); } /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerConfigurationInner update(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerConfigurationUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, Context context) { + beginDelete(resourceGroupName, context).getFinalResult(); } /** @@ -1026,7 +865,7 @@ public PartnerConfigurationInner update(String resourceGroupName, * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1036,24 +875,12 @@ public PartnerConfigurationInner update(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1062,7 +889,7 @@ public PartnerConfigurationInner update(String resourceGroupName, * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1070,7 +897,8 @@ public PartnerConfigurationInner update(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** @@ -1078,7 +906,7 @@ private PagedFlux listByResourceGroupAsync(String res * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1086,25 +914,11 @@ private PagedFlux listByResourceGroupAsync(String res */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, Context.NONE); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -1112,7 +926,7 @@ private PagedResponse listByResourceGroupSinglePage(S * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1122,25 +936,11 @@ private PagedResponse listByResourceGroupSinglePage(S @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -1148,7 +948,7 @@ private PagedResponse listByResourceGroupSinglePage(S * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1156,7 +956,8 @@ private PagedResponse listByResourceGroupSinglePage(S */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** @@ -1164,7 +965,7 @@ public PagedIterable listByResourceGroup(String resou * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1173,7 +974,8 @@ public PagedIterable listByResourceGroup(String resou */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** @@ -1196,18 +998,10 @@ public PagedIterable listByResourceGroup(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1272,19 +1066,9 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, Context.NONE); + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1309,19 +1093,9 @@ private PagedResponse listSinglePage(String filter, I */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, context); + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1372,7 +1146,7 @@ public PagedIterable list(String filter, Integer top, * * Authorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be authorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1382,27 +1156,11 @@ public PagedIterable list(String filter, Integer top, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> authorizePartnerWithResponseAsync(String resourceGroupName, Partner partnerInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter partnerInfo is required and cannot be null.")); - } else { - partnerInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.authorizePartner(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), partnerInfo, accept, context)) + .withContext(context -> service.authorizePartner(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1411,7 +1169,7 @@ private Mono> authorizePartnerWithResponseAs * * Authorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be authorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1429,7 +1187,7 @@ private Mono authorizePartnerAsync(String resourceGro * * Authorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be authorized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1440,29 +1198,10 @@ private Mono authorizePartnerAsync(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) public Response authorizePartnerWithResponse(String resourceGroupName, Partner partnerInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerInfo is required and cannot be null.")); - } else { - partnerInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.authorizePartnerSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), partnerInfo, accept, context); + return service.authorizePartnerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerInfo, context); } /** @@ -1470,7 +1209,7 @@ public Response authorizePartnerWithResponse(String r * * Authorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be authorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1487,7 +1226,7 @@ public PartnerConfigurationInner authorizePartner(String resourceGroupName, Part * * Unauthorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be unauthorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1497,28 +1236,11 @@ public PartnerConfigurationInner authorizePartner(String resourceGroupName, Part @ServiceMethod(returns = ReturnType.SINGLE) private Mono> unauthorizePartnerWithResponseAsync(String resourceGroupName, Partner partnerInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter partnerInfo is required and cannot be null.")); - } else { - partnerInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.unauthorizePartner(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), partnerInfo, accept, context)) + .withContext(context -> service.unauthorizePartner(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1527,7 +1249,7 @@ private Mono> unauthorizePartnerWithResponse * * Unauthorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be unauthorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1545,7 +1267,7 @@ private Mono unauthorizePartnerAsync(String resourceG * * Unauthorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be unauthorized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1556,29 +1278,10 @@ private Mono unauthorizePartnerAsync(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) public Response unauthorizePartnerWithResponse(String resourceGroupName, Partner partnerInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerInfo is required and cannot be null.")); - } else { - partnerInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.unauthorizePartnerSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), partnerInfo, accept, context); + return service.unauthorizePartnerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerInfo, context); } /** @@ -1586,7 +1289,7 @@ public Response unauthorizePartnerWithResponse(String * * Unauthorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be unauthorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1599,6 +1302,73 @@ public PartnerConfigurationInner unauthorizePartner(String resourceGroupName, Pa } /** + * List partner configurations under a resource group. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List partner configurations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List partner configurations under a resource group. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List partner configurations operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List partner configurations under a resource group. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List partner configurations operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List partner configurations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1610,13 +1380,6 @@ public PartnerConfigurationInner unauthorizePartner(String resourceGroupName, Pa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1627,6 +1390,8 @@ private Mono> listBySubscriptionNextSin } /** + * List partner configurations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1637,15 +1402,6 @@ private Mono> listBySubscriptionNextSin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1654,6 +1410,8 @@ private PagedResponse listBySubscriptionNextSinglePag } /** + * List partner configurations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1666,21 +1424,10 @@ private PagedResponse listBySubscriptionNextSinglePag @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PartnerConfigurationsClientImpl.class); } 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 3d0fc6d568870..4a499a86f6fe1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,12 +32,8 @@ public PartnerConfigurationsImpl(PartnerConfigurationsClient innerClient, public Response getByResourceGroupWithResponse(String resourceGroupName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerConfigurationImpl(inner.getValue(), this.manager())); } public PartnerConfiguration getByResourceGroup(String resourceGroupName) { @@ -71,14 +67,6 @@ public PartnerConfiguration createOrUpdate(String resourceGroupName, } } - public void delete(String resourceGroupName) { - this.serviceClient().delete(resourceGroupName); - } - - public void delete(String resourceGroupName, Context context) { - this.serviceClient().delete(resourceGroupName, context); - } - public PartnerConfiguration update(String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { PartnerConfigurationInner inner @@ -101,6 +89,14 @@ public PartnerConfiguration update(String resourceGroupName, } } + public void delete(String resourceGroupName) { + this.serviceClient().delete(resourceGroupName); + } + + public void delete(String resourceGroupName, Context context) { + this.serviceClient().delete(resourceGroupName, context); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerConfigurationImpl(inner1, this.manager())); @@ -126,12 +122,8 @@ public Response authorizePartnerWithResponse(String resour Context context) { Response inner = this.serviceClient().authorizePartnerWithResponse(resourceGroupName, partnerInfo, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerConfigurationImpl(inner.getValue(), this.manager())); } public PartnerConfiguration authorizePartner(String resourceGroupName, Partner partnerInfo) { @@ -147,12 +139,8 @@ public Response unauthorizePartnerWithResponse(String reso Context context) { Response inner = this.serviceClient().unauthorizePartnerWithResponse(resourceGroupName, partnerInfo, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerConfigurationImpl(inner.getValue(), this.manager())); } public PartnerConfiguration unauthorizePartner(String resourceGroupName, Partner partnerInfo) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java index f9ef8ce8fabe5..ac6dff5a8ebee 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -16,7 +16,6 @@ import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; -import java.util.UUID; public final class PartnerDestinationImpl implements PartnerDestination, PartnerDestination.Definition, PartnerDestination.Update { @@ -53,7 +52,7 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public UUID partnerRegistrationImmutableId() { + public String partnerRegistrationImmutableId() { return this.innerModel().partnerRegistrationImmutableId(); } @@ -205,7 +204,7 @@ public PartnerDestinationImpl withTags(Map tags) { } } - public PartnerDestinationImpl withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + public PartnerDestinationImpl withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId) { this.innerModel().withPartnerRegistrationImmutableId(partnerRegistrationImmutableId); return this; } 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 0932abc5f079f..a2fdfa4e6f9db 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,13 +32,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; +import com.azure.resourcemanager.eventgrid.implementation.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; @@ -72,132 +71,122 @@ public final class PartnerDestinationsClientImpl implements PartnerDestinationsC * The interface defining all the services for EventGridManagementClientPartnerDestinations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPartnerDestinations") public interface PartnerDestinationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerDestinationName") String partnerDestinationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerDestinationName") String partnerDestinationName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerDestinationInner partnerDestination, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerDestinationInner partnerDestination, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerDestinationInner partnerDestination, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerDestinationInner partnerDestination, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerDestinationName") String partnerDestinationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerDestinationName") String partnerDestinationName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -205,52 +194,52 @@ Response listByResourceGroupSync(@HostParam("$hos @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> activate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> activate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerDestinationName") String partnerDestinationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response activateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response activateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerDestinationName") String partnerDestinationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerDestinationName") String partnerDestinationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -259,37 +248,22 @@ Response listByResourceGroupNextSync( * * Get properties of a partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response} on successful completion of {@link Mono}. + * @return a partner destination. + * + * Get properties of a partner destination along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String partnerDestinationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -298,12 +272,14 @@ private Mono> getByResourceGroupWithResponseAs * * Get properties of a partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination on successful completion of {@link Mono}. + * @return a partner destination. + * + * Get properties of a partner destination on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, @@ -317,38 +293,22 @@ private Mono getByResourceGroupAsync(String resourceGro * * Get properties of a partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. + * @return a partner destination. + * + * Get properties of a partner destination along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String partnerDestinationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, accept, context); } /** @@ -356,12 +316,14 @@ public Response getByResourceGroupWithResponse(String r * * Get properties of a partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination. + * @return a partner destination. + * + * Get properties of a partner destination. */ @ServiceMethod(returns = ReturnType.SINGLE) public PartnerDestinationInner getByResourceGroup(String resourceGroupName, String partnerDestinationName) { @@ -373,7 +335,7 @@ public PartnerDestinationInner getByResourceGroup(String resourceGroupName, Stri * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -384,33 +346,12 @@ public PartnerDestinationInner getByResourceGroup(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestination == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerDestination is required and cannot be null.")); - } else { - partnerDestination.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), partnerDestination, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, contentType, accept, + partnerDestination, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -419,7 +360,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -430,33 +371,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestination == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestination is required and cannot be null.")); - } else { - partnerDestination.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), partnerDestination, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, contentType, accept, + partnerDestination, Context.NONE); } /** @@ -464,7 +383,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @param context The context to associate with this operation. @@ -476,33 +395,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestination == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestination is required and cannot be null.")); - } else { - partnerDestination.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), partnerDestination, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, contentType, accept, + partnerDestination, context); } /** @@ -510,7 +407,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -533,7 +430,7 @@ private PollerFlux, PartnerDestinationInner> * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -555,7 +452,7 @@ public SyncPoller, PartnerDestinationInner> * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @param context The context to associate with this operation. @@ -579,7 +476,7 @@ public SyncPoller, PartnerDestinationInner> * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -599,7 +496,7 @@ private Mono createOrUpdateAsync(String resourceGroupNa * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -618,7 +515,7 @@ public PartnerDestinationInner createOrUpdate(String resourceGroupName, String p * * Asynchronously creates a new partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param partnerDestination Partner destination create information. * @param context The context to associate with this operation. @@ -635,505 +532,383 @@ public PartnerDestinationInner createOrUpdate(String resourceGroupName, String p } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String partnerDestinationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, contentType, accept, + partnerDestinationUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Grid Partner Destination along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String partnerDestinationName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, contentType, accept, + partnerDestinationUpdateParameters, Context.NONE); } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Grid Partner Destination along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String partnerDestinationName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, contentType, accept, + partnerDestinationUpdateParameters, context); } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String partnerDestinationName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, partnerDestinationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, PartnerDestinationInner> beginUpdateAsync( + String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PartnerDestinationInner.class, PartnerDestinationInner.class, this.client.getContext()); } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName) { - Response response = deleteWithResponse(resourceGroupName, partnerDestinationName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, PartnerDestinationInner> beginUpdate( + String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + Response response + = updateWithResponse(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters); + return this.client.getLroResult(response, + PartnerDestinationInner.class, PartnerDestinationInner.class, Context.NONE); } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, partnerDestinationName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, PartnerDestinationInner> beginUpdate( + String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, partnerDestinationName, + partnerDestinationUpdateParameters, context); + return this.client.getLroResult(response, + PartnerDestinationInner.class, PartnerDestinationInner.class, context); } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return event Grid Partner Destination on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String partnerDestinationName) { - return beginDeleteAsync(resourceGroupName, partnerDestinationName).last() + private Mono updateAsync(String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + return beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerDestinationName) { - beginDelete(resourceGroupName, partnerDestinationName).getFinalResult(); + public PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + return beginUpdate(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters) + .getFinalResult(); } /** - * Delete a partner destination. + * Update a partner destination. * - * Delete existing partner destination. + * Asynchronously updates a partner destination with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerDestinationName, Context context) { - beginDelete(resourceGroupName, partnerDestinationName, context).getFinalResult(); + public PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) + .getFinalResult(); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestinationUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter partnerDestinationUpdateParameters is required and cannot be null.")); - } else { - partnerDestinationUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String partnerDestinationName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), - partnerDestinationUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestinationUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerDestinationUpdateParameters is required and cannot be null.")); - } else { - partnerDestinationUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), partnerDestinationUpdateParameters, accept, - Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String partnerDestinationName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, Context.NONE); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } - if (partnerDestinationUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerDestinationUpdateParameters is required and cannot be null.")); - } else { - partnerDestinationUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), partnerDestinationUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String partnerDestinationName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, context); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Grid Partner Destination. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PartnerDestinationInner> beginUpdateAsync( - String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PartnerDestinationInner.class, PartnerDestinationInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String partnerDestinationName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, partnerDestinationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerDestinationInner> beginUpdate( - String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters); - return this.client.getLroResult(response, - PartnerDestinationInner.class, PartnerDestinationInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName) { + Response response = deleteWithResponse(resourceGroupName, partnerDestinationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerDestinationInner> beginUpdate( - String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, partnerDestinationName, - partnerDestinationUpdateParameters, context); - return this.client.getLroResult(response, - PartnerDestinationInner.class, PartnerDestinationInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, partnerDestinationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - return beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters).last() + private Mono deleteAsync(String resourceGroupName, String partnerDestinationName) { + return beginDeleteAsync(resourceGroupName, partnerDestinationName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - return beginUpdate(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters) - .getFinalResult(); + public void delete(String resourceGroupName, String partnerDestinationName) { + beginDelete(resourceGroupName, partnerDestinationName).getFinalResult(); } /** - * Update a partner destination. + * Delete a partner destination. * - * Asynchronously updates a partner destination with the specified parameters. + * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, - PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) - .getFinalResult(); + public void delete(String resourceGroupName, String partnerDestinationName, Context context) { + beginDelete(resourceGroupName, partnerDestinationName, context).getFinalResult(); } /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1148,29 +923,23 @@ public PartnerDestinationInner update(String resourceGroupName, String partnerDe * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1184,33 +953,37 @@ private Mono> listSinglePageAsync(String * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1224,29 +997,22 @@ private PagedFlux listAsync() { * @return result of the List Partner Destinations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1261,46 +1027,41 @@ private PagedResponse listSinglePage(String filter, Int * @return result of the List Partner Destinations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String filter, Integer top, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1315,17 +1076,17 @@ public PagedIterable list() { * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Integer top, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1340,36 +1101,21 @@ public PagedIterable list(String filter, Integer top, C * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1383,37 +1129,33 @@ private Mono> listByResourceGroupSinglePa * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, - Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1427,36 +1169,19 @@ private PagedFlux listByResourceGroupAsync(String resou * @return result of the List Partner Destinations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1471,55 +1196,36 @@ private PagedResponse listByResourceGroupSinglePage(Str * @return result of the List Partner Destinations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1534,10 +1240,9 @@ public PagedIterable listByResourceGroup(String resourc * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, - Integer top, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1545,7 +1250,7 @@ public PagedIterable listByResourceGroup(String resourc * * Activate a newly created partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1555,26 +1260,10 @@ public PagedIterable listByResourceGroup(String resourc @ServiceMethod(returns = ReturnType.SINGLE) private Mono> activateWithResponseAsync(String resourceGroupName, String partnerDestinationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.activate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerDestinationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.activate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1583,7 +1272,7 @@ private Mono> activateWithResponseAsync(String * * Activate a newly created partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1601,7 +1290,7 @@ private Mono activateAsync(String resourceGroupName, St * * Activate a newly created partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1612,27 +1301,9 @@ private Mono activateAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response activateWithResponse(String resourceGroupName, String partnerDestinationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerDestinationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); - } final String accept = "application/json"; - return service.activateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerDestinationName, this.client.getApiVersion(), accept, context); + return service.activateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, accept, context); } /** @@ -1640,7 +1311,7 @@ public Response activateWithResponse(String resourceGro * * Activate a newly created partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1653,6 +1324,8 @@ public PartnerDestinationInner activate(String resourceGroupName, String partner } /** + * List partner destinations under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1663,24 +1336,19 @@ public PartnerDestinationInner activate(String resourceGroupName, String partner * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List partner destinations under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1690,24 +1358,17 @@ private Mono> listBySubscriptionNextSingl * @return result of the List Partner Destinations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner destinations under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1718,24 +1379,17 @@ private PagedResponse listBySubscriptionNextSinglePage( * @return result of the List Partner Destinations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner destinations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1746,24 +1400,19 @@ private PagedResponse listBySubscriptionNextSinglePage( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List partner destinations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1773,24 +1422,17 @@ private Mono> listByResourceGroupNextSing * @return result of the List Partner Destinations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner destinations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1801,22 +1443,11 @@ private PagedResponse listByResourceGroupNextSinglePage * @return result of the List Partner Destinations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PartnerDestinationsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java index 80e0d7126b37e..675e73e8feec7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resour String partnerDestinationName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerDestinationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerDestinationImpl(inner.getValue(), this.manager())); } public PartnerDestination getByResourceGroup(String resourceGroupName, String partnerDestinationName) { @@ -57,16 +53,6 @@ public void delete(String resourceGroupName, String partnerDestinationName, Cont this.serviceClient().delete(resourceGroupName, partnerDestinationName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); @@ -79,16 +65,22 @@ public PagedIterable listByResourceGroup(String resourceGrou return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); + } + public Response activateWithResponse(String resourceGroupName, String partnerDestinationName, Context context) { Response inner = this.serviceClient().activateWithResponse(resourceGroupName, partnerDestinationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerDestinationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerDestinationImpl(inner.getValue(), this.manager())); } public PartnerDestination activate(String resourceGroupName, String partnerDestinationName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java index af66337eb0f53..8e4b4b04f955f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceSharedAccessKeysImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceSharedAccessKeysImpl.java index c61e49becfbeb..27150d96c2f55 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceSharedAccessKeysImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceSharedAccessKeysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 22024b2d82cb4..9b129dabbcb2e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceInner; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.implementation.models.PartnerNamespacesListResult; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyRequest; 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; @@ -74,132 +73,122 @@ public final class PartnerNamespacesClientImpl implements PartnerNamespacesClien * The interface defining all the services for EventGridManagementClientPartnerNamespaces to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPartnerNamespaces") public interface PartnerNamespacesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerNamespaceName") String partnerNamespaceName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerNamespaceName") String partnerNamespaceName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerNamespaceInner partnerNamespaceInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerNamespaceInner partnerNamespaceInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerNamespaceInner partnerNamespaceInfo, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerNamespaceInner partnerNamespaceInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerNamespaceName") String partnerNamespaceName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerNamespaceName") String partnerNamespaceName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerNamespaces") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerNamespaces") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerNamespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerNamespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -207,76 +196,73 @@ Response listByResourceGroupSync(@HostParam("$host" @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSharedAccessKeys(@HostParam("$host") String endpoint, + Mono> listSharedAccessKeys( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerNamespaceName") String partnerNamespaceName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSharedAccessKeysSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSharedAccessKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerNamespaceName") String partnerNamespaceName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/regenerateKey") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regenerateKey(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> regenerateKey(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/regenerateKey") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response regenerateKeySync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response regenerateKeySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerNamespaceName") String partnerNamespaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -285,37 +271,22 @@ Response listByResourceGroupNextSync( * * Get properties of a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace along with {@link Response} on successful completion of {@link Mono}. + * @return a partner namespace. + * + * Get properties of a partner namespace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String partnerNamespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -324,12 +295,14 @@ private Mono> getByResourceGroupWithResponseAsyn * * Get properties of a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace on successful completion of {@link Mono}. + * @return a partner namespace. + * + * Get properties of a partner namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String partnerNamespaceName) { @@ -342,38 +315,22 @@ private Mono getByResourceGroupAsync(String resourceGroup * * Get properties of a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace along with {@link Response}. + * @return a partner namespace. + * + * Get properties of a partner namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String partnerNamespaceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, accept, context); } /** @@ -381,12 +338,14 @@ public Response getByResourceGroupWithResponse(String res * * Get properties of a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace. + * @return a partner namespace. + * + * Get properties of a partner namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) public PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String partnerNamespaceName) { @@ -398,7 +357,7 @@ public PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -409,33 +368,12 @@ public PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (partnerNamespaceInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceInfo is required and cannot be null.")); - } else { - partnerNamespaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), partnerNamespaceInfo, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, + partnerNamespaceInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -444,7 +382,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -455,33 +393,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (partnerNamespaceInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceInfo is required and cannot be null.")); - } else { - partnerNamespaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, this.client.getApiVersion(), partnerNamespaceInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, + partnerNamespaceInfo, Context.NONE); } /** @@ -489,7 +405,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @param context The context to associate with this operation. @@ -501,33 +417,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (partnerNamespaceInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceInfo is required and cannot be null.")); - } else { - partnerNamespaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, this.client.getApiVersion(), partnerNamespaceInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, + partnerNamespaceInfo, context); } /** @@ -535,7 +429,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -558,7 +452,7 @@ private PollerFlux, PartnerNamespaceInner> beg * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -580,7 +474,7 @@ public SyncPoller, PartnerNamespaceInner> begi * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @param context The context to associate with this operation. @@ -604,7 +498,7 @@ public SyncPoller, PartnerNamespaceInner> begi * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -624,7 +518,7 @@ private Mono createOrUpdateAsync(String resourceGroupName * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -643,7 +537,7 @@ public PartnerNamespaceInner createOrUpdate(String resourceGroupName, String par * * Asynchronously creates a new partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param partnerNamespaceInfo PartnerNamespace information. * @param context The context to associate with this operation. @@ -660,87 +554,61 @@ public PartnerNamespaceInner createOrUpdate(String resourceGroupName, String par } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String partnerNamespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, + partnerNamespaceUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String partnerNamespaceName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, + PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, this.client.getApiVersion(), accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, + partnerNamespaceUpdateParameters, Context.NONE); } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -748,75 +616,69 @@ private Response deleteWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String partnerNamespaceName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, + PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, this.client.getApiVersion(), accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, + partnerNamespaceUpdateParameters, context); } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String partnerNamespaceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, partnerNamespaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, PartnerNamespaceInner> beginUpdateAsync( + String resourceGroupName, String partnerNamespaceName, + PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PartnerNamespaceInner.class, PartnerNamespaceInner.class, this.client.getContext()); } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName) { - Response response = deleteWithResponse(resourceGroupName, partnerNamespaceName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, + String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { + Response response + = updateWithResponse(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters); + return this.client.getLroResult(response, + PartnerNamespaceInner.class, PartnerNamespaceInner.class, Context.NONE); } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -824,163 +686,121 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, + public SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, + String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context) { - Response response = deleteWithResponse(resourceGroupName, partnerNamespaceName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + Response response + = updateWithResponse(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, context); + return this.client.getLroResult(response, + PartnerNamespaceInner.class, PartnerNamespaceInner.class, context); } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String partnerNamespaceName) { - return beginDeleteAsync(resourceGroupName, partnerNamespaceName).last() + private Mono updateAsync(String resourceGroupName, String partnerNamespaceName, + PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { + return beginUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerNamespaceName) { - beginDelete(resourceGroupName, partnerNamespaceName).getFinalResult(); + public PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, + PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { + return beginUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters).getFinalResult(); } /** - * Delete a partner namespace. + * Update a partner namespace. * - * Delete existing partner namespace. + * Asynchronously updates a partner namespace with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. + * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerNamespaceName, Context context) { - beginDelete(resourceGroupName, partnerNamespaceName, context).getFinalResult(); + public PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, + PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, context) + .getFinalResult(); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (partnerNamespaceUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter partnerNamespaceUpdateParameters is required and cannot be null.")); - } else { - partnerNamespaceUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String partnerNamespaceName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), partnerNamespaceUpdateParameters, - accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (partnerNamespaceUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerNamespaceUpdateParameters is required and cannot be null.")); - } else { - partnerNamespaceUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, this.client.getApiVersion(), partnerNamespaceUpdateParameters, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String partnerNamespaceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, Context.NONE); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -988,92 +808,56 @@ private Response updateWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (partnerNamespaceUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerNamespaceUpdateParameters is required and cannot be null.")); - } else { - partnerNamespaceUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, this.client.getApiVersion(), partnerNamespaceUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String partnerNamespaceName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, context); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PartnerNamespaceInner> beginUpdateAsync( - String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PartnerNamespaceInner.class, PartnerNamespaceInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String partnerNamespaceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, partnerNamespaceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, - String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters); - return this.client.getLroResult(response, - PartnerNamespaceInner.class, PartnerNamespaceInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName) { + Response response = deleteWithResponse(resourceGroupName, partnerNamespaceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1081,80 +865,69 @@ public SyncPoller, PartnerNamespaceInner> begi * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, - String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, Context context) { - Response response - = updateWithResponse(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, context); - return this.client.getLroResult(response, - PartnerNamespaceInner.class, PartnerNamespaceInner.class, context); + Response response = deleteWithResponse(resourceGroupName, partnerNamespaceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - return beginUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters).last() + private Mono deleteAsync(String resourceGroupName, String partnerNamespaceName) { + return beginDeleteAsync(resourceGroupName, partnerNamespaceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - return beginUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters).getFinalResult(); + public void delete(String resourceGroupName, String partnerNamespaceName) { + beginDelete(resourceGroupName, partnerNamespaceName).getFinalResult(); } /** - * Update a partner namespace. + * Delete a partner namespace. * - * Asynchronously updates a partner namespace with the specified parameters. + * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, context) - .getFinalResult(); + public void delete(String resourceGroupName, String partnerNamespaceName, Context context) { + beginDelete(resourceGroupName, partnerNamespaceName, context).getFinalResult(); } /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1169,29 +942,23 @@ public PartnerNamespaceInner update(String resourceGroupName, String partnerName * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1205,33 +972,37 @@ private Mono> listSinglePageAsync(String fi * @return result of the List Partner Namespaces operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1245,29 +1016,22 @@ private PagedFlux listAsync() { * @return result of the List Partner Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1282,46 +1046,41 @@ private PagedResponse listSinglePage(String filter, Integ * @return result of the List Partner Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1336,17 +1095,17 @@ public PagedIterable list() { * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Integer top, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1361,36 +1120,21 @@ public PagedIterable list(String filter, Integer top, Con * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1404,37 +1148,33 @@ private Mono> listByResourceGroupSinglePage * @return result of the List Partner Namespaces operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, - Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1448,36 +1188,19 @@ private PagedFlux listByResourceGroupAsync(String resourc * @return result of the List Partner Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1492,55 +1215,36 @@ private PagedResponse listByResourceGroupSinglePage(Strin * @return result of the List Partner Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1555,10 +1259,9 @@ public PagedIterable listByResourceGroup(String resourceG * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, - Integer top, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1566,7 +1269,7 @@ public PagedIterable listByResourceGroup(String resourceG * * List the two keys used to publish to a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1577,27 +1280,10 @@ public PagedIterable listByResourceGroup(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSharedAccessKeysWithResponseAsync(String resourceGroupName, String partnerNamespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1606,7 +1292,7 @@ public PagedIterable listByResourceGroup(String resourceG * * List the two keys used to publish to a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1625,7 +1311,7 @@ private Mono listSharedAccessKeysAsync(St * * List the two keys used to publish to a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1636,27 +1322,9 @@ private Mono listSharedAccessKeysAsync(St @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String partnerNamespaceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } final String accept = "application/json"; - return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), accept, context); + return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, accept, context); } /** @@ -1664,7 +1332,7 @@ public Response listSharedAccessKeysWithR * * List the two keys used to publish to a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1682,7 +1350,7 @@ public PartnerNamespaceSharedAccessKeysInner listSharedAccessKeys(String resourc * * Regenerate a shared access key for a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1695,33 +1363,12 @@ public PartnerNamespaceSharedAccessKeysInner listSharedAccessKeys(String resourc private Mono> regenerateKeyWithResponseAsync( String resourceGroupName, String partnerNamespaceName, PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerNamespaceName, this.client.getApiVersion(), regenerateKeyRequest, accept, - context)) + .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, + regenerateKeyRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1730,7 +1377,7 @@ private Mono> regenerateKeyWithR * * Regenerate a shared access key for a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1750,7 +1397,7 @@ private Mono regenerateKeyAsync(String re * * Regenerate a shared access key for a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -1762,33 +1409,11 @@ private Mono regenerateKeyAsync(String re @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeyWithResponse(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerNamespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerNamespaceName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerNamespaceName, this.client.getApiVersion(), regenerateKeyRequest, accept, context); + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, + regenerateKeyRequest, context); } /** @@ -1796,7 +1421,7 @@ public Response regenerateKeyWithResponse * * Regenerate a shared access key for a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1812,6 +1437,8 @@ public PartnerNamespaceSharedAccessKeysInner regenerateKey(String resourceGroupN } /** + * List partner namespaces under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1822,24 +1449,19 @@ public PartnerNamespaceSharedAccessKeysInner regenerateKey(String resourceGroupN * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List partner namespaces under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1849,24 +1471,17 @@ private Mono> listBySubscriptionNextSingleP * @return result of the List Partner Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner namespaces under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1877,24 +1492,17 @@ private PagedResponse listBySubscriptionNextSinglePage(St * @return result of the List Partner Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner namespaces under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1905,24 +1513,19 @@ private PagedResponse listBySubscriptionNextSinglePage(St * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List partner namespaces under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1932,24 +1535,17 @@ private Mono> listByResourceGroupNextSingle * @return result of the List Partner Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner namespaces under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1960,22 +1556,11 @@ private PagedResponse listByResourceGroupNextSinglePage(S * @return result of the List Partner Namespaces operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PartnerNamespacesClientImpl.class); } 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 50a85db236b3c..5043acc1bf753 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -34,12 +34,8 @@ public Response getByResourceGroupWithResponse(String resource String partnerNamespaceName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, partnerNamespaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerNamespaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerNamespaceImpl(inner.getValue(), this.manager())); } public PartnerNamespace getByResourceGroup(String resourceGroupName, String partnerNamespaceName) { @@ -59,16 +55,6 @@ public void delete(String resourceGroupName, String partnerNamespaceName, Contex this.serviceClient().delete(resourceGroupName, partnerNamespaceName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerNamespaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerNamespaceImpl(inner1, this.manager())); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerNamespaceImpl(inner1, this.manager())); @@ -81,16 +67,22 @@ public PagedIterable listByResourceGroup(String resourceGroupN return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerNamespaceImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerNamespaceImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerNamespaceImpl(inner1, this.manager())); + } + public Response listSharedAccessKeysWithResponse(String resourceGroupName, String partnerNamespaceName, Context context) { Response inner = this.serviceClient().listSharedAccessKeysWithResponse(resourceGroupName, partnerNamespaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerNamespaceSharedAccessKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerNamespaceSharedAccessKeysImpl(inner.getValue(), this.manager())); } public PartnerNamespaceSharedAccessKeys listSharedAccessKeys(String resourceGroupName, @@ -108,12 +100,8 @@ public Response regenerateKeyWithResponse(Stri String partnerNamespaceName, PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, Context context) { Response inner = this.serviceClient() .regenerateKeyWithResponse(resourceGroupName, partnerNamespaceName, regenerateKeyRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerNamespaceSharedAccessKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerNamespaceSharedAccessKeysImpl(inner.getValue(), this.manager())); } public PartnerNamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String partnerNamespaceName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java index 5ac42cd3164f2..d10d0f6dfa868 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -13,7 +13,6 @@ import com.azure.resourcemanager.eventgrid.models.PartnerRegistrationUpdateParameters; import java.util.Collections; import java.util.Map; -import java.util.UUID; public final class PartnerRegistrationImpl implements PartnerRegistration, PartnerRegistration.Definition, PartnerRegistration.Update { @@ -54,7 +53,7 @@ public PartnerRegistrationProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public UUID partnerRegistrationImmutableId() { + public String partnerRegistrationImmutableId() { return this.innerModel().partnerRegistrationImmutableId(); } @@ -174,7 +173,7 @@ public PartnerRegistrationImpl withTags(Map tags) { } } - public PartnerRegistrationImpl withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + public PartnerRegistrationImpl withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId) { this.innerModel().withPartnerRegistrationImmutableId(partnerRegistrationImmutableId); return this; } 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 e675c043f4709..014c29029490a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,13 +31,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationInner; +import com.azure.resourcemanager.eventgrid.implementation.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; @@ -71,132 +70,122 @@ public final class PartnerRegistrationsClientImpl implements PartnerRegistration * The interface defining all the services for EventGridManagementClientPartnerRegistrations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPartnerRegistrations") public interface PartnerRegistrationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerRegistrationName") String partnerRegistrationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerRegistrationName") String partnerRegistrationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerRegistrationName") String partnerRegistrationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerRegistrationName") String partnerRegistrationName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerRegistrationName") String partnerRegistrationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerRegistrationInner partnerRegistrationInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerRegistrationInner partnerRegistrationInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerRegistrationName") String partnerRegistrationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerRegistrationInner partnerRegistrationInfo, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerRegistrationName") String partnerRegistrationName, - @QueryParam("api-version") String apiVersion, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerRegistrationInner partnerRegistrationInfo, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerRegistrationName") String partnerRegistrationName, - @QueryParam("api-version") String apiVersion, Context context); - - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerRegistrationName") String partnerRegistrationName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerRegistrationName") String partnerRegistrationName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerRegistrationName") String partnerRegistrationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerRegistrationName") String partnerRegistrationName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerRegistrations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerRegistrations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerRegistrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerRegistrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -204,32 +193,32 @@ Response listByResourceGroupSync(@HostParam("$ho @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -238,38 +227,23 @@ Response listByResourceGroupNextSync( * * Gets a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters along with {@link Response} on successful completion - * of {@link Mono}. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String partnerRegistrationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerRegistrationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -278,12 +252,14 @@ private Mono> getByResourceGroupWithResponseA * * Gets a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters on successful completion of {@link Mono}. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, @@ -297,38 +273,22 @@ private Mono getByResourceGroupAsync(String resourceGr * * Gets a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters along with {@link Response}. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String partnerRegistrationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerRegistrationName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, accept, context); } /** @@ -336,12 +296,14 @@ public Response getByResourceGroupWithResponse(String * * Gets a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters. */ @ServiceMethod(returns = ReturnType.SINGLE) public PartnerRegistrationInner getByResourceGroup(String resourceGroupName, String partnerRegistrationName) { @@ -353,7 +315,7 @@ public PartnerRegistrationInner getByResourceGroup(String resourceGroupName, Str * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -365,33 +327,12 @@ public PartnerRegistrationInner getByResourceGroup(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } - if (partnerRegistrationInfo == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerRegistrationInfo is required and cannot be null.")); - } else { - partnerRegistrationInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerRegistrationName, this.client.getApiVersion(), partnerRegistrationInfo, - accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, contentType, accept, + partnerRegistrationInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -400,7 +341,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -411,33 +352,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } - if (partnerRegistrationInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationInfo is required and cannot be null.")); - } else { - partnerRegistrationInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerRegistrationName, this.client.getApiVersion(), partnerRegistrationInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, contentType, accept, + partnerRegistrationInfo, Context.NONE); } /** @@ -445,7 +364,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @param context The context to associate with this operation. @@ -457,33 +376,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } - if (partnerRegistrationInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationInfo is required and cannot be null.")); - } else { - partnerRegistrationInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerRegistrationName, this.client.getApiVersion(), partnerRegistrationInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, contentType, accept, + partnerRegistrationInfo, context); } /** @@ -491,7 +388,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -514,7 +411,7 @@ private PollerFlux, PartnerRegistrationInne * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -536,7 +433,7 @@ public SyncPoller, PartnerRegistrationInner * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @param context The context to associate with this operation. @@ -560,7 +457,7 @@ public SyncPoller, PartnerRegistrationInner * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -580,7 +477,7 @@ private Mono createOrUpdateAsync(String resourceGroupN * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -600,7 +497,7 @@ public PartnerRegistrationInner createOrUpdate(String resourceGroupName, String * * Creates a new partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param partnerRegistrationInfo PartnerRegistration information. * @param context The context to associate with this operation. @@ -617,85 +514,61 @@ public PartnerRegistrationInner createOrUpdate(String resourceGroupName, String } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String partnerRegistrationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerRegistrationName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, contentType, accept, + partnerRegistrationUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String partnerRegistrationName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerRegistrationName, this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, contentType, accept, + partnerRegistrationUpdateParameters, Context.NONE); } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -703,75 +576,70 @@ private Response deleteWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String partnerRegistrationName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerRegistrationName, this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, contentType, accept, + partnerRegistrationUpdateParameters, context); } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String partnerRegistrationName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, partnerRegistrationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, PartnerRegistrationInner> beginUpdateAsync( + String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PartnerRegistrationInner.class, PartnerRegistrationInner.class, this.client.getContext()); } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName) { - Response response = deleteWithResponse(resourceGroupName, partnerRegistrationName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, PartnerRegistrationInner> beginUpdate( + String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { + Response response + = updateWithResponse(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters); + return this.client.getLroResult(response, + PartnerRegistrationInner.class, PartnerRegistrationInner.class, Context.NONE); } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -779,164 +647,122 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, partnerRegistrationName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, PartnerRegistrationInner> beginUpdate( + String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, partnerRegistrationName, + partnerRegistrationUpdateParameters, context); + return this.client.getLroResult(response, + PartnerRegistrationInner.class, PartnerRegistrationInner.class, context); } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String partnerRegistrationName) { - return beginDeleteAsync(resourceGroupName, partnerRegistrationName).last() + private Mono updateAsync(String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { + return beginUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerRegistrationName) { - beginDelete(resourceGroupName, partnerRegistrationName).getFinalResult(); + public PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { + return beginUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters) + .getFinalResult(); } /** - * Delete a partner registration. + * Update a partner registration. * - * Deletes a partner registration with the specified parameters. + * Updates a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. + * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerRegistrationName, Context context) { - beginDelete(resourceGroupName, partnerRegistrationName, context).getFinalResult(); + public PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, + PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, context) + .getFinalResult(); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } - if (partnerRegistrationUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter partnerRegistrationUpdateParameters is required and cannot be null.")); - } else { - partnerRegistrationUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String partnerRegistrationName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerRegistrationName, this.client.getApiVersion(), - partnerRegistrationUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } - if (partnerRegistrationUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerRegistrationUpdateParameters is required and cannot be null.")); - } else { - partnerRegistrationUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerRegistrationName, this.client.getApiVersion(), partnerRegistrationUpdateParameters, accept, - Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String partnerRegistrationName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, Context.NONE); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -944,93 +770,57 @@ private Response updateWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerRegistrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerRegistrationName is required and cannot be null.")); - } - if (partnerRegistrationUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerRegistrationUpdateParameters is required and cannot be null.")); - } else { - partnerRegistrationUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerRegistrationName, this.client.getApiVersion(), partnerRegistrationUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String partnerRegistrationName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, context); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PartnerRegistrationInner> beginUpdateAsync( - String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PartnerRegistrationInner.class, PartnerRegistrationInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String partnerRegistrationName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, partnerRegistrationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerRegistrationInner> beginUpdate( - String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters); - return this.client.getLroResult(response, - PartnerRegistrationInner.class, PartnerRegistrationInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName) { + Response response = deleteWithResponse(resourceGroupName, partnerRegistrationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1038,81 +828,69 @@ public SyncPoller, PartnerRegistrationInner * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PartnerRegistrationInner> beginUpdate( - String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, partnerRegistrationName, - partnerRegistrationUpdateParameters, context); - return this.client.getLroResult(response, - PartnerRegistrationInner.class, PartnerRegistrationInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, partnerRegistrationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - return beginUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters).last() + private Mono deleteAsync(String resourceGroupName, String partnerRegistrationName) { + return beginDeleteAsync(resourceGroupName, partnerRegistrationName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - return beginUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters) - .getFinalResult(); + public void delete(String resourceGroupName, String partnerRegistrationName) { + beginDelete(resourceGroupName, partnerRegistrationName).getFinalResult(); } /** - * Update a partner registration. + * Delete a partner registration. * - * Updates a partner registration with the specified parameters. + * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, - PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, context) - .getFinalResult(); + public void delete(String resourceGroupName, String partnerRegistrationName, Context context) { + beginDelete(resourceGroupName, partnerRegistrationName, context).getFinalResult(); } /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1127,29 +905,23 @@ public PartnerRegistrationInner update(String resourceGroupName, String partnerR * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1163,33 +935,37 @@ private Mono> listSinglePageAsync(String * @return result of the List Partner Registrations operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1203,29 +979,22 @@ private PagedFlux listAsync() { * @return result of the List Partner Registrations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1240,46 +1009,41 @@ private PagedResponse listSinglePage(String filter, In * @return result of the List Partner Registrations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String filter, Integer top, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1294,17 +1058,17 @@ public PagedIterable list() { * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Integer top, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1319,36 +1083,21 @@ public PagedIterable list(String filter, Integer top, * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1362,37 +1111,33 @@ private Mono> listByResourceGroupSingleP * @return result of the List Partner Registrations operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, - Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1406,36 +1151,19 @@ private PagedFlux listByResourceGroupAsync(String reso * @return result of the List Partner Registrations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1450,55 +1178,36 @@ private PagedResponse listByResourceGroupSinglePage(St * @return result of the List Partner Registrations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1513,13 +1222,14 @@ public PagedIterable listByResourceGroup(String resour * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, - Integer top, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** + * List partner registrations under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1530,24 +1240,19 @@ public PagedIterable listByResourceGroup(String resour * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List partner registrations under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1557,24 +1262,17 @@ private Mono> listBySubscriptionNextSing * @return result of the List Partner Registrations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner registrations under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1585,24 +1283,18 @@ private PagedResponse listBySubscriptionNextSinglePage * @return result of the List Partner Registrations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner registrations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1613,24 +1305,19 @@ private PagedResponse listBySubscriptionNextSinglePage * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List partner registrations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1640,24 +1327,17 @@ private Mono> listByResourceGroupNextSin * @return result of the List Partner Registrations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner registrations under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1668,23 +1348,11 @@ private PagedResponse listByResourceGroupNextSinglePag * @return result of the List Partner Registrations operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PartnerRegistrationsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java index 3014afe564459..a0cc7f35db1ee 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resou String partnerRegistrationName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, partnerRegistrationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerRegistrationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerRegistrationImpl(inner.getValue(), this.manager())); } public PartnerRegistration getByResourceGroup(String resourceGroupName, String partnerRegistrationName) { @@ -57,16 +53,6 @@ public void delete(String resourceGroupName, String partnerRegistrationName, Con this.serviceClient().delete(resourceGroupName, partnerRegistrationName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerRegistrationImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerRegistrationImpl(inner1, this.manager())); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerRegistrationImpl(inner1, this.manager())); @@ -79,6 +65,16 @@ public PagedIterable listByResourceGroup(String resourceGro return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerRegistrationImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerRegistrationImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerRegistrationImpl(inner1, this.manager())); + } + public PartnerRegistration getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 22509074fafb7..d7d2f5f018bc8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient; 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.implementation.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; @@ -74,177 +73,167 @@ public final class PartnerTopicEventSubscriptionsClientImpl implements PartnerTo * The interface defining all the services for EventGridManagementClientPartnerTopicEventSubscriptions to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPartnerTopicEventSubscriptions") public interface PartnerTopicEventSubscriptionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getFullUrl(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByPartnerTopic(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getFullUrlSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByPartnerTopicSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPartnerTopic(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getFullUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + @PathParam("partnerTopicName") String partnerTopicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByPartnerTopicSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getFullUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + @PathParam("partnerTopicName") String partnerTopicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getDeliveryAttributes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getDeliveryAttributesSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getDeliveryAttributesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("partnerTopicName") String partnerTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPartnerTopicNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -252,7 +241,7 @@ Mono> listByPartnerTopicNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByPartnerTopicNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -261,43 +250,25 @@ Response listByPartnerTopicNextSync( * * Get properties of an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a partner topic along with {@link Response} on successful - * completion of {@link Mono}. + * @return an event subscription of a partner topic. + * + * Get properties of an event subscription of a partner topic along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -306,13 +277,15 @@ private Mono> getWithResponseAsync(String resou * * Get properties of an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a partner topic on successful completion of {@link Mono}. + * @return an event subscription of a partner topic. + * + * Get properties of an event subscription of a partner topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String partnerTopicName, @@ -326,43 +299,23 @@ private Mono getAsync(String resourceGroupName, String p * * Get properties of an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a partner topic along with {@link Response}. + * @return an event subscription of a partner topic. + * + * Get properties of an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, partnerTopicName, eventSubscriptionName, accept, context); } /** @@ -370,13 +323,15 @@ public Response getWithResponse(String resourceGroupName * * Get properties of an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a partner topic. + * @return an event subscription of a partner topic. + * + * Get properties of an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { @@ -389,10 +344,9 @@ public EventSubscriptionInner get(String resourceGroupName, String partnerTopicN * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -402,37 +356,12 @@ public EventSubscriptionInner get(String resourceGroupName, String partnerTopicN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, + contentType, accept, eventSubscriptionInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -442,10 +371,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -455,38 +383,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionInfo, Context.NONE); } /** @@ -495,10 +396,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -509,38 +409,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionInfo, context); } /** @@ -549,10 +422,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -576,10 +448,9 @@ private PollerFlux, EventSubscriptionInner> b * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -602,10 +473,9 @@ public SyncPoller, EventSubscriptionInner> be * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -629,10 +499,9 @@ public SyncPoller, EventSubscriptionInner> be * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -652,10 +521,9 @@ private Mono createOrUpdateAsync(String resourceGroupNam * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -675,10 +543,9 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String pa * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -693,260 +560,14 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String pa context).getFinalResult(); } - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), Context.NONE); - } - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), context); - } - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, partnerTopicName, eventSubscriptionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName) { - Response response = deleteWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, partnerTopicName, eventSubscriptionName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, partnerTopicName, eventSubscriptionName).getFinalResult(); - } - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, - Context context) { - beginDelete(resourceGroupName, partnerTopicName, eventSubscriptionName, context).getFinalResult(); - } - /** * Update event subscription of a partner topic. * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -956,37 +577,12 @@ public void delete(String resourceGroupName, String partnerTopicName, String eve @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, + contentType, accept, eventSubscriptionUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -995,9 +591,9 @@ private Mono>> updateWithResponseAsync(String resource * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1007,39 +603,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionUpdateParameters, - accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionUpdateParameters, Context.NONE); } /** @@ -1047,9 +615,9 @@ private Response updateWithResponse(String resourceGroupName, String * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1061,39 +629,11 @@ private Response updateWithResponse(String resourceGroupName, String private Response updateWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionUpdateParameters, - accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionUpdateParameters, context); } /** @@ -1101,9 +641,9 @@ private Response updateWithResponse(String resourceGroupName, String * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1126,9 +666,9 @@ private PollerFlux, EventSubscriptionInner> b * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1150,9 +690,9 @@ public SyncPoller, EventSubscriptionInner> be * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1175,9 +715,9 @@ public SyncPoller, EventSubscriptionInner> be * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1196,9 +736,9 @@ private Mono updateAsync(String resourceGroupName, Strin * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1217,9 +757,9 @@ public EventSubscriptionInner update(String resourceGroupName, String partnerTop * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1236,133 +776,185 @@ public EventSubscriptionInner update(String resourceGroupName, String partnerTop } /** - * Get full URL of an event subscription of a partner topic. + * Delete an event subscription of a partner topic. * - * Get the full endpoint URL for an event subscription of a partner topic. + * Delete an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a partner topic along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getFullUrlWithResponseAsync(String resourceGroupName, - String partnerTopicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName) { return FluxUtil - .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get full URL of an event subscription of a partner topic. + * Delete an event subscription of a partner topic. * - * Get the full endpoint URL for an event subscription of a partner topic. + * Delete an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a partner topic on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getFullUrlAsync(String resourceGroupName, String partnerTopicName, + private Response deleteWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - return getFullUrlWithResponseAsync(resourceGroupName, partnerTopicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE); } /** - * Get full URL of an event subscription of a partner topic. + * Delete an event subscription of a partner topic. * - * Get the full endpoint URL for an event subscription of a partner topic. + * Delete an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a partner topic along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse(String resourceGroupName, - String partnerTopicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getFullUrlSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, context); } /** - * Get full URL of an event subscription of a partner topic. + * Delete an event subscription of a partner topic. * - * Get the full endpoint URL for an event subscription of a partner topic. + * Delete an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a partner topic. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerTopicName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - return getFullUrlWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE) - .getValue(); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, partnerTopicName, eventSubscriptionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete an event subscription of a partner topic. + * + * Delete an existing event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName) { + Response response = deleteWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete an event subscription of a partner topic. + * + * Delete an existing event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete an event subscription of a partner topic. + * + * Delete an existing event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + return beginDeleteAsync(resourceGroupName, partnerTopicName, eventSubscriptionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete an event subscription of a partner topic. + * + * Delete an existing event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + beginDelete(resourceGroupName, partnerTopicName, eventSubscriptionName).getFinalResult(); + } + + /** + * Delete an event subscription of a partner topic. + * + * Delete an existing event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, + Context context) { + beginDelete(resourceGroupName, partnerTopicName, eventSubscriptionName, context).getFinalResult(); } /** @@ -1370,7 +962,7 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1388,27 +980,10 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPartnerTopicSinglePageAsync(String resourceGroupName, String partnerTopicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByPartnerTopic(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByPartnerTopic(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1419,7 +994,7 @@ private Mono> listByPartnerTopicSinglePage * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1446,7 +1021,7 @@ private PagedFlux listByPartnerTopicAsync(String resourc * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1468,7 +1043,7 @@ private PagedFlux listByPartnerTopicAsync(String resourc * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1485,28 +1060,10 @@ private PagedFlux listByPartnerTopicAsync(String resourc @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerTopicSinglePage(String resourceGroupName, String partnerTopicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listByPartnerTopicSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listByPartnerTopicSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, filter, + top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1516,7 +1073,7 @@ private PagedResponse listByPartnerTopicSinglePage(Strin * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1534,28 +1091,10 @@ private PagedResponse listByPartnerTopicSinglePage(Strin @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerTopicSinglePage(String resourceGroupName, String partnerTopicName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByPartnerTopicSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByPartnerTopicSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1565,7 +1104,7 @@ private PagedResponse listByPartnerTopicSinglePage(Strin * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1585,7 +1124,7 @@ public PagedIterable listByPartnerTopic(String resourceG * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1608,48 +1147,126 @@ public PagedIterable listByPartnerTopic(String resourceG nextLink -> listByPartnerTopicNextSinglePage(nextLink, context)); } + /** + * Get full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFullUrlWithResponseAsync(String resourceGroupName, + String partnerTopicName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFullUrlAsync(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName) { + return getFullUrlWithResponseAsync(resourceGroupName, partnerTopicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFullUrlWithResponse(String resourceGroupName, + String partnerTopicName, String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, accept, + context); + } + + /** + * Get full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE) + .getValue(); + } + /** * Get delivery attributes for an event subscription of a partner topic. * * Get all delivery attributes for an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a partner topic along with {@link Response} on + * @return delivery attributes for an event subscription of a partner topic. + * + * Get all delivery attributes for an event subscription of a partner topic along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeliveryAttributesWithResponseAsync( String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, - this.client.getApiVersion(), accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, + eventSubscriptionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1658,13 +1275,15 @@ private Mono> getDeliveryAttributesWi * * Get all delivery attributes for an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a partner topic on successful completion of + * @return delivery attributes for an event subscription of a partner topic. + * + * Get all delivery attributes for an event subscription of a partner topic on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1679,43 +1298,24 @@ private Mono getDeliveryAttributesAsync(String * * Get all delivery attributes for an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a partner topic along with {@link Response}. + * @return delivery attributes for an event subscription of a partner topic. + * + * Get all delivery attributes for an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, accept, + context); } /** @@ -1723,13 +1323,15 @@ public Response getDeliveryAttributesWithRespo * * Get all delivery attributes for an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a partner topic. + * @return delivery attributes for an event subscription of a partner topic. + * + * Get all delivery attributes for an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String partnerTopicName, @@ -1739,6 +1341,8 @@ public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGro } /** + * List event subscriptions of a partner topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1750,13 +1354,6 @@ public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPartnerTopicNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1767,6 +1364,8 @@ private Mono> listByPartnerTopicNextSingle } /** + * List event subscriptions of a partner topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1777,15 +1376,6 @@ private Mono> listByPartnerTopicNextSingle */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerTopicNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByPartnerTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1794,6 +1384,8 @@ private PagedResponse listByPartnerTopicNextSinglePage(S } /** + * List event subscriptions of a partner topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1805,21 +1397,10 @@ private PagedResponse listByPartnerTopicNextSinglePage(S */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerTopicNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByPartnerTopicNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PartnerTopicEventSubscriptionsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java index 22f7fcc612e39..00f3dea8706cf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -36,12 +36,8 @@ public Response getWithResponse(String resourceGroupName, Str String eventSubscriptionName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionImpl(inner.getValue(), this.manager())); } public EventSubscription get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { @@ -76,15 +72,6 @@ public EventSubscription createOrUpdate(String resourceGroupName, String partner } } - public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, partnerTopicName, eventSubscriptionName); - } - - public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, - Context context) { - this.serviceClient().delete(resourceGroupName, partnerTopicName, eventSubscriptionName, context); - } - public EventSubscription update(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { EventSubscriptionInner inner = this.serviceClient() @@ -108,27 +95,13 @@ public EventSubscription update(String resourceGroupName, String partnerTopicNam } } - public Response getFullUrlWithResponse(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getFullUrlWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + this.serviceClient().delete(resourceGroupName, partnerTopicName, eventSubscriptionName); } - public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName) { - EventSubscriptionFullUrlInner inner - = this.serviceClient().getFullUrl(resourceGroupName, partnerTopicName, eventSubscriptionName); - if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, + Context context) { + this.serviceClient().delete(resourceGroupName, partnerTopicName, eventSubscriptionName, context); } public PagedIterable listByPartnerTopic(String resourceGroupName, String partnerTopicName) { @@ -144,18 +117,33 @@ public PagedIterable listByPartnerTopic(String resourceGroupN return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String partnerTopicName, String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getDeliveryAttributesWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, context); + public Response getFullUrlWithResponse(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getFullUrlWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + } + + public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName) { + EventSubscriptionFullUrlInner inner + = this.serviceClient().getFullUrl(resourceGroupName, partnerTopicName, eventSubscriptionName); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + return new EventSubscriptionFullUrlImpl(inner, this.manager()); } else { return null; } } + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String partnerTopicName, String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getDeliveryAttributesWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } + public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { DeliveryAttributeListResultInner inner diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java index 71beb38de82ff..6c4f1452ec482 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -18,7 +18,6 @@ import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; -import java.util.UUID; public final class PartnerTopicImpl implements PartnerTopic, PartnerTopic.Definition, PartnerTopic.Update { private PartnerTopicInner innerObject; @@ -50,15 +49,15 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public IdentityInfo identity() { return this.innerModel().identity(); } - public UUID partnerRegistrationImmutableId() { + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String partnerRegistrationImmutableId() { return this.innerModel().partnerRegistrationImmutableId(); } @@ -234,7 +233,7 @@ public PartnerTopicImpl withIdentity(IdentityInfo identity) { } } - public PartnerTopicImpl withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + public PartnerTopicImpl withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId) { this.innerModel().withPartnerRegistrationImmutableId(partnerRegistrationImmutableId); return this; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java index 4ae1e037d03f1..0ffbecffd60ea 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,13 +32,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicInner; +import com.azure.resourcemanager.eventgrid.implementation.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; @@ -72,128 +71,120 @@ public final class PartnerTopicsClientImpl implements PartnerTopicsClient { * The interface defining all the services for EventGridManagementClientPartnerTopics to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPartnerTopics") public interface PartnerTopicsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerTopicInner partnerTopicInfo, @HeaderParam("Accept") String accept, + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerTopicInner partnerTopicInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerTopicInner partnerTopicInfo, @HeaderParam("Accept") String accept, + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PartnerTopicInner partnerTopicInfo, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerTopicUpdateParameters partnerTopicUpdateParameters, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartnerTopicUpdateParameters partnerTopicUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerTopicUpdateParameters partnerTopicUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartnerTopicUpdateParameters partnerTopicUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -201,72 +192,72 @@ Response listByResourceGroupSync(@HostParam("$host") St @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/activate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> activate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> activate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/activate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response activateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response activateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/deactivate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deactivate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> deactivate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/deactivate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deactivateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deactivateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("partnerTopicName") String partnerTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("partnerTopicName") String partnerTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -275,37 +266,22 @@ Response listByResourceGroupNextSync( * * Get properties of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic along with {@link Response} on successful completion of {@link Mono}. + * @return a partner topic. + * + * Get properties of a partner topic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String partnerTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -314,12 +290,14 @@ private Mono> getByResourceGroupWithResponseAsync(St * * Get properties of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic on successful completion of {@link Mono}. + * @return a partner topic. + * + * Get properties of a partner topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String partnerTopicName) { @@ -332,38 +310,22 @@ private Mono getByResourceGroupAsync(String resourceGroupName * * Get properties of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic along with {@link Response}. + * @return a partner topic. + * + * Get properties of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String partnerTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context); } /** @@ -371,12 +333,14 @@ public Response getByResourceGroupWithResponse(String resourc * * Get properties of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic. + * @return a partner topic. + * + * Get properties of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public PartnerTopicInner getByResourceGroup(String resourceGroupName, String partnerTopicName) { @@ -388,7 +352,7 @@ public PartnerTopicInner getByResourceGroup(String resourceGroupName, String par * * Asynchronously creates a new partner topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -399,32 +363,12 @@ public PartnerTopicInner getByResourceGroup(String resourceGroupName, String par @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (partnerTopicInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicInfo is required and cannot be null.")); - } else { - partnerTopicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), partnerTopicInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, contentType, accept, + partnerTopicInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -433,7 +377,7 @@ private Mono> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new partner topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,7 +397,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, St * * Asynchronously creates a new partner topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. * @param context The context to associate with this operation. @@ -465,33 +409,11 @@ private Mono createOrUpdateAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse(String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (partnerTopicInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicInfo is required and cannot be null.")); - } else { - partnerTopicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, this.client.getApiVersion(), partnerTopicInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, contentType, accept, partnerTopicInfo, + context); } /** @@ -499,7 +421,7 @@ public Response createOrUpdateWithResponse(String resourceGro * * Asynchronously creates a new partner topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -514,12 +436,101 @@ public PartnerTopicInner createOrUpdate(String resourceGroupName, String partner .getValue(); } + /** + * Update a partner topic. + * + * Asynchronously updates a partner topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param partnerTopicUpdateParameters PartnerTopic update information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String partnerTopicName, + PartnerTopicUpdateParameters partnerTopicUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, contentType, accept, + partnerTopicUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a partner topic. + * + * Asynchronously updates a partner topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param partnerTopicUpdateParameters PartnerTopic update information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String partnerTopicName, + PartnerTopicUpdateParameters partnerTopicUpdateParameters) { + return updateWithResponseAsync(resourceGroupName, partnerTopicName, partnerTopicUpdateParameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a partner topic. + * + * Asynchronously updates a partner topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param partnerTopicUpdateParameters PartnerTopic update information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String partnerTopicName, + PartnerTopicUpdateParameters partnerTopicUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, contentType, accept, + partnerTopicUpdateParameters, context); + } + + /** + * Update a partner topic. + * + * Asynchronously updates a partner topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param partnerTopicUpdateParameters PartnerTopic update information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PartnerTopicInner update(String resourceGroupName, String partnerTopicName, + PartnerTopicUpdateParameters partnerTopicUpdateParameters) { + return updateWithResponse(resourceGroupName, partnerTopicName, partnerTopicUpdateParameters, Context.NONE) + .getValue(); + } + /** * Delete a partner topic. * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -529,25 +540,9 @@ public PartnerTopicInner createOrUpdate(String resourceGroupName, String partner @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String partnerTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -556,7 +551,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -565,26 +560,8 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerTopicName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, this.client.getApiVersion(), Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, Context.NONE); } /** @@ -592,7 +569,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -603,26 +580,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, this.client.getApiVersion(), context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, context); } /** @@ -630,7 +589,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -649,7 +608,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -667,7 +626,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -687,7 +646,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -705,7 +664,7 @@ private Mono deleteAsync(String resourceGroupName, String partnerTopicName * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -721,7 +680,7 @@ public void delete(String resourceGroupName, String partnerTopicName) { * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -734,143 +693,11 @@ public void delete(String resourceGroupName, String partnerTopicName, Context co } /** - * Update a partner topic. - * - * Asynchronously updates a partner topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String partnerTopicName, - PartnerTopicUpdateParameters partnerTopicUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (partnerTopicUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter partnerTopicUpdateParameters is required and cannot be null.")); - } else { - partnerTopicUpdateParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, this.client.getApiVersion(), partnerTopicUpdateParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a partner topic. - * - * Asynchronously updates a partner topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String partnerTopicName, - PartnerTopicUpdateParameters partnerTopicUpdateParameters) { - return updateWithResponseAsync(resourceGroupName, partnerTopicName, partnerTopicUpdateParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update a partner topic. - * - * Asynchronously updates a partner topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String partnerTopicName, - PartnerTopicUpdateParameters partnerTopicUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } - if (partnerTopicUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter partnerTopicUpdateParameters is required and cannot be null.")); - } else { - partnerTopicUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, this.client.getApiVersion(), partnerTopicUpdateParameters, accept, context); - } - - /** - * Update a partner topic. - * - * Asynchronously updates a partner topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerTopicInner update(String resourceGroupName, String partnerTopicName, - PartnerTopicUpdateParameters partnerTopicUpdateParameters) { - return updateWithResponse(resourceGroupName, partnerTopicName, partnerTopicUpdateParameters, Context.NONE) - .getValue(); - } - - /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -885,29 +712,23 @@ public PartnerTopicInner update(String resourceGroupName, String partnerTopicNam * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -921,33 +742,37 @@ private Mono> listSinglePageAsync(String filter * @return result of the List Partner Topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -961,29 +786,22 @@ private PagedFlux listAsync() { * @return result of the List Partner Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -998,46 +816,41 @@ private PagedResponse listSinglePage(String filter, Integer t * @return result of the List Partner Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1052,17 +865,17 @@ public PagedIterable list() { * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1077,36 +890,21 @@ public PagedIterable list(String filter, Integer top, Context * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1120,37 +918,33 @@ private Mono> listByResourceGroupSinglePageAsyn * @return result of the List Partner Topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, - Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1164,36 +958,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGro * @return result of the List Partner Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1208,55 +985,36 @@ private PagedResponse listByResourceGroupSinglePage(String re * @return result of the List Partner Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1271,10 +1029,9 @@ public PagedIterable listByResourceGroup(String resourceGroup * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1282,7 +1039,7 @@ public PagedIterable listByResourceGroup(String resourceGroup * * Activate a newly created partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1292,26 +1049,10 @@ public PagedIterable listByResourceGroup(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private Mono> activateWithResponseAsync(String resourceGroupName, String partnerTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.activate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.activate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1320,7 +1061,7 @@ private Mono> activateWithResponseAsync(String resou * * Activate a newly created partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1338,7 +1079,7 @@ private Mono activateAsync(String resourceGroupName, String p * * Activate a newly created partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1349,27 +1090,9 @@ private Mono activateAsync(String resourceGroupName, String p @ServiceMethod(returns = ReturnType.SINGLE) public Response activateWithResponse(String resourceGroupName, String partnerTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.activateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, this.client.getApiVersion(), accept, context); + return service.activateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context); } /** @@ -1377,7 +1100,7 @@ public Response activateWithResponse(String resourceGroupName * * Activate a newly created partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1394,7 +1117,7 @@ public PartnerTopicInner activate(String resourceGroupName, String partnerTopicN * * Deactivate specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1404,26 +1127,10 @@ public PartnerTopicInner activate(String resourceGroupName, String partnerTopicN @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deactivateWithResponseAsync(String resourceGroupName, String partnerTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.deactivate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, partnerTopicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1432,7 +1139,7 @@ private Mono> deactivateWithResponseAsync(String res * * Deactivate specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1450,7 +1157,7 @@ private Mono deactivateAsync(String resourceGroupName, String * * Deactivate specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1461,27 +1168,9 @@ private Mono deactivateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response deactivateWithResponse(String resourceGroupName, String partnerTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (partnerTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.deactivateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - partnerTopicName, this.client.getApiVersion(), accept, context); + return service.deactivateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context); } /** @@ -1489,7 +1178,7 @@ public Response deactivateWithResponse(String resourceGroupNa * * Deactivate specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1502,6 +1191,8 @@ public PartnerTopicInner deactivate(String resourceGroupName, String partnerTopi } /** + * List partner topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1512,24 +1203,19 @@ public PartnerTopicInner deactivate(String resourceGroupName, String partnerTopi * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List partner topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1539,24 +1225,17 @@ private Mono> listBySubscriptionNextSinglePageA * @return result of the List Partner Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1567,24 +1246,17 @@ private PagedResponse listBySubscriptionNextSinglePage(String * @return result of the List Partner Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1595,24 +1267,19 @@ private PagedResponse listBySubscriptionNextSinglePage(String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List partner topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1622,24 +1289,17 @@ private Mono> listByResourceGroupNextSinglePage * @return result of the List Partner Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List partner topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1650,22 +1310,11 @@ private PagedResponse listByResourceGroupNextSinglePage(Strin * @return result of the List Partner Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PartnerTopicsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java index 639904b647200..08251d966e7c3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resourceGrou Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, partnerTopicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerTopicImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerTopicImpl(inner.getValue(), this.manager())); } public PartnerTopic getByResourceGroup(String resourceGroupName, String partnerTopicName) { @@ -56,16 +52,6 @@ public void delete(String resourceGroupName, String partnerTopicName, Context co this.serviceClient().delete(resourceGroupName, partnerTopicName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerTopicImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerTopicImpl(inner1, this.manager())); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerTopicImpl(inner1, this.manager())); @@ -78,16 +64,22 @@ public PagedIterable listByResourceGroup(String resourceGroupName, return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerTopicImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerTopicImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerTopicImpl(inner1, this.manager())); + } + public Response activateWithResponse(String resourceGroupName, String partnerTopicName, Context context) { Response inner = this.serviceClient().activateWithResponse(resourceGroupName, partnerTopicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerTopicImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerTopicImpl(inner.getValue(), this.manager())); } public PartnerTopic activate(String resourceGroupName, String partnerTopicName) { @@ -103,12 +95,8 @@ public Response deactivateWithResponse(String resourceGroupName, S Context context) { Response inner = this.serviceClient().deactivateWithResponse(resourceGroupName, partnerTopicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PartnerTopicImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PartnerTopicImpl(inner.getValue(), this.manager())); } public PartnerTopic deactivate(String resourceGroupName, String partnerTopicName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java index da1925dc56ea8..686dbfd3d3de0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 6bb77794242f2..b4ac4a2e88e7d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; -import com.azure.resourcemanager.eventgrid.models.PermissionBindingsListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.PermissionBindingsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,99 +68,93 @@ public final class PermissionBindingsClientImpl implements PermissionBindingsCli * The interface defining all the services for EventGridManagementClientPermissionBindings to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPermissionBindings") public interface PermissionBindingsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("permissionBindingName") String permissionBindingName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("permissionBindingName") String permissionBindingName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("permissionBindingName") String permissionBindingName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("permissionBindingName") String permissionBindingName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("permissionBindingName") String permissionBindingName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PermissionBindingInner permissionBindingInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PermissionBindingInner permissionBindingInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("permissionBindingName") String permissionBindingName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PermissionBindingInner permissionBindingInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PermissionBindingInner permissionBindingInfo, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("permissionBindingName") String permissionBindingName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("permissionBindingName") String permissionBindingName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("permissionBindingName") String permissionBindingName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("permissionBindingName") String permissionBindingName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByNamespaceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByNamespaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -169,7 +162,7 @@ Mono> listByNamespaceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByNamespaceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -178,40 +171,22 @@ Response listByNamespaceNextSync( * * Get properties of a permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding along with {@link Response} on successful completion of {@link Mono}. + * @return a permission binding. + * + * Get properties of a permission binding along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String permissionBindingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (permissionBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, permissionBindingName, this.client.getApiVersion(), accept, context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -220,13 +195,15 @@ private Mono> getWithResponseAsync(String resou * * Get properties of a permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding on successful completion of {@link Mono}. + * @return a permission binding. + * + * Get properties of a permission binding on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String namespaceName, @@ -240,43 +217,23 @@ private Mono getAsync(String resourceGroupName, String n * * Get properties of a permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding along with {@link Response}. + * @return a permission binding. + * + * Get properties of a permission binding along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (permissionBindingName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, permissionBindingName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, namespaceName, permissionBindingName, accept, context); } /** @@ -284,13 +241,15 @@ public Response getWithResponse(String resourceGroupName * * Get properties of a permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding. + * @return a permission binding. + * + * Get properties of a permission binding. */ @ServiceMethod(returns = ReturnType.SINGLE) public PermissionBindingInner get(String resourceGroupName, String namespaceName, String permissionBindingName) { @@ -302,9 +261,9 @@ public PermissionBindingInner get(String resourceGroupName, String namespaceName * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -314,36 +273,12 @@ public PermissionBindingInner get(String resourceGroupName, String namespaceName @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, String permissionBindingName, PermissionBindingInner permissionBindingInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (permissionBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); - } - if (permissionBindingInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter permissionBindingInfo is required and cannot be null.")); - } else { - permissionBindingInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, permissionBindingName, this.client.getApiVersion(), - permissionBindingInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, contentType, + accept, permissionBindingInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -352,9 +287,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -364,38 +299,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName, PermissionBindingInner permissionBindingInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (permissionBindingName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); - } - if (permissionBindingInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter permissionBindingInfo is required and cannot be null.")); - } else { - permissionBindingInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, permissionBindingName, this.client.getApiVersion(), permissionBindingInfo, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, contentType, + accept, permissionBindingInfo, Context.NONE); } /** @@ -403,9 +311,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -416,37 +324,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName, PermissionBindingInner permissionBindingInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (permissionBindingName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); - } - if (permissionBindingInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter permissionBindingInfo is required and cannot be null.")); - } else { - permissionBindingInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, permissionBindingName, this.client.getApiVersion(), permissionBindingInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, contentType, + accept, permissionBindingInfo, context); } /** @@ -454,9 +336,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -479,9 +361,9 @@ private PollerFlux, PermissionBindingInner> b * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -503,9 +385,9 @@ public SyncPoller, PermissionBindingInner> be * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -528,9 +410,9 @@ public SyncPoller, PermissionBindingInner> be * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -550,9 +432,9 @@ private Mono createOrUpdateAsync(String resourceGroupNam * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -571,9 +453,9 @@ public PermissionBindingInner createOrUpdate(String resourceGroupName, String na * * Create or update a permission binding with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param permissionBindingName The permission binding name. + * @param permissionBindingName Name of the permission binding. * @param permissionBindingInfo Permission binding information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -593,7 +475,7 @@ public PermissionBindingInner createOrUpdate(String resourceGroupName, String na * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -604,29 +486,9 @@ public PermissionBindingInner createOrUpdate(String resourceGroupName, String na @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String permissionBindingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (permissionBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, permissionBindingName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -635,7 +497,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -646,31 +508,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (permissionBindingName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, permissionBindingName, this.client.getApiVersion(), accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, Context.NONE); } /** @@ -678,7 +517,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. @@ -690,31 +529,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (permissionBindingName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, permissionBindingName, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, context); } /** @@ -722,7 +538,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -744,7 +560,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -764,7 +580,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. @@ -786,7 +602,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -805,7 +621,7 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -822,7 +638,7 @@ public void delete(String resourceGroupName, String namespaceName, String permis * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. @@ -840,7 +656,7 @@ public void delete(String resourceGroupName, String namespaceName, String permis * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -852,31 +668,16 @@ public void delete(String resourceGroupName, String namespaceName, String permis * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace along with {@link PagedResponse} on successful completion + * @return result of the List Permission Binding operation along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -887,7 +688,7 @@ private Mono> listByNamespaceSinglePageAsy * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -899,7 +700,7 @@ private Mono> listByNamespaceSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List Permission Binding operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, @@ -913,12 +714,12 @@ private PagedFlux listByNamespaceAsync(String resourceGr * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List Permission Binding operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { @@ -933,7 +734,7 @@ private PagedFlux listByNamespaceAsync(String resourceGr * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -945,33 +746,15 @@ private PagedFlux listByNamespaceAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace along with {@link PagedResponse}. + * @return result of the List Permission Binding operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -981,7 +764,7 @@ private PagedResponse listByNamespaceSinglePage(String r * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -994,33 +777,15 @@ private PagedResponse listByNamespaceSinglePage(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace along with {@link PagedResponse}. + * @return result of the List Permission Binding operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1030,12 +795,12 @@ private PagedResponse listByNamespaceSinglePage(String r * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Permission Binding operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { @@ -1050,7 +815,7 @@ public PagedIterable listByNamespace(String resourceGrou * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1063,7 +828,7 @@ public PagedIterable listByNamespace(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Permission Binding operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, @@ -1074,6 +839,8 @@ public PagedIterable listByNamespace(String resourceGrou } /** + * List all permission bindings under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1085,13 +852,6 @@ public PagedIterable listByNamespace(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1101,6 +861,8 @@ private Mono> listByNamespaceNextSinglePag } /** + * List all permission bindings under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1111,15 +873,6 @@ private Mono> listByNamespaceNextSinglePag */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1128,6 +881,8 @@ private PagedResponse listByNamespaceNextSinglePage(Stri } /** + * List all permission bindings under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1139,21 +894,10 @@ private PagedResponse listByNamespaceNextSinglePage(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PermissionBindingsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java index cd98da090e758..eb04590e688f0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getWithResponse(String resourceGroupName, Str String permissionBindingName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, namespaceName, permissionBindingName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PermissionBindingImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PermissionBindingImpl(inner.getValue(), this.manager())); } public PermissionBinding get(String resourceGroupName, String namespaceName, String permissionBindingName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionImpl.java index 4f30626a324d8..7880c07d99218 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.eventgrid.models.ConnectionState; import com.azure.resourcemanager.eventgrid.models.PrivateEndpoint; @@ -35,6 +36,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public PrivateEndpoint privateEndpoint() { return this.innerModel().privateEndpoint(); } 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 dedf24ae580d3..d28a60b5653d6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.PrivateEndpointConnectionListResult; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,115 +69,107 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for EventGridManagementClientPrivateEndpointConnections to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") PrivateEndpointConnectionsParentType parentType, @PathParam("parentName") String parentName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") PrivateEndpointConnectionsParentType parentType, @PathParam("parentName") String parentName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") PrivateEndpointConnectionsParentType parentType, @PathParam("parentName") String parentName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") PrivateEndpointConnectionsParentType parentType, @PathParam("parentName") String parentName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") PrivateEndpointConnectionsParentType parentType, @PathParam("parentName") String parentName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, Context context); + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") PrivateEndpointConnectionsParentType parentType, @PathParam("parentName") String parentName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, Context context); + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResource(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") PrivateEndpointConnectionsParentType parentType, - @PathParam("parentName") String parentName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentName") String parentName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByResourceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") PrivateEndpointConnectionsParentType parentType, - @PathParam("parentName") String parentName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentName") String parentName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -186,7 +177,7 @@ Mono> listByResourceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -195,48 +186,29 @@ Response listByResourceNextSync( * * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along - * with {@link Response} on successful completion of {@link Mono}. + * @return a specific private endpoint connection. + * + * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - return Mono.error(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - return Mono.error(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, parentType, parentName, privateEndpointConnectionName, this.client.getApiVersion(), - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, + privateEndpointConnectionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -245,17 +217,20 @@ private Mono> getWithResponseAsync(Stri * * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace on - * successful completion of {@link Mono}. + * @return a specific private endpoint connection. + * + * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, @@ -269,53 +244,29 @@ private Mono getAsync(String resourceGroupName, * * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along - * with {@link Response}. + * @return a specific private endpoint connection. + * + * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, parentType, parentName, privateEndpointConnectionName, accept, context); } /** @@ -323,16 +274,19 @@ public Response getWithResponse(String resourceG * * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace. + * @return a specific private endpoint connection. + * + * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner get(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, @@ -346,55 +300,30 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, PrivateEndpo * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - return Mono.error(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - return Mono.error(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (privateEndpointConnection == null) { - return Mono.error( - new IllegalArgumentException("Parameter privateEndpointConnection is required and cannot be null.")); - } else { - privateEndpointConnection.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, parentType, parentName, privateEndpointConnectionName, this.client.getApiVersion(), - privateEndpointConnection, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, + privateEndpointConnectionName, contentType, accept, privateEndpointConnection, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -403,60 +332,29 @@ private Mono>> updateWithResponseAsync(String resource * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (privateEndpointConnection == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnection is required and cannot be null.")); - } else { - privateEndpointConnection.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, privateEndpointConnectionName, this.client.getApiVersion(), - privateEndpointConnection, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, privateEndpointConnectionName, + contentType, accept, privateEndpointConnection, Context.NONE); } /** @@ -464,61 +362,30 @@ private Response updateWithResponse(String resourceGroupName, * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (privateEndpointConnection == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnection is required and cannot be null.")); - } else { - privateEndpointConnection.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, privateEndpointConnectionName, this.client.getApiVersion(), - privateEndpointConnection, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, privateEndpointConnectionName, + contentType, accept, privateEndpointConnection, context); } /** @@ -526,17 +393,19 @@ private Response updateWithResponse(String resourceGroupName, * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( @@ -554,17 +423,19 @@ private PollerFlux, PrivateEndpointCo * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -581,18 +452,20 @@ public SyncPoller, PrivateEndpointCon * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -610,17 +483,19 @@ public SyncPoller, PrivateEndpointCon * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, @@ -635,17 +510,18 @@ private Mono updateAsync(String resourceGroupNam * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner update(String resourceGroupName, @@ -660,18 +536,19 @@ public PrivateEndpointConnectionInner update(String resourceGroupName, * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner update(String resourceGroupName, @@ -686,12 +563,13 @@ public PrivateEndpointConnectionInner update(String resourceGroupName, * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -700,32 +578,10 @@ public PrivateEndpointConnectionInner update(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - return Mono.error(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - return Mono.error(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, privateEndpointConnectionName, this.client.getApiVersion(), context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, + privateEndpointConnectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -734,12 +590,13 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -748,35 +605,9 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, privateEndpointConnectionName, this.client.getApiVersion(), Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, privateEndpointConnectionName, + Context.NONE); } /** @@ -784,12 +615,13 @@ private Response deleteWithResponse(String resourceGroupName, * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -800,35 +632,9 @@ private Response deleteWithResponse(String resourceGroupName, private Response deleteWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, privateEndpointConnectionName, this.client.getApiVersion(), context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, privateEndpointConnectionName, + context); } /** @@ -836,12 +642,13 @@ private Response deleteWithResponse(String resourceGroupName, * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -861,12 +668,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -885,12 +693,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -911,12 +720,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -934,12 +744,13 @@ private Mono deleteAsync(String resourceGroupName, PrivateEndpointConnecti * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -955,12 +766,13 @@ public void delete(String resourceGroupName, PrivateEndpointConnectionsParentTyp * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -977,9 +789,9 @@ public void delete(String resourceGroupName, PrivateEndpointConnectionsParentTyp * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -992,34 +804,17 @@ public void delete(String resourceGroupName, PrivateEndpointConnectionsParentTyp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return result of the list of all private endpoint connections operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceSinglePageAsync(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - return Mono.error(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - return Mono.error(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResource(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, parentType, parentName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, filter, top, accept, + context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1030,9 +825,9 @@ private Mono> listByResourceSingle * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1045,8 +840,8 @@ private Mono> listByResourceSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated - * response with {@link PagedFlux}. + * @return result of the list of all private endpoint connections operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceAsync(String resourceGroupName, @@ -1061,16 +856,16 @@ private PagedFlux listByResourceAsync(String res * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated - * response with {@link PagedFlux}. + * @return result of the list of all private endpoint connections operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceAsync(String resourceGroupName, @@ -1087,9 +882,9 @@ private PagedFlux listByResourceAsync(String res * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1102,38 +897,15 @@ private PagedFlux listByResourceAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace along with - * {@link PagedResponse}. + * @return result of the list of all private endpoint connections operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceSinglePage(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listByResourceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listByResourceSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, + filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1143,9 +915,9 @@ private PagedResponse listByResourceSinglePage(S * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1159,39 +931,16 @@ private PagedResponse listByResourceSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace along with - * {@link PagedResponse}. + * @return result of the list of all private endpoint connections operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceSinglePage(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listByResourceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listByResourceSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, + filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1201,16 +950,16 @@ private PagedResponse listByResourceSinglePage(S * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated - * response with {@link PagedIterable}. + * @return result of the list of all private endpoint connections operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource(String resourceGroupName, @@ -1227,9 +976,9 @@ public PagedIterable listByResource(String resou * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1243,8 +992,8 @@ public PagedIterable listByResource(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated - * response with {@link PagedIterable}. + * @return result of the list of all private endpoint connections operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource(String resourceGroupName, @@ -1256,6 +1005,8 @@ public PagedIterable listByResource(String resou } /** + * Lists all private endpoint connections under a resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1267,13 +1018,6 @@ public PagedIterable listByResource(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1283,6 +1027,8 @@ private Mono> listByResourceNextSi } /** + * Lists all private endpoint connections under a resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1293,15 +1039,6 @@ private Mono> listByResourceNextSi */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1310,6 +1047,8 @@ private PagedResponse listByResourceNextSinglePa } /** + * Lists all private endpoint connections under a resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1322,21 +1061,10 @@ private PagedResponse listByResourceNextSinglePa @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java index 8f9b847ef40f3..7a99428c9836f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -33,12 +33,8 @@ public Response getWithResponse(String resourceGroupN Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, parentType, parentName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); } public PrivateEndpointConnection get(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourceImpl.java index fd3e848d7448d..419706c36c1aa 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourceImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 aae94b6d5de07..5f941e993f046 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.eventgrid.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.eventgrid.models.PrivateLinkResourcesListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.PrivateLinkResourcesListResult; import reactor.core.publisher.Mono; /** @@ -60,59 +59,57 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * The interface defining all the services for EventGridManagementClientPrivateLinkResources to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") String parentType, @PathParam("parentName") String parentName, - @PathParam("privateLinkResourceName") String privateLinkResourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("privateLinkResourceName") String privateLinkResourceName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") String parentType, @PathParam("parentName") String parentName, - @PathParam("privateLinkResourceName") String privateLinkResourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("privateLinkResourceName") String privateLinkResourceName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResource(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") String parentType, - @PathParam("parentName") String parentName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentName") String parentName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByResourceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parentType") String parentType, - @PathParam("parentName") String parentName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("parentName") String parentName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -120,7 +117,7 @@ Mono> listByResourceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -129,9 +126,9 @@ Response listByResourceNextSync( * * Get properties of a private link resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace @@ -139,39 +136,18 @@ Response listByResourceNextSync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a private link resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return a private link resource. + * + * Get properties of a private link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String parentType, String parentName, String privateLinkResourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - return Mono.error(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - return Mono.error(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateLinkResourceName == null) { - return Mono.error( - new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, privateLinkResourceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, privateLinkResourceName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -180,9 +156,9 @@ private Mono> getWithResponseAsync(String res * * Get properties of a private link resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace @@ -190,7 +166,9 @@ private Mono> getWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a private link resource on successful completion of {@link Mono}. + * @return a private link resource. + * + * Get properties of a private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String parentType, String parentName, @@ -204,9 +182,9 @@ private Mono getAsync(String resourceGroupName, String * * Get properties of a private link resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace @@ -215,40 +193,16 @@ private Mono getAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a private link resource along with {@link Response}. + * @return a private link resource. + * + * Get properties of a private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String parentType, String parentName, String privateLinkResourceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } - if (privateLinkResourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, privateLinkResourceName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, parentType, parentName, privateLinkResourceName, accept, context); } /** @@ -256,9 +210,9 @@ public Response getWithResponse(String resourceGroupNa * * Get properties of a private link resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace @@ -266,7 +220,9 @@ public Response getWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a private link resource. + * @return a private link resource. + * + * Get properties of a private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateLinkResourceInner get(String resourceGroupName, String parentType, String parentName, @@ -280,11 +236,11 @@ public PrivateLinkResourceInner get(String resourceGroupName, String parentType, * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -301,28 +257,11 @@ public PrivateLinkResourceInner get(String resourceGroupName, String parentType, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceSinglePageAsync(String resourceGroupName, String parentType, String parentName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - return Mono.error(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - return Mono.error(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResource(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, parentType, parentName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, filter, top, accept, + context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -333,11 +272,11 @@ private Mono> listByResourceSinglePageAs * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -363,11 +302,11 @@ private PagedFlux listByResourceAsync(String resourceG * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -388,11 +327,11 @@ private PagedFlux listByResourceAsync(String resourceG * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -408,32 +347,10 @@ private PagedFlux listByResourceAsync(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceSinglePage(String resourceGroupName, String parentType, String parentName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listByResourceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listByResourceSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, + filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -443,11 +360,11 @@ private PagedResponse listByResourceSinglePage(String * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -464,32 +381,10 @@ private PagedResponse listByResourceSinglePage(String @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceSinglePage(String resourceGroupName, String parentType, String parentName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (parentType == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentType is required and cannot be null.")); - } - if (parentName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parentName is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listByResourceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - parentType, parentName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listByResourceSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, + filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -499,11 +394,11 @@ private PagedResponse listByResourceSinglePage(String * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -524,11 +419,11 @@ public PagedIterable listByResource(String resourceGro * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -551,6 +446,8 @@ public PagedIterable listByResource(String resourceGro } /** + * List private link resources under specific topic, domain, or partner namespace or namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -562,13 +459,6 @@ public PagedIterable listByResource(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -578,6 +468,8 @@ private Mono> listByResourceNextSinglePa } /** + * List private link resources under specific topic, domain, or partner namespace or namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -588,15 +480,6 @@ private Mono> listByResourceNextSinglePa */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -605,6 +488,8 @@ private PagedResponse listByResourceNextSinglePage(Str } /** + * List private link resources under specific topic, domain, or partner namespace or namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -616,21 +501,10 @@ private PagedResponse listByResourceNextSinglePage(Str */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java index d60ef39bbd677..bae1f3864c476 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getWithResponse(String resourceGroupName, S String privateLinkResourceName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, parentType, parentName, privateLinkResourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkResourceImpl(inner.getValue(), this.manager())); } public PrivateLinkResource get(String resourceGroupName, String parentType, String parentName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java index 3d826022bcada..ff9e9eff8ec9d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionFullUrlImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionFullUrlImpl.java index e28238fbb1084..74a2249a4bc78 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionFullUrlImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionFullUrlImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 55decae6d3b7b..b65cc680e50f8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 fb2371cefe5ed..f3bc3823f854a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient; 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.implementation.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; @@ -74,169 +73,159 @@ public final class SystemTopicEventSubscriptionsClientImpl implements SystemTopi * The interface defining all the services for EventGridManagementClientSystemTopicEventSubscriptions to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientSystemTopicEventSubscriptions") public interface SystemTopicEventSubscriptionsService { @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getDeliveryAttributesSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listBySystemTopic(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("systemTopicName") String systemTopicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listBySystemTopicSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("systemTopicName") String systemTopicName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getFullUrl(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getDeliveryAttributes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getFullUrlSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getDeliveryAttributesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySystemTopic(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getFullUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + @PathParam("systemTopicName") String systemTopicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySystemTopicSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getFullUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + @PathParam("systemTopicName") String systemTopicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -244,7 +233,7 @@ Response listBySystemTopicSync(@HostParam("$host") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySystemTopicNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -252,180 +241,33 @@ Mono> listBySystemTopicNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySystemTopicNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync(String resourceGroupName, - String systemTopicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - return getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, - Context.NONE).getValue(); - } - /** * Get an event subscription of a system topic. * * Get an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription along with {@link Response} on successful completion of {@link Mono}. + * @return an event subscription of a system topic. + * + * Get an event subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -434,13 +276,15 @@ private Mono> getWithResponseAsync(String resou * * Get an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription on successful completion of {@link Mono}. + * @return an event subscription of a system topic. + * + * Get an event subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String systemTopicName, @@ -454,43 +298,23 @@ private Mono getAsync(String resourceGroupName, String s * * Get an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription along with {@link Response}. + * @return an event subscription of a system topic. + * + * Get an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, systemTopicName, eventSubscriptionName, accept, context); } /** @@ -498,13 +322,15 @@ public Response getWithResponse(String resourceGroupName * * Get an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription. + * @return an event subscription of a system topic. + * + * Get an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { @@ -517,10 +343,9 @@ public EventSubscriptionInner get(String resourceGroupName, String systemTopicNa * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -530,37 +355,12 @@ public EventSubscriptionInner get(String resourceGroupName, String systemTopicNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -570,10 +370,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -583,38 +382,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionInfo, Context.NONE); } /** @@ -623,10 +395,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -637,38 +408,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, - context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionInfo, context); } /** @@ -677,10 +421,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -704,10 +447,9 @@ private PollerFlux, EventSubscriptionInner> b * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -730,10 +472,9 @@ public SyncPoller, EventSubscriptionInner> be * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -757,10 +498,9 @@ public SyncPoller, EventSubscriptionInner> be * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -780,10 +520,9 @@ private Mono createOrUpdateAsync(String resourceGroupNam * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -803,10 +542,9 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String sy * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -822,674 +560,399 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String sy } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, eventSubscriptionName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionUpdateParameters, Context.NONE); } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, contentType, + accept, eventSubscriptionUpdateParameters, context); } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, EventSubscriptionInner> beginUpdateAsync( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, systemTopicName, + eventSubscriptionName, eventSubscriptionUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, this.client.getContext()); } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - Response response = deleteWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, + eventSubscriptionUpdateParameters); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, context); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, context); } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return event Subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, systemTopicName, eventSubscriptionName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdateAsync(resourceGroupName, systemTopicName, eventSubscriptionName, + eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, systemTopicName, eventSubscriptionName).getFinalResult(); + public EventSubscriptionInner update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters) + .getFinalResult(); } /** - * Delete an event subscription of a system topic. + * Update event subscription of a system topic. * - * Delete an existing event subscription of a system topic. + * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, - Context context) { - beginDelete(resourceGroupName, systemTopicName, eventSubscriptionName, context).getFinalResult(); + public EventSubscriptionInner update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + context).getFinalResult(); } /** - * Update event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Update an existing event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Update an existing event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionUpdateParameters, - accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE); } /** - * Update event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Update an existing event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionUpdateParameters, - accept, context); + private Response deleteWithResponse(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, context); } /** - * Update event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Update an existing event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Subscription. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EventSubscriptionInner> beginUpdateAsync( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, systemTopicName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Update an existing event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, - eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + Response response = deleteWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Update an existing event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, - eventSubscriptionUpdateParameters, context); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, context); - } - - /** - * Update event subscription of a system topic. - * - * Update an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync(resourceGroupName, systemTopicName, eventSubscriptionName, - eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update event subscription of a system topic. - * - * Update an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters) - .getFinalResult(); - } - - /** - * Update event subscription of a system topic. - * - * Update an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, - context).getFinalResult(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Get full URL of an event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Get the full endpoint URL for an event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a system topic along with {@link Response} on - * successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getFullUrlWithResponseAsync(String resourceGroupName, - String systemTopicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + return beginDeleteAsync(resourceGroupName, systemTopicName, eventSubscriptionName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get full URL of an event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Get the full endpoint URL for an event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a system topic on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getFullUrlAsync(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - return getFullUrlWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + beginDelete(resourceGroupName, systemTopicName, eventSubscriptionName).getFinalResult(); } /** - * Get full URL of an event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Get the full endpoint URL for an event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a system topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getFullUrlSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get full URL of an event subscription of a system topic. - * - * Get the full endpoint URL for an event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a system topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - return getFullUrlWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE) - .getValue(); + public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, + Context context) { + beginDelete(resourceGroupName, systemTopicName, eventSubscriptionName, context).getFinalResult(); } /** @@ -1497,7 +960,7 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1515,27 +978,10 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySystemTopicSinglePageAsync(String resourceGroupName, String systemTopicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listBySystemTopic(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listBySystemTopic(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1546,7 +992,7 @@ private Mono> listBySystemTopicSinglePageA * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1572,7 +1018,7 @@ private PagedFlux listBySystemTopicAsync(String resource * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1592,7 +1038,7 @@ private PagedFlux listBySystemTopicAsync(String resource * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1609,28 +1055,10 @@ private PagedFlux listBySystemTopicAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySystemTopicSinglePage(String resourceGroupName, String systemTopicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listBySystemTopicSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listBySystemTopicSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1640,7 +1068,7 @@ private PagedResponse listBySystemTopicSinglePage(String * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1658,28 +1086,10 @@ private PagedResponse listBySystemTopicSinglePage(String @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySystemTopicSinglePage(String resourceGroupName, String systemTopicName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listBySystemTopicSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, this.client.getApiVersion(), filter, top, accept, context); + = service.listBySystemTopicSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1689,7 +1099,7 @@ private PagedResponse listBySystemTopicSinglePage(String * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1709,7 +1119,7 @@ public PagedIterable listBySystemTopic(String resourceGr * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1733,6 +1143,200 @@ public PagedIterable listBySystemTopic(String resourceGr } /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, systemTopicName, + eventSubscriptionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync(String resourceGroupName, + String systemTopicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, accept, + context); + } + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, + Context.NONE).getValue(); + } + + /** + * Get full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFullUrlWithResponseAsync(String resourceGroupName, + String systemTopicName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFullUrlAsync(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + return getFullUrlWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFullUrlWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, accept, + context); + } + + /** + * Get full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE) + .getValue(); + } + + /** + * List event subscriptions of a system topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1744,13 +1348,6 @@ public PagedIterable listBySystemTopic(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySystemTopicNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listBySystemTopicNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1760,6 +1357,8 @@ private Mono> listBySystemTopicNextSingleP } /** + * List event subscriptions of a system topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1770,15 +1369,6 @@ private Mono> listBySystemTopicNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySystemTopicNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySystemTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1787,6 +1377,8 @@ private PagedResponse listBySystemTopicNextSinglePage(St } /** + * List event subscriptions of a system topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1798,21 +1390,10 @@ private PagedResponse listBySystemTopicNextSinglePage(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySystemTopicNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySystemTopicNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(SystemTopicEventSubscriptionsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java index 17addb277fcac..71e8a0b221ffc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,39 +32,12 @@ public SystemTopicEventSubscriptionsImpl(SystemTopicEventSubscriptionsClient inn this.serviceManager = serviceManager; } - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - DeliveryAttributeListResultInner inner - = this.serviceClient().getDeliveryAttributes(resourceGroupName, systemTopicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionImpl(inner.getValue(), this.manager())); } public EventSubscription get(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { @@ -99,15 +72,6 @@ public EventSubscription createOrUpdate(String resourceGroupName, String systemT } } - public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, systemTopicName, eventSubscriptionName); - } - - public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, - Context context) { - this.serviceClient().delete(resourceGroupName, systemTopicName, eventSubscriptionName, context); - } - public EventSubscription update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { EventSubscriptionInner inner = this.serviceClient() @@ -131,27 +95,13 @@ public EventSubscription update(String resourceGroupName, String systemTopicName } } - public Response getFullUrlWithResponse(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getFullUrlWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + this.serviceClient().delete(resourceGroupName, systemTopicName, eventSubscriptionName); } - public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String systemTopicName, - String eventSubscriptionName) { - EventSubscriptionFullUrlInner inner - = this.serviceClient().getFullUrl(resourceGroupName, systemTopicName, eventSubscriptionName); - if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, + Context context) { + this.serviceClient().delete(resourceGroupName, systemTopicName, eventSubscriptionName, context); } public PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName) { @@ -167,6 +117,44 @@ public PagedIterable listBySystemTopic(String resourceGroupNa return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } + + public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + DeliveryAttributeListResultInner inner + = this.serviceClient().getDeliveryAttributes(resourceGroupName, systemTopicName, eventSubscriptionName); + if (inner != null) { + return new DeliveryAttributeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getFullUrlWithResponse(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getFullUrlWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + } + + public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String systemTopicName, + String eventSubscriptionName) { + EventSubscriptionFullUrlInner inner + = this.serviceClient().getFullUrl(resourceGroupName, systemTopicName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionFullUrlImpl(inner, this.manager()); + } else { + return null; + } + } + private SystemTopicEventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java index f409e82678578..f1d4d72fadb32 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -9,6 +9,8 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicInner; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; +import com.azure.resourcemanager.eventgrid.models.KeyEncryption; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; import com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState; import com.azure.resourcemanager.eventgrid.models.SystemTopic; import com.azure.resourcemanager.eventgrid.models.SystemTopicUpdateParameters; @@ -45,14 +47,14 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public IdentityInfo identity() { return this.innerModel().identity(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public ResourceProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -69,6 +71,14 @@ public String metricResourceId() { return this.innerModel().metricResourceId(); } + public KeyEncryption encryption() { + return this.innerModel().encryption(); + } + + public PlatformCapabilities platformCapabilities() { + return this.innerModel().platformCapabilities(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -202,6 +212,16 @@ public SystemTopicImpl withTopicType(String topicType) { return this; } + public SystemTopicImpl withEncryption(KeyEncryption encryption) { + this.innerModel().withEncryption(encryption); + return this; + } + + public SystemTopicImpl withPlatformCapabilities(PlatformCapabilities platformCapabilities) { + this.innerModel().withPlatformCapabilities(platformCapabilities); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } 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 010fe2a97f9f6..b399a738f3477 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,13 +31,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicInner; +import com.azure.resourcemanager.eventgrid.implementation.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; @@ -71,128 +70,120 @@ public final class SystemTopicsClientImpl implements SystemTopicsClient { * The interface defining all the services for EventGridManagementClientSystemTopics to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientSystemTopics") public interface SystemTopicsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("systemTopicName") String systemTopicName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("systemTopicName") String systemTopicName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SystemTopicInner systemTopicInfo, @HeaderParam("Accept") String accept, + @PathParam("systemTopicName") String systemTopicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SystemTopicInner systemTopicInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SystemTopicInner systemTopicInfo, @HeaderParam("Accept") String accept, + @PathParam("systemTopicName") String systemTopicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SystemTopicInner systemTopicInfo, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("systemTopicName") String systemTopicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") SystemTopicUpdateParameters systemTopicUpdateParameters, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("systemTopicName") String systemTopicName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") SystemTopicUpdateParameters systemTopicUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SystemTopicUpdateParameters systemTopicUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("systemTopicName") String systemTopicName, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SystemTopicUpdateParameters systemTopicUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("systemTopicName") String systemTopicName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/systemTopics") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/systemTopics") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/systemTopics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/systemTopics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -200,32 +191,32 @@ Response listByResourceGroupSync(@HostParam("$host") Str @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -234,37 +225,22 @@ Response listByResourceGroupNextSync( * * Get properties of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic along with {@link Response} on successful completion of {@link Mono}. + * @return a system topic. + * + * Get properties of a system topic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String systemTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -273,12 +249,14 @@ private Mono> getByResourceGroupWithResponseAsync(Str * * Get properties of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic on successful completion of {@link Mono}. + * @return a system topic. + * + * Get properties of a system topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String systemTopicName) { @@ -291,38 +269,22 @@ private Mono getByResourceGroupAsync(String resourceGroupName, * * Get properties of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic along with {@link Response}. + * @return a system topic. + * + * Get properties of a system topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String systemTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, accept, context); } /** @@ -330,12 +292,14 @@ public Response getByResourceGroupWithResponse(String resource * * Get properties of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic. + * @return a system topic. + * + * Get properties of a system topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public SystemTopicInner getByResourceGroup(String resourceGroupName, String systemTopicName) { @@ -347,7 +311,7 @@ public SystemTopicInner getByResourceGroup(String resourceGroupName, String syst * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -358,32 +322,12 @@ public SystemTopicInner getByResourceGroup(String resourceGroupName, String syst @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (systemTopicInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicInfo is required and cannot be null.")); - } else { - systemTopicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, this.client.getApiVersion(), systemTopicInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, contentType, accept, + systemTopicInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -392,7 +336,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -403,33 +347,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (systemTopicInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicInfo is required and cannot be null.")); - } else { - systemTopicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, this.client.getApiVersion(), systemTopicInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, contentType, accept, systemTopicInfo, + Context.NONE); } /** @@ -437,7 +359,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @param context The context to associate with this operation. @@ -449,33 +371,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (systemTopicInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicInfo is required and cannot be null.")); - } else { - systemTopicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, this.client.getApiVersion(), systemTopicInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, contentType, accept, systemTopicInfo, + context); } /** @@ -483,7 +383,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -505,7 +405,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -526,7 +426,7 @@ public SyncPoller, SystemTopicInner> beginCreateOrU * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @param context The context to associate with this operation. @@ -549,7 +449,7 @@ public SyncPoller, SystemTopicInner> beginCreateOrU * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -569,7 +469,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -588,7 +488,7 @@ public SystemTopicInner createOrUpdate(String resourceGroupName, String systemTo * * Asynchronously creates a new system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param systemTopicInfo System Topic information. * @param context The context to associate with this operation. @@ -604,492 +504,374 @@ public SystemTopicInner createOrUpdate(String resourceGroupName, String systemTo } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return eventGrid System Topic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String systemTopicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String systemTopicName, + SystemTopicUpdateParameters systemTopicUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, systemTopicName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, contentType, accept, + systemTopicUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return eventGrid System Topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String systemTopicName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, String systemTopicName, + SystemTopicUpdateParameters systemTopicUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, contentType, accept, + systemTopicUpdateParameters, Context.NONE); } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return eventGrid System Topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String systemTopicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, String systemTopicName, + SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, contentType, accept, + systemTopicUpdateParameters, context); } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String systemTopicName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, systemTopicName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, SystemTopicInner> beginUpdateAsync(String resourceGroupName, + String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, systemTopicName, systemTopicUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SystemTopicInner.class, SystemTopicInner.class, this.client.getContext()); } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName) { - Response response = deleteWithResponse(resourceGroupName, systemTopicName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, + String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters) { + Response response + = updateWithResponse(resourceGroupName, systemTopicName, systemTopicUpdateParameters); + return this.client.getLroResult(response, SystemTopicInner.class, + SystemTopicInner.class, Context.NONE); } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, systemTopicName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, + String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { + Response response + = updateWithResponse(resourceGroupName, systemTopicName, systemTopicUpdateParameters, context); + return this.client.getLroResult(response, SystemTopicInner.class, + SystemTopicInner.class, context); } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return eventGrid System Topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String systemTopicName) { - return beginDeleteAsync(resourceGroupName, systemTopicName).last() + private Mono updateAsync(String resourceGroupName, String systemTopicName, + SystemTopicUpdateParameters systemTopicUpdateParameters) { + return beginUpdateAsync(resourceGroupName, systemTopicName, systemTopicUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String systemTopicName) { - beginDelete(resourceGroupName, systemTopicName).getFinalResult(); + public SystemTopicInner update(String resourceGroupName, String systemTopicName, + SystemTopicUpdateParameters systemTopicUpdateParameters) { + return beginUpdate(resourceGroupName, systemTopicName, systemTopicUpdateParameters).getFinalResult(); } /** - * Delete a system topic. + * Update a system topic. * - * Delete existing system topic. + * Asynchronously updates a system topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. + * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String systemTopicName, Context context) { - beginDelete(resourceGroupName, systemTopicName, context).getFinalResult(); + public SystemTopicInner update(String resourceGroupName, String systemTopicName, + SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, systemTopicName, systemTopicUpdateParameters, context).getFinalResult(); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String systemTopicName, - SystemTopicUpdateParameters systemTopicUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (systemTopicUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter systemTopicUpdateParameters is required and cannot be null.")); - } else { - systemTopicUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String systemTopicName) { return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, this.client.getApiVersion(), systemTopicUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String systemTopicName, - SystemTopicUpdateParameters systemTopicUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (systemTopicUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter systemTopicUpdateParameters is required and cannot be null.")); - } else { - systemTopicUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, this.client.getApiVersion(), systemTopicUpdateParameters, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String systemTopicName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, Context.NONE); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String systemTopicName, - SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (systemTopicUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter systemTopicUpdateParameters is required and cannot be null.")); - } else { - systemTopicUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - systemTopicName, this.client.getApiVersion(), systemTopicUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String systemTopicName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, systemTopicName, context); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of eventGrid System Topic. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SystemTopicInner> beginUpdateAsync(String resourceGroupName, - String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, systemTopicName, systemTopicUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SystemTopicInner.class, SystemTopicInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String systemTopicName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, systemTopicName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid System Topic. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, - String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, systemTopicName, systemTopicUpdateParameters); - return this.client.getLroResult(response, SystemTopicInner.class, - SystemTopicInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName) { + Response response = deleteWithResponse(resourceGroupName, systemTopicName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid System Topic. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, - String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { - Response response - = updateWithResponse(resourceGroupName, systemTopicName, systemTopicUpdateParameters, context); - return this.client.getLroResult(response, SystemTopicInner.class, - SystemTopicInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, systemTopicName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String systemTopicName, - SystemTopicUpdateParameters systemTopicUpdateParameters) { - return beginUpdateAsync(resourceGroupName, systemTopicName, systemTopicUpdateParameters).last() + private Mono deleteAsync(String resourceGroupName, String systemTopicName) { + return beginDeleteAsync(resourceGroupName, systemTopicName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SystemTopicInner update(String resourceGroupName, String systemTopicName, - SystemTopicUpdateParameters systemTopicUpdateParameters) { - return beginUpdate(resourceGroupName, systemTopicName, systemTopicUpdateParameters).getFinalResult(); + public void delete(String resourceGroupName, String systemTopicName) { + beginDelete(resourceGroupName, systemTopicName).getFinalResult(); } /** - * Update a system topic. + * Delete a system topic. * - * Asynchronously updates a system topic with the specified parameters. + * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SystemTopicInner update(String resourceGroupName, String systemTopicName, - SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, systemTopicName, systemTopicUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String systemTopicName, Context context) { + beginDelete(resourceGroupName, systemTopicName, context).getFinalResult(); } /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1104,29 +886,23 @@ public SystemTopicInner update(String resourceGroupName, String systemTopicName, * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1140,33 +916,36 @@ private Mono> listSinglePageAsync(String filter, * @return result of the List System topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1180,29 +959,22 @@ private PagedFlux listAsync() { * @return result of the List System topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1217,46 +989,41 @@ private PagedResponse listSinglePage(String filter, Integer to * @return result of the List System topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1271,17 +1038,17 @@ public PagedIterable list() { * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1296,36 +1063,21 @@ public PagedIterable list(String filter, Integer top, Context * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1339,36 +1091,33 @@ private Mono> listByResourceGroupSinglePageAsync * @return result of the List System topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1382,36 +1131,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @return result of the List System topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1426,55 +1158,36 @@ private PagedResponse listByResourceGroupSinglePage(String res * @return result of the List System topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1489,13 +1202,14 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** + * List system topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1506,24 +1220,19 @@ public PagedIterable listByResourceGroup(String resourceGroupN * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List system topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1533,24 +1242,17 @@ private Mono> listBySubscriptionNextSinglePageAs * @return result of the List System topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List system topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1561,24 +1263,17 @@ private PagedResponse listBySubscriptionNextSinglePage(String * @return result of the List System topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List system topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1589,24 +1284,19 @@ private PagedResponse listBySubscriptionNextSinglePage(String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List system topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1616,24 +1306,17 @@ private Mono> listByResourceGroupNextSinglePageA * @return result of the List System topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List system topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1644,22 +1327,11 @@ private PagedResponse listByResourceGroupNextSinglePage(String * @return result of the List System topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(SystemTopicsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java index 725e446f044d5..7540efb905bd7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resourceGroup Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, systemTopicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SystemTopicImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SystemTopicImpl(inner.getValue(), this.manager())); } public SystemTopic getByResourceGroup(String resourceGroupName, String systemTopicName) { @@ -56,16 +52,6 @@ public void delete(String resourceGroupName, String systemTopicName, Context con this.serviceClient().delete(resourceGroupName, systemTopicName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemTopicImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemTopicImpl(inner1, this.manager())); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemTopicImpl(inner1, this.manager())); @@ -78,6 +64,16 @@ public PagedIterable listByResourceGroup(String resourceGroupName, return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemTopicImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemTopicImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemTopicImpl(inner1, this.manager())); + } + public SystemTopic getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 8c6f05019f169..4556386a8d311 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient; 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.implementation.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; @@ -74,163 +73,155 @@ public final class TopicEventSubscriptionsClientImpl implements TopicEventSubscr * The interface defining all the services for EventGridManagementClientTopicEventSubscriptions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientTopicEventSubscriptions") public interface TopicEventSubscriptionsService { @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getDeliveryAttributesSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 201 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 200, 201 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionInner eventSubscriptionInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") - @ExpectedResponses({ 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getFullUrl(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getDeliveryAttributes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getFullUrlSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getDeliveryAttributesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getFullUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getFullUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventSubscriptionName") String eventSubscriptionName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -238,178 +229,33 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for topic along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getDeliveryAttributes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for topic on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync(String resourceGroupName, - String topicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String topicName, - String eventSubscriptionName) { - return getDeliveryAttributesWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE) - .getValue(); - } - /** * Get an event subscription of a topic. * * Get properties of an event subscription of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a topic along with {@link Response} on successful completion of + * @return an event subscription of a topic. + * + * Get properties of an event subscription of a topic along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -418,13 +264,15 @@ private Mono> getWithResponseAsync(String resou * * Get properties of an event subscription of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a topic on successful completion of {@link Mono}. + * @return an event subscription of a topic. + * + * Get properties of an event subscription of a topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String topicName, @@ -438,43 +286,23 @@ private Mono getAsync(String resourceGroupName, String t * * Get properties of an event subscription of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a topic along with {@link Response}. + * @return an event subscription of a topic. + * + * Get properties of an event subscription of a topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, topicName, - eventSubscriptionName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, topicName, eventSubscriptionName, accept, context); } /** @@ -482,13 +310,15 @@ public Response getWithResponse(String resourceGroupName * * Get properties of an event subscription of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a topic. + * @return an event subscription of a topic. + * + * Get properties of an event subscription of a topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String topicName, String eventSubscriptionName) { @@ -500,10 +330,9 @@ public EventSubscriptionInner get(String resourceGroupName, String topicName, St * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -513,36 +342,12 @@ public EventSubscriptionInner get(String resourceGroupName, String topicName, St @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, - accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, contentType, + accept, eventSubscriptionInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -551,10 +356,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -564,37 +368,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, contentType, accept, + eventSubscriptionInfo, Context.NONE); } /** @@ -602,10 +380,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -616,37 +393,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); - } else { - eventSubscriptionInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, contentType, accept, + eventSubscriptionInfo, context); } /** @@ -654,10 +405,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -680,10 +430,9 @@ private PollerFlux, EventSubscriptionInner> b * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -705,10 +454,9 @@ public SyncPoller, EventSubscriptionInner> be * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -731,10 +479,9 @@ public SyncPoller, EventSubscriptionInner> be * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -754,10 +501,9 @@ private Mono createOrUpdateAsync(String resourceGroupNam * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -776,10 +522,9 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String to * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -795,668 +540,399 @@ public EventSubscriptionInner createOrUpdate(String resourceGroupName, String to } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String topicName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, eventSubscriptionName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, contentType, + accept, eventSubscriptionUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String topicName, - String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, eventSubscriptionName, this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, contentType, accept, + eventSubscriptionUpdateParameters, Context.NONE); } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return event Subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String topicName, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, eventSubscriptionName, this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, contentType, accept, + eventSubscriptionUpdateParameters, context); } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String topicName, - String eventSubscriptionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, EventSubscriptionInner> beginUpdateAsync( + String resourceGroupName, String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, this.client.getContext()); } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, - String eventSubscriptionName) { - Response response = deleteWithResponse(resourceGroupName, topicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of event Subscription. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, - String eventSubscriptionName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, + String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, context); + return this.client.getLroResult(response, + EventSubscriptionInner.class, EventSubscriptionInner.class, context); } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return event Subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String topicName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, topicName, eventSubscriptionName).last() + private Mono updateAsync(String resourceGroupName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdateAsync(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String topicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, topicName, eventSubscriptionName).getFinalResult(); + public EventSubscriptionInner update(String resourceGroupName, String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) + .getFinalResult(); } /** - * Delete an event subscription for a topic. + * Update an event subscription for a topic. * - * Delete an existing event subscription for a topic. + * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return event Subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { - beginDelete(resourceGroupName, topicName, eventSubscriptionName, context).getFinalResult(); + public EventSubscriptionInner update(String resourceGroupName, String topicName, String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + context).getFinalResult(); } /** - * Update an event subscription for a topic. + * Delete an event subscription for a topic. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String topicName, + String eventSubscriptionName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, eventSubscriptionName, this.client.getApiVersion(), - eventSubscriptionUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update an event subscription for a topic. + * Delete an event subscription for a topic. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionUpdateParameters, accept, - Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, Context.NONE); } /** - * Update an event subscription for a topic. + * Delete an event subscription for a topic. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - if (eventSubscriptionUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); - } else { - eventSubscriptionUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, eventSubscriptionName, this.client.getApiVersion(), eventSubscriptionUpdateParameters, accept, - context); + private Response deleteWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, context); } /** - * Update an event subscription for a topic. + * Delete an event subscription for a topic. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of event Subscription. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EventSubscriptionInner> beginUpdateAsync( - String resourceGroupName, String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EventSubscriptionInner.class, EventSubscriptionInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String topicName, + String eventSubscriptionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update an event subscription for a topic. + * Delete an event subscription for a topic. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, + String eventSubscriptionName) { + Response response = deleteWithResponse(resourceGroupName, topicName, eventSubscriptionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update an event subscription for a topic. + * Delete an event subscription for a topic. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, - String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters, context); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, + String eventSubscriptionName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update an event subscription for a topic. + * Delete an event subscription for a topic. * - * Update an existing event subscription for a topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) - .last() + private Mono deleteAsync(String resourceGroupName, String topicName, String eventSubscriptionName) { + return beginDeleteAsync(resourceGroupName, topicName, eventSubscriptionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update an event subscription for a topic. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner update(String resourceGroupName, String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) - .getFinalResult(); - } - - /** - * Update an event subscription for a topic. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner update(String resourceGroupName, String topicName, String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, - context).getFinalResult(); - } - - /** - * Get full URL of an event subscription for topic. - * - * Get the full endpoint URL for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for topic along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getFullUrlWithResponseAsync(String resourceGroupName, - String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get full URL of an event subscription for topic. + * Delete an event subscription for a topic. * - * Get the full endpoint URL for an event subscription for topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getFullUrlAsync(String resourceGroupName, String topicName, - String eventSubscriptionName) { - return getFullUrlWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void delete(String resourceGroupName, String topicName, String eventSubscriptionName) { + beginDelete(resourceGroupName, topicName, eventSubscriptionName).getFinalResult(); } /** - * Get full URL of an event subscription for topic. + * Delete an event subscription for a topic. * - * Get the full endpoint URL for an event subscription for topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse(String resourceGroupName, String topicName, - String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getFullUrlSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get full URL of an event subscription for topic. - * - * Get the full endpoint URL for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String topicName, - String eventSubscriptionName) { - return getFullUrlWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE).getValue(); + public void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { + beginDelete(resourceGroupName, topicName, eventSubscriptionName, context).getFinalResult(); } /** @@ -1464,7 +940,7 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1482,25 +958,10 @@ public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String topicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1511,7 +972,7 @@ private Mono> listSinglePageAsync(String r * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1537,7 +998,7 @@ private PagedFlux listAsync(String resourceGroupName, St * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1557,7 +1018,7 @@ private PagedFlux listAsync(String resourceGroupName, St * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1574,28 +1035,10 @@ private PagedFlux listAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String topicName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, topicName, - this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, topicName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1605,7 +1048,7 @@ private PagedResponse listSinglePage(String resourceGrou * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1623,28 +1066,10 @@ private PagedResponse listSinglePage(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String topicName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, topicName, - this.client.getApiVersion(), filter, top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, topicName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1654,7 +1079,7 @@ private PagedResponse listSinglePage(String resourceGrou * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1674,7 +1099,7 @@ public PagedIterable list(String resourceGroupName, Stri * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1697,6 +1122,196 @@ public PagedIterable list(String resourceGroupName, Stri } /** + * Get delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String topicName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeliveryAttributes(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, topicName, + eventSubscriptionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync(String resourceGroupName, + String topicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String topicName, String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getDeliveryAttributesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, accept, context); + } + + /** + * Get delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String topicName, + String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); + } + + /** + * Get full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFullUrlWithResponseAsync(String resourceGroupName, + String topicName, String eventSubscriptionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getFullUrl(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFullUrlAsync(String resourceGroupName, String topicName, + String eventSubscriptionName) { + return getFullUrlWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFullUrlWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName, Context context) { + final String accept = "application/json"; + return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, accept, context); + } + + /** + * Get full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String topicName, + String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE).getValue(); + } + + /** + * List all event subscriptions for a specific topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1708,13 +1323,6 @@ public PagedIterable list(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -1723,6 +1331,8 @@ private Mono> listNextSinglePageAsync(Stri } /** + * List all event subscriptions for a specific topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1733,15 +1343,6 @@ private Mono> listNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1750,6 +1351,8 @@ private PagedResponse listNextSinglePage(String nextLink } /** + * List all event subscriptions for a specific topic. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1761,21 +1364,10 @@ private PagedResponse listNextSinglePage(String nextLink */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(TopicEventSubscriptionsClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java index ea0c7c79cd67a..a6e7a83b9affe 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,39 +32,12 @@ public TopicEventSubscriptionsImpl(TopicEventSubscriptionsClient innerClient, this.serviceManager = serviceManager; } - public Response getDeliveryAttributesWithResponse(String resourceGroupName, - String topicName, String eventSubscriptionName, Context context) { - Response inner = this.serviceClient() - .getDeliveryAttributesWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String topicName, - String eventSubscriptionName) { - DeliveryAttributeListResultInner inner - = this.serviceClient().getDeliveryAttributes(resourceGroupName, topicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionImpl(inner.getValue(), this.manager())); } public EventSubscription get(String resourceGroupName, String topicName, String eventSubscriptionName) { @@ -98,14 +71,6 @@ public EventSubscription createOrUpdate(String resourceGroupName, String topicNa } } - public void delete(String resourceGroupName, String topicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, topicName, eventSubscriptionName); - } - - public void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { - this.serviceClient().delete(resourceGroupName, topicName, eventSubscriptionName, context); - } - public EventSubscription update(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { EventSubscriptionInner inner = this.serviceClient() @@ -128,18 +93,53 @@ public EventSubscription update(String resourceGroupName, String topicName, Stri } } - public Response getFullUrlWithResponse(String resourceGroupName, String topicName, - String eventSubscriptionName, Context context) { - Response inner - = this.serviceClient().getFullUrlWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); + public void delete(String resourceGroupName, String topicName, String eventSubscriptionName) { + this.serviceClient().delete(resourceGroupName, topicName, eventSubscriptionName); + } + + public void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { + this.serviceClient().delete(resourceGroupName, topicName, eventSubscriptionName, context); + } + + public PagedIterable list(String resourceGroupName, String topicName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, topicName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String topicName, String filter, Integer top, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, topicName, filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); + } + + public Response getDeliveryAttributesWithResponse(String resourceGroupName, + String topicName, String eventSubscriptionName, Context context) { + Response inner = this.serviceClient() + .getDeliveryAttributesWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } + + public DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String topicName, + String eventSubscriptionName) { + DeliveryAttributeListResultInner inner + = this.serviceClient().getDeliveryAttributes(resourceGroupName, topicName, eventSubscriptionName); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + return new DeliveryAttributeListResultImpl(inner, this.manager()); } else { return null; } } + public Response getFullUrlWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName, Context context) { + Response inner + = this.serviceClient().getFullUrlWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); + } + public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName) { EventSubscriptionFullUrlInner inner @@ -151,18 +151,6 @@ public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String topi } } - public PagedIterable list(String resourceGroupName, String topicName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, topicName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String topicName, String filter, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, topicName, filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); - } - private TopicEventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java index d55d169c6e91c..5c6d8d18626cb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -17,6 +17,8 @@ import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; +import com.azure.resourcemanager.eventgrid.models.KeyEncryption; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; import com.azure.resourcemanager.eventgrid.models.ResourceKind; @@ -142,6 +144,14 @@ public DataResidencyBoundary dataResidencyBoundary() { return this.innerModel().dataResidencyBoundary(); } + public KeyEncryption encryption() { + return this.innerModel().encryption(); + } + + public PlatformCapabilities platformCapabilities() { + return this.innerModel().platformCapabilities(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -371,6 +381,16 @@ public TopicImpl withDataResidencyBoundary(DataResidencyBoundary dataResidencyBo } } + public TopicImpl withEncryption(KeyEncryption encryption) { + this.innerModel().withEncryption(encryption); + return this; + } + + public TopicImpl withPlatformCapabilities(PlatformCapabilities platformCapabilities) { + this.innerModel().withPlatformCapabilities(platformCapabilities); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSharedAccessKeysImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSharedAccessKeysImpl.java index 17df2c669cc96..32b0e5dd12ce4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSharedAccessKeysImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSharedAccessKeysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java index 5eeff8b002e62..68df034b1b9df 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; 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 452e5fa205050..6e9431b526ab2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient; import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner; -import com.azure.resourcemanager.eventgrid.models.TopicSpacesListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.TopicSpacesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,97 +68,91 @@ public final class TopicSpacesClientImpl implements TopicSpacesClient { * The interface defining all the services for EventGridManagementClientTopicSpaces to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientTopicSpaces") public interface TopicSpacesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicSpaceName") String topicSpaceName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicSpaceName") String topicSpaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicSpaceName") String topicSpaceName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicSpaceName") String topicSpaceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicSpaceName") String topicSpaceName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TopicSpaceInner topicSpaceInfo, @HeaderParam("Accept") String accept, + @PathParam("topicSpaceName") String topicSpaceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") TopicSpaceInner topicSpaceInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicSpaceName") String topicSpaceName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TopicSpaceInner topicSpaceInfo, @HeaderParam("Accept") String accept, + @PathParam("topicSpaceName") String topicSpaceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") TopicSpaceInner topicSpaceInfo, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicSpaceName") String topicSpaceName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicSpaceName") String topicSpaceName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("topicSpaceName") String topicSpaceName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("topicSpaceName") String topicSpaceName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByNamespaceSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByNamespaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -167,7 +160,7 @@ Mono> listByNamespaceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByNamespaceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -176,39 +169,23 @@ Response listByNamespaceNextSync( * * Get properties of a topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space along with {@link Response} on successful completion of {@link Mono}. + * @return a topic space. + * + * Get properties of a topic space along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String topicSpaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicSpaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicSpaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -217,13 +194,15 @@ private Mono> getWithResponseAsync(String resourceGrou * * Get properties of a topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space on successful completion of {@link Mono}. + * @return a topic space. + * + * Get properties of a topic space on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String namespaceName, String topicSpaceName) { @@ -236,43 +215,23 @@ private Mono getAsync(String resourceGroupName, String namespac * * Get properties of a topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space along with {@link Response}. + * @return a topic space. + * + * Get properties of a topic space along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicSpaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicSpaceName, this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, namespaceName, topicSpaceName, accept, context); } /** @@ -280,13 +239,15 @@ public Response getWithResponse(String resourceGroupName, Strin * * Get properties of a topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space. + * @return a topic space. + * + * Get properties of a topic space. */ @ServiceMethod(returns = ReturnType.SINGLE) public TopicSpaceInner get(String resourceGroupName, String namespaceName, String topicSpaceName) { @@ -298,9 +259,9 @@ public TopicSpaceInner get(String resourceGroupName, String namespaceName, Strin * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -310,34 +271,12 @@ public TopicSpaceInner get(String resourceGroupName, String namespaceName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicSpaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); - } - if (topicSpaceInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter topicSpaceInfo is required and cannot be null.")); - } else { - topicSpaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicSpaceName, this.client.getApiVersion(), topicSpaceInfo, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, contentType, accept, + topicSpaceInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -346,9 +285,9 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -358,37 +297,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicSpaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); - } - if (topicSpaceInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicSpaceInfo is required and cannot be null.")); - } else { - topicSpaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicSpaceName, this.client.getApiVersion(), topicSpaceInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, contentType, accept, + topicSpaceInfo, Context.NONE); } /** @@ -396,9 +309,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -409,37 +322,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicSpaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); - } - if (topicSpaceInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicSpaceInfo is required and cannot be null.")); - } else { - topicSpaceInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicSpaceName, this.client.getApiVersion(), topicSpaceInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, contentType, accept, + topicSpaceInfo, context); } /** @@ -447,9 +334,9 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -470,9 +357,9 @@ private PollerFlux, TopicSpaceInner> beginCreateOrUp * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -493,9 +380,9 @@ public SyncPoller, TopicSpaceInner> beginCreateOrUpd * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -517,9 +404,9 @@ public SyncPoller, TopicSpaceInner> beginCreateOrUpd * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -538,9 +425,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, Stri * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -558,9 +445,9 @@ public TopicSpaceInner createOrUpdate(String resourceGroupName, String namespace * * Create or update a topic space with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicSpaceName The topic space name. + * @param topicSpaceName Name of the Topic space. * @param topicSpaceInfo Topic space information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -580,7 +467,7 @@ public TopicSpaceInner createOrUpdate(String resourceGroupName, String namespace * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -591,28 +478,9 @@ public TopicSpaceInner createOrUpdate(String resourceGroupName, String namespace @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String topicSpaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicSpaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, topicSpaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -621,7 +489,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -632,31 +500,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicSpaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicSpaceName, this.client.getApiVersion(), accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, Context.NONE); } /** @@ -664,7 +509,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. @@ -676,31 +521,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (topicSpaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, topicSpaceName, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, context); } /** @@ -708,7 +530,7 @@ private Response deleteWithResponse(String resourceGroupName, String * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -730,7 +552,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -750,7 +572,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. @@ -771,7 +593,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -790,7 +612,7 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -807,7 +629,7 @@ public void delete(String resourceGroupName, String namespaceName, String topicS * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. @@ -825,7 +647,7 @@ public void delete(String resourceGroupName, String namespaceName, String topicS * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -837,31 +659,16 @@ public void delete(String resourceGroupName, String namespaceName, String topicS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace along with {@link PagedResponse} on successful completion of + * @return result of the List Topic Space operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -872,7 +679,7 @@ private Mono> listByNamespaceSinglePageAsync(Stri * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -884,7 +691,7 @@ private Mono> listByNamespaceSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List Topic Space operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, @@ -898,12 +705,12 @@ private PagedFlux listByNamespaceAsync(String resourceGroupName * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace as paginated response with {@link PagedFlux}. + * @return result of the List Topic Space operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { @@ -918,7 +725,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroupName * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -930,33 +737,15 @@ private PagedFlux listByNamespaceAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace along with {@link PagedResponse}. + * @return result of the List Topic Space operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -966,7 +755,7 @@ private PagedResponse listByNamespaceSinglePage(String resource * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -979,33 +768,15 @@ private PagedResponse listByNamespaceSinglePage(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace along with {@link PagedResponse}. + * @return result of the List Topic Space operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (namespaceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - namespaceName, this.client.getApiVersion(), filter, top, accept, context); + = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1015,12 +786,12 @@ private PagedResponse listByNamespaceSinglePage(String resource * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Topic Space operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { @@ -1035,7 +806,7 @@ public PagedIterable listByNamespace(String resourceGroupName, * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -1048,7 +819,7 @@ public PagedIterable listByNamespace(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Topic Space operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, @@ -1059,6 +830,8 @@ public PagedIterable listByNamespace(String resourceGroupName, } /** + * List all topic spaces under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1070,13 +843,6 @@ public PagedIterable listByNamespace(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1086,6 +852,8 @@ private Mono> listByNamespaceNextSinglePageAsync( } /** + * List all topic spaces under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1096,15 +864,6 @@ private Mono> listByNamespaceNextSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1113,6 +872,8 @@ private PagedResponse listByNamespaceNextSinglePage(String next } /** + * List all topic spaces under a namespace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1124,21 +885,10 @@ private PagedResponse listByNamespaceNextSinglePage(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(TopicSpacesClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java index 20e89b428502a..b3fbef79e42b7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -31,12 +31,8 @@ public Response getWithResponse(String resourceGroupName, String nam Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, namespaceName, topicSpaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TopicSpaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TopicSpaceImpl(inner.getValue(), this.manager())); } public TopicSpace get(String resourceGroupName, String namespaceName, String topicSpaceName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java index b1d97698f1c92..5c4b49e28f235 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeInfoInner; import com.azure.resourcemanager.eventgrid.models.ResourceRegionType; import com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission; @@ -36,6 +37,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String provider() { return this.innerModel().provider(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java index 2b5f0e29d8a09..f5dc763f3a152 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -25,12 +25,11 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.eventgrid.fluent.TopicTypesClient; import com.azure.resourcemanager.eventgrid.fluent.models.EventTypeInner; import com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeInfoInner; -import com.azure.resourcemanager.eventgrid.models.EventTypesListResult; -import com.azure.resourcemanager.eventgrid.models.TopicTypesListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.EventTypesListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.TopicTypesListResult; import reactor.core.publisher.Mono; /** @@ -62,56 +61,164 @@ public final class TopicTypesClientImpl implements TopicTypesClient { * The interface defining all the services for EventGridManagementClientTopicTypes to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientTopicTypes") public interface TopicTypesService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("topicTypeName") String topicTypeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("topicTypeName") String topicTypeName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.EventGrid/topicTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.EventGrid/topicTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}") + @Get("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("topicTypeName") String topicTypeName, @QueryParam("api-version") String apiVersion, + Mono> listEventTypes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("topicTypeName") String topicTypeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}") + @Get("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("topicTypeName") String topicTypeName, @QueryParam("api-version") String apiVersion, + Response listEventTypesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("topicTypeName") String topicTypeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes") + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listEventTypes(@HostParam("$host") String endpoint, - @PathParam("topicTypeName") String topicTypeName, @QueryParam("api-version") String apiVersion, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listEventTypesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listEventTypesSync(@HostParam("$host") String endpoint, - @PathParam("topicTypeName") String topicTypeName, @QueryParam("api-version") String apiVersion, + Response listEventTypesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Get a topic type. + * + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a topic type. + * + * Get information about a topic type along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String topicTypeName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), topicTypeName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a topic type. + * + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a topic type. + * + * Get information about a topic type on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String topicTypeName) { + return getWithResponseAsync(topicTypeName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a topic type. + * + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a topic type. + * + * Get information about a topic type along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String topicTypeName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), topicTypeName, accept, context); + } + + /** + * Get a topic type. + * + * Get information about a topic type. + * + * @param topicTypeName Name of the topic type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a topic type. + * + * Get information about a topic type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicTypeInfoInner get(String topicTypeName) { + return getWithResponse(topicTypeName, Context.NONE).getValue(); + } + /** * List topic types. * @@ -124,16 +231,12 @@ Response listEventTypesSync(@HostParam("$host") String end */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -148,7 +251,7 @@ private Mono> listSinglePageAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -162,16 +265,11 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -187,16 +285,11 @@ private PagedResponse listSinglePage() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -210,7 +303,7 @@ private PagedResponse listSinglePage(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -226,93 +319,88 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** - * Get a topic type. + * List event types. * - * Get information about a topic type. + * List event types for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a topic type along with {@link Response} on successful completion of {@link Mono}. + * @return result of the List Event Types operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String topicTypeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (topicTypeName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private Mono> listEventTypesSinglePageAsync(String topicTypeName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), topicTypeName, this.client.getApiVersion(), - accept, context)) + .withContext(context -> service.listEventTypes(this.client.getEndpoint(), this.client.getApiVersion(), + topicTypeName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a topic type. + * List event types. * - * Get information about a topic type. + * List event types for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a topic type on successful completion of {@link Mono}. + * @return result of the List Event Types operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String topicTypeName) { - return getWithResponseAsync(topicTypeName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listEventTypesAsync(String topicTypeName) { + return new PagedFlux<>(() -> listEventTypesSinglePageAsync(topicTypeName), + nextLink -> listEventTypesNextSinglePageAsync(nextLink)); } /** - * Get a topic type. + * List event types. * - * Get information about a topic type. + * List event types for a topic type. * * @param topicTypeName Name of the topic type. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a topic type along with {@link Response}. + * @return result of the List Event Types operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String topicTypeName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private PagedResponse listEventTypesSinglePage(String topicTypeName) { final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), topicTypeName, this.client.getApiVersion(), accept, context); + Response res = service.listEventTypesSync(this.client.getEndpoint(), + this.client.getApiVersion(), topicTypeName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a topic type. + * List event types. * - * Get information about a topic type. + * List event types for a topic type. * * @param topicTypeName Name of the topic type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a topic type. + * @return result of the List Event Types operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TopicTypeInfoInner get(String topicTypeName) { - return getWithResponse(topicTypeName, Context.NONE).getValue(); + private PagedResponse listEventTypesSinglePage(String topicTypeName, Context context) { + final String accept = "application/json"; + Response res = service.listEventTypesSync(this.client.getEndpoint(), + this.client.getApiVersion(), topicTypeName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -324,25 +412,12 @@ public TopicTypeInfoInner get(String topicTypeName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the List Event Types operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listEventTypesSinglePageAsync(String topicTypeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (topicTypeName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listEventTypes(this.client.getEndpoint(), topicTypeName, - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listEventTypes(String topicTypeName) { + return new PagedIterable<>(() -> listEventTypesSinglePage(topicTypeName), + nextLink -> listEventTypesNextSinglePage(nextLink)); } /** @@ -351,107 +426,139 @@ private Mono> listEventTypesSinglePageAsync(String * List event types for a topic type. * * @param topicTypeName Name of the topic type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation as paginated response with {@link PagedFlux}. + * @return result of the List Event Types operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listEventTypesAsync(String topicTypeName) { - return new PagedFlux<>(() -> listEventTypesSinglePageAsync(topicTypeName)); + public PagedIterable listEventTypes(String topicTypeName, Context context) { + return new PagedIterable<>(() -> listEventTypesSinglePage(topicTypeName, context), + nextLink -> listEventTypesNextSinglePage(nextLink, context)); } /** - * List event types. + * List topic types. * - * List event types for a topic type. + * Get the next page of items. * - * @param topicTypeName Name of the topic type. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation along with {@link PagedResponse}. + * @return result of the List Topic Types operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listEventTypesSinglePage(String topicTypeName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - Response res = service.listEventTypesSync(this.client.getEndpoint(), topicTypeName, - this.client.getApiVersion(), accept, Context.NONE); + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List topic types. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List Topic Types operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** - * List event types. + * List topic types. * - * List event types for a topic type. + * Get the next page of items. * - * @param topicTypeName Name of the topic type. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation along with {@link PagedResponse}. + * @return result of the List Topic Types operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listEventTypesSinglePage(String topicTypeName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (topicTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res = service.listEventTypesSync(this.client.getEndpoint(), topicTypeName, - this.client.getApiVersion(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** * List event types. * - * List event types for a topic type. + * Get the next page of items. * - * @param topicTypeName Name of the topic type. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation as paginated response with {@link PagedIterable}. + * @return result of the List Event Types operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listEventTypes(String topicTypeName) { - return new PagedIterable<>(() -> listEventTypesSinglePage(topicTypeName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listEventTypesNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listEventTypesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List event types. * - * List event types for a topic type. + * Get the next page of items. * - * @param topicTypeName Name of the topic type. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation as paginated response with {@link PagedIterable}. + * @return result of the List Event Types operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listEventTypes(String topicTypeName, Context context) { - return new PagedIterable<>(() -> listEventTypesSinglePage(topicTypeName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listEventTypesNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listEventTypesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(TopicTypesClientImpl.class); + /** + * List event types. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List Event Types operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listEventTypesNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listEventTypesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java index f524035c8c709..96c5bccf9f99a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -29,24 +29,10 @@ public TopicTypesImpl(TopicTypesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicTypeInfoImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicTypeInfoImpl(inner1, this.manager())); - } - public Response getWithResponse(String topicTypeName, Context context) { Response inner = this.serviceClient().getWithResponse(topicTypeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TopicTypeInfoImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TopicTypeInfoImpl(inner.getValue(), this.manager())); } public TopicTypeInfo get(String topicTypeName) { @@ -58,6 +44,16 @@ public TopicTypeInfo get(String topicTypeName) { } } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicTypeInfoImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicTypeInfoImpl(inner1, this.manager())); + } + public PagedIterable listEventTypes(String topicTypeName) { PagedIterable inner = this.serviceClient().listEventTypes(topicTypeName); return ResourceManagerUtils.mapPage(inner, inner1 -> new EventTypeImpl(inner1, this.manager())); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java index 30079e6d9ed58..0c7893c4f2f73 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -32,17 +32,16 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventgrid.fluent.TopicsClient; import com.azure.resourcemanager.eventgrid.fluent.models.EventTypeInner; import com.azure.resourcemanager.eventgrid.fluent.models.TopicInner; import com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner; -import com.azure.resourcemanager.eventgrid.models.EventTypesListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.EventTypesListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.TopicsListResult; import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; 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; @@ -75,122 +74,114 @@ public final class TopicsClientImpl implements TopicsClient { * The interface defining all the services for EventGridManagementClientTopics to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientTopics") public interface TopicsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") TopicInner topicInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TopicInner topicInfo, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") TopicInner topicInfo, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TopicInner topicInfo, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") - @ExpectedResponses({ 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TopicUpdateParameters topicUpdateParameters, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") - @ExpectedResponses({ 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TopicUpdateParameters topicUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TopicUpdateParameters topicUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TopicUpdateParameters topicUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -198,70 +189,82 @@ Response listByResourceGroupSync(@HostParam("$host") String en @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSharedAccessKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listSharedAccessKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSharedAccessKeysSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSharedAccessKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKey(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> regenerateKey(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response regenerateKeySync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response regenerateKeySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("topicName") String topicName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listEventTypes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listEventTypes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("providerNamespace") String providerNamespace, @PathParam("resourceTypeName") String resourceTypeName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listEventTypesSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listEventTypesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("providerNamespace") String providerNamespace, @PathParam("resourceTypeName") String resourceTypeName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -269,23 +272,23 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listEventTypesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listEventTypesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -294,35 +297,21 @@ Response listByResourceGroupNextSync( * * Get properties of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic along with {@link Response} on successful completion of {@link Mono}. + * @return a topic. + * + * Get properties of a topic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String topicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -331,12 +320,14 @@ private Mono> getByResourceGroupWithResponseAsync(String re * * Get properties of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic on successful completion of {@link Mono}. + * @return a topic. + * + * Get properties of a topic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String topicName) { @@ -349,38 +340,22 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Strin * * Get properties of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic along with {@link Response}. + * @return a topic. + * + * Get properties of a topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), accept, context); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, accept, context); } /** @@ -388,12 +363,14 @@ public Response getByResourceGroupWithResponse(String resourceGroupN * * Get properties of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic. + * @return a topic. + * + * Get properties of a topic. */ @ServiceMethod(returns = ReturnType.SINGLE) public TopicInner getByResourceGroup(String resourceGroupName, String topicName) { @@ -405,7 +382,7 @@ public TopicInner getByResourceGroup(String resourceGroupName, String topicName) * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -416,30 +393,11 @@ public TopicInner getByResourceGroup(String resourceGroupName, String topicName) @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String topicName, TopicInner topicInfo) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (topicInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter topicInfo is required and cannot be null.")); - } else { - topicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), topicInfo, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, topicInfo, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -448,7 +406,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -459,33 +417,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String topicName, TopicInner topicInfo) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (topicInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicInfo is required and cannot be null.")); - } else { - topicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, this.client.getApiVersion(), topicInfo, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, topicInfo, + Context.NONE); } /** @@ -493,7 +429,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @param context The context to associate with this operation. @@ -505,33 +441,10 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String topicName, TopicInner topicInfo, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (topicInfo == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicInfo is required and cannot be null.")); - } else { - topicInfo.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, this.client.getApiVersion(), topicInfo, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, topicInfo, context); } /** @@ -539,7 +452,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -561,7 +474,7 @@ private PollerFlux, TopicInner> beginCreateOrUpdateAsync( * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -582,7 +495,7 @@ public SyncPoller, TopicInner> beginCreateOrUpdate(String * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @param context The context to associate with this operation. @@ -603,7 +516,7 @@ public SyncPoller, TopicInner> beginCreateOrUpdate(String * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -622,7 +535,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String to * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -640,7 +553,7 @@ public TopicInner createOrUpdate(String resourceGroupName, String topicName, Top * * Asynchronously creates a new topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param topicInfo Topic information. * @param context The context to associate with this operation. @@ -656,83 +569,61 @@ public TopicInner createOrUpdate(String resourceGroupName, String topicName, Top } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String topicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, + topicUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String topicName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, this.client.getApiVersion(), Context.NONE); + private Response updateWithResponse(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, topicUpdateParameters, + Context.NONE); } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -740,73 +631,66 @@ private Response deleteWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String topicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, this.client.getApiVersion(), context); + private Response updateWithResponse(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, topicUpdateParameters, + context); } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String topicName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, topicName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, TopicInner> beginUpdateAsync(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, topicName, topicUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), TopicInner.class, + TopicInner.class, this.client.getContext()); } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName) { - Response response = deleteWithResponse(resourceGroupName, topicName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, topicName, topicUpdateParameters); + return this.client.getLroResult(response, TopicInner.class, TopicInner.class, + Context.NONE); } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -814,158 +698,116 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, Context context) { - Response response = deleteWithResponse(resourceGroupName, topicName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters, Context context) { + Response response + = updateWithResponse(resourceGroupName, topicName, topicUpdateParameters, context); + return this.client.getLroResult(response, TopicInner.class, TopicInner.class, context); } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String topicName) { - return beginDeleteAsync(resourceGroupName, topicName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String topicName, + TopicUpdateParameters topicUpdateParameters) { + return beginUpdateAsync(resourceGroupName, topicName, topicUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String topicName) { - beginDelete(resourceGroupName, topicName).getFinalResult(); + public TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters) { + return beginUpdate(resourceGroupName, topicName, topicUpdateParameters).getFinalResult(); } /** - * Delete a topic. + * Update a topic. * - * Delete existing topic. + * Asynchronously updates a topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. + * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String topicName, Context context) { - beginDelete(resourceGroupName, topicName, context).getFinalResult(); + public TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, + Context context) { + return beginUpdate(resourceGroupName, topicName, topicUpdateParameters, context).getFinalResult(); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (topicUpdateParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter topicUpdateParameters is required and cannot be null.")); - } else { - topicUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String topicName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), topicUpdateParameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (topicUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicUpdateParameters is required and cannot be null.")); - } else { - topicUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, this.client.getApiVersion(), topicUpdateParameters, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String topicName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, Context.NONE); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -973,88 +815,55 @@ private Response updateWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (topicUpdateParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicUpdateParameters is required and cannot be null.")); - } else { - topicUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, this.client.getApiVersion(), topicUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String topicName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, context); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TopicInner> beginUpdateAsync(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, topicName, topicUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), TopicInner.class, - TopicInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String topicName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, topicName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, topicName, topicUpdateParameters); - return this.client.getLroResult(response, TopicInner.class, TopicInner.class, - Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName) { + Response response = deleteWithResponse(resourceGroupName, topicName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1062,76 +871,67 @@ public SyncPoller, TopicInner> beginUpdate(String resourc * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters, Context context) { - Response response - = updateWithResponse(resourceGroupName, topicName, topicUpdateParameters, context); - return this.client.getLroResult(response, TopicInner.class, TopicInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, Context context) { + Response response = deleteWithResponse(resourceGroupName, topicName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String topicName, - TopicUpdateParameters topicUpdateParameters) { - return beginUpdateAsync(resourceGroupName, topicName, topicUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String topicName) { + return beginDeleteAsync(resourceGroupName, topicName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters) { - return beginUpdate(resourceGroupName, topicName, topicUpdateParameters).getFinalResult(); + public void delete(String resourceGroupName, String topicName) { + beginDelete(resourceGroupName, topicName).getFinalResult(); } /** - * Update a topic. + * Delete a topic. * - * Asynchronously updates a topic with the specified parameters. + * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, - Context context) { - return beginUpdate(resourceGroupName, topicName, topicUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String topicName, Context context) { + beginDelete(resourceGroupName, topicName, context).getFinalResult(); } /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1146,29 +946,23 @@ public TopicInner update(String resourceGroupName, String topicName, TopicUpdate * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, String filter, + Integer top) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1182,33 +976,36 @@ private Mono> listSinglePageAsync(String filter, Integ * @return result of the List Topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, top), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1222,29 +1019,22 @@ private PagedFlux listAsync() { * @return result of the List Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1259,46 +1049,41 @@ private PagedResponse listSinglePage(String filter, Integer top) { * @return result of the List Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, + Integer top, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), filter, top, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1313,17 +1098,17 @@ public PagedIterable list() { * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Integer top, Context context) { - return new PagedIterable<>(() -> listSinglePage(filter, top, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1338,36 +1123,21 @@ public PagedIterable list(String filter, Integer top, Context contex * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String filter, Integer top) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1381,36 +1151,33 @@ private Mono> listByResourceGroupSinglePageAsync(Strin * @return result of the List Topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listAsync() { final String filter = null; final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, top), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1424,36 +1191,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) * @return result of the List Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1468,55 +1218,36 @@ private PagedResponse listByResourceGroupSinglePage(String resourceG * @return result of the List Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String filter, Integer top, Context context) { final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), filter, top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(filter, top), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -1531,10 +1262,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(() -> listSinglePage(filter, top, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1542,7 +1272,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, S * * List the two keys used to publish to a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1552,26 +1282,10 @@ public PagedIterable listByResourceGroup(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSharedAccessKeysWithResponseAsync(String resourceGroupName, String topicName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listSharedAccessKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1580,7 +1294,7 @@ private Mono> listSharedAccessKeysWithRespo * * List the two keys used to publish to a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1598,7 +1312,7 @@ private Mono listSharedAccessKeysAsync(String resour * * List the two keys used to publish to a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1609,27 +1323,9 @@ private Mono listSharedAccessKeysAsync(String resour @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String topicName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } final String accept = "application/json"; - return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), accept, context); + return service.listSharedAccessKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, accept, context); } /** @@ -1637,7 +1333,7 @@ public Response listSharedAccessKeysWithResponse(Str * * List the two keys used to publish to a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1654,7 +1350,7 @@ public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1665,31 +1361,12 @@ public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> regenerateKeyWithResponseAsync(String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, topicName, this.client.getApiVersion(), regenerateKeyRequest, accept, context)) + .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, + regenerateKeyRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1698,7 +1375,7 @@ private Mono>> regenerateKeyWithResponseAsync(String r * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1709,33 +1386,11 @@ private Mono>> regenerateKeyWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, this.client.getApiVersion(), regenerateKeyRequest, accept, Context.NONE); + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, regenerateKeyRequest, + Context.NONE); } /** @@ -1743,7 +1398,7 @@ private Response regenerateKeyWithResponse(String resourceGroupName, * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -1755,33 +1410,11 @@ private Response regenerateKeyWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (topicName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (regenerateKeyRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); - } else { - regenerateKeyRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - topicName, this.client.getApiVersion(), regenerateKeyRequest, accept, context); + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, regenerateKeyRequest, + context); } /** @@ -1789,7 +1422,7 @@ private Response regenerateKeyWithResponse(String resourceGroupName, * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1812,7 +1445,7 @@ private PollerFlux, TopicSharedAccessKeys * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1833,7 +1466,7 @@ private PollerFlux, TopicSharedAccessKeys * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -1856,7 +1489,7 @@ public SyncPoller, TopicSharedAccessKeysI * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1876,7 +1509,7 @@ private Mono regenerateKeyAsync(String resourceGroup * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1895,7 +1528,7 @@ public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -1915,8 +1548,8 @@ public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1928,36 +1561,13 @@ public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listEventTypesSinglePageAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (providerNamespace == null) { - return Mono - .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); - } - if (resourceTypeName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listEventTypes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, providerNamespace, resourceTypeName, resourceName, this.client.getApiVersion(), + .withContext(context -> service.listEventTypes(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, providerNamespace, resourceTypeName, resourceName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1966,8 +1576,8 @@ private Mono> listEventTypesSinglePageAsync(String * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1979,7 +1589,8 @@ private Mono> listEventTypesSinglePageAsync(String private PagedFlux listEventTypesAsync(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { return new PagedFlux<>( - () -> listEventTypesSinglePageAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName)); + () -> listEventTypesSinglePageAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName), + nextLink -> listEventTypesNextSinglePageAsync(nextLink)); } /** @@ -1987,8 +1598,8 @@ private PagedFlux listEventTypesAsync(String resourceGroupName, * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1999,38 +1610,12 @@ private PagedFlux listEventTypesAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listEventTypesSinglePage(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (providerNamespace == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); - } - if (resourceTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listEventTypesSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - providerNamespace, resourceTypeName, resourceName, this.client.getApiVersion(), accept, Context.NONE); + Response res = service.listEventTypesSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, providerNamespace, + resourceTypeName, resourceName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -2038,8 +1623,8 @@ private PagedResponse listEventTypesSinglePage(String resourceGr * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @param context The context to associate with this operation. @@ -2051,38 +1636,12 @@ private PagedResponse listEventTypesSinglePage(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listEventTypesSinglePage(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (providerNamespace == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); - } - if (resourceTypeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceTypeName is required and cannot be null.")); - } - if (resourceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } final String accept = "application/json"; - Response res - = service.listEventTypesSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - providerNamespace, resourceTypeName, resourceName, this.client.getApiVersion(), accept, context); + Response res = service.listEventTypesSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, providerNamespace, + resourceTypeName, resourceName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -2090,8 +1649,8 @@ private PagedResponse listEventTypesSinglePage(String resourceGr * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2103,7 +1662,8 @@ private PagedResponse listEventTypesSinglePage(String resourceGr public PagedIterable listEventTypes(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { return new PagedIterable<>( - () -> listEventTypesSinglePage(resourceGroupName, providerNamespace, resourceTypeName, resourceName)); + () -> listEventTypesSinglePage(resourceGroupName, providerNamespace, resourceTypeName, resourceName), + nextLink -> listEventTypesNextSinglePage(nextLink)); } /** @@ -2111,8 +1671,8 @@ public PagedIterable listEventTypes(String resourceGroupName, St * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @param context The context to associate with this operation. @@ -2125,10 +1685,12 @@ public PagedIterable listEventTypes(String resourceGroupName, St public PagedIterable listEventTypes(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName, Context context) { return new PagedIterable<>(() -> listEventTypesSinglePage(resourceGroupName, providerNamespace, - resourceTypeName, resourceName, context)); + resourceTypeName, resourceName, context), nextLink -> listEventTypesNextSinglePage(nextLink, context)); } /** + * List topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2139,24 +1701,19 @@ public PagedIterable listEventTypes(String resourceGroupName, St * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2166,24 +1723,17 @@ private Mono> listBySubscriptionNextSinglePageAsync(St * @return result of the List Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List topics under a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2194,24 +1744,17 @@ private PagedResponse listBySubscriptionNextSinglePage(String nextLi * @return result of the List Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2222,24 +1765,19 @@ private PagedResponse listBySubscriptionNextSinglePage(String nextLi * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2249,24 +1787,17 @@ private Mono> listByResourceGroupNextSinglePageAsync(S * @return result of the List Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** + * List topics under an Azure subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2277,22 +1808,74 @@ private PagedResponse listByResourceGroupNextSinglePage(String nextL * @return result of the List Topics operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List topic event types. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List Event Types operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listEventTypesNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listEventTypesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List topic event types. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List Event Types operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listEventTypesNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listEventTypesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(TopicsClientImpl.class); + /** + * List topic event types. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List Event Types operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listEventTypesNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listEventTypesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java index 605c13aaf7fbc..37e38a2db9713 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -34,12 +34,8 @@ public TopicsImpl(TopicsClient innerClient, com.azure.resourcemanager.eventgrid. public Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, topicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TopicImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TopicImpl(inner.getValue(), this.manager())); } public Topic getByResourceGroup(String resourceGroupName, String topicName) { @@ -59,16 +55,6 @@ public void delete(String resourceGroupName, String topicName, Context context) this.serviceClient().delete(resourceGroupName, topicName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(filter, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicImpl(inner1, this.manager())); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicImpl(inner1, this.manager())); @@ -81,16 +67,22 @@ public PagedIterable listByResourceGroup(String resourceGroupName, String return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicImpl(inner1, this.manager())); + } + public Response listSharedAccessKeysWithResponse(String resourceGroupName, String topicName, Context context) { Response inner = this.serviceClient().listSharedAccessKeysWithResponse(resourceGroupName, topicName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TopicSharedAccessKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TopicSharedAccessKeysImpl(inner.getValue(), this.manager())); } public TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String topicName) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java index bf6b8e44375b5..08a5c5d7f9f31 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -9,7 +9,6 @@ import com.azure.resourcemanager.eventgrid.models.PartnerDetails; import com.azure.resourcemanager.eventgrid.models.VerifiedPartner; import com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState; -import java.util.UUID; public final class VerifiedPartnerImpl implements VerifiedPartner { private VerifiedPartnerInner innerObject; @@ -38,7 +37,7 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public UUID partnerRegistrationImmutableId() { + public String partnerRegistrationImmutableId() { return this.innerModel().partnerRegistrationImmutableId(); } 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 d35a5c7429006..978d568cb981d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.eventgrid.fluent.VerifiedPartnersClient; import com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerInner; -import com.azure.resourcemanager.eventgrid.models.VerifiedPartnersListResult; +import com.azure.resourcemanager.eventgrid.implementation.models.VerifiedPartnersListResult; import reactor.core.publisher.Mono; /** @@ -60,30 +59,30 @@ public final class VerifiedPartnersClientImpl implements VerifiedPartnersClient * The interface defining all the services for EventGridManagementClientVerifiedPartners to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "EventGridManagementClientVerifiedPartners") public interface VerifiedPartnersService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.EventGrid/verifiedPartners/{verifiedPartnerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("verifiedPartnerName") String verifiedPartnerName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("verifiedPartnerName") String verifiedPartnerName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.EventGrid/verifiedPartners/{verifiedPartnerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("verifiedPartnerName") String verifiedPartnerName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("verifiedPartnerName") String verifiedPartnerName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.EventGrid/verifiedPartners") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -91,7 +90,7 @@ Mono> list(@HostParam("$host") String endpo @Get("/providers/Microsoft.EventGrid/verifiedPartners") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @@ -100,7 +99,7 @@ Response listSync(@HostParam("$host") String endpoin @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -108,7 +107,7 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -121,22 +120,16 @@ Response listNextSync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a verified partner along with {@link Response} on successful completion of {@link Mono}. + * @return a verified partner. + * + * Get properties of a verified partner along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String verifiedPartnerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (verifiedPartnerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter verifiedPartnerName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), verifiedPartnerName, - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + verifiedPartnerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -149,7 +142,9 @@ private Mono> getWithResponseAsync(String verifie * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a verified partner on successful completion of {@link Mono}. + * @return a verified partner. + * + * Get properties of a verified partner on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String verifiedPartnerName) { @@ -166,21 +161,14 @@ private Mono getAsync(String verifiedPartnerName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a verified partner along with {@link Response}. + * @return a verified partner. + * + * Get properties of a verified partner along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String verifiedPartnerName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (verifiedPartnerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter verifiedPartnerName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), verifiedPartnerName, this.client.getApiVersion(), accept, + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), verifiedPartnerName, accept, context); } @@ -193,7 +181,9 @@ public Response getWithResponse(String verifiedPartnerName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a verified partner. + * @return a verified partner. + * + * Get properties of a verified partner. */ @ServiceMethod(returns = ReturnType.SINGLE) public VerifiedPartnerInner get(String verifiedPartnerName) { @@ -215,15 +205,11 @@ public VerifiedPartnerInner get(String verifiedPartnerName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners along with {@link PagedResponse} on successful completion of + * @return result of the List Topic Types operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), filter, top, @@ -248,7 +234,7 @@ private Mono> listSinglePageAsync(String fil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners as paginated response with {@link PagedFlux}. + * @return result of the List Topic Types operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Integer top) { @@ -262,7 +248,7 @@ private PagedFlux listAsync(String filter, Integer top) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners as paginated response with {@link PagedFlux}. + * @return result of the List Topic Types operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -286,15 +272,10 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners along with {@link PagedResponse}. + * @return result of the List Topic Types operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), filter, top, accept, Context.NONE); @@ -318,15 +299,10 @@ private PagedResponse listSinglePage(String filter, Intege * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners along with {@link PagedResponse}. + * @return result of the List Topic Types operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), filter, top, accept, context); @@ -341,7 +317,7 @@ private PagedResponse listSinglePage(String filter, Intege * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners as paginated response with {@link PagedIterable}. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -366,7 +342,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners as paginated response with {@link PagedIterable}. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { @@ -375,24 +351,19 @@ public PagedIterable list(String filter, Integer top, Cont } /** + * List all verified partners. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List verified partners operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return result of the List Topic Types operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -401,25 +372,18 @@ private Mono> listNextSinglePageAsync(String } /** + * List all verified partners. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List verified partners operation along with {@link PagedResponse}. + * @return result of the List Topic Types operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -428,6 +392,8 @@ private PagedResponse listNextSinglePage(String nextLink) } /** + * List all verified partners. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -435,25 +401,14 @@ private PagedResponse listNextSinglePage(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List verified partners operation along with {@link PagedResponse}. + * @return result of the List Topic Types operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(VerifiedPartnersClientImpl.class); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java index 0de003baad1c6..9071710fe2fef 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.implementation; @@ -29,12 +29,8 @@ public VerifiedPartnersImpl(VerifiedPartnersClient innerClient, public Response getWithResponse(String verifiedPartnerName, Context context) { Response inner = this.serviceClient().getWithResponse(verifiedPartnerName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VerifiedPartnerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VerifiedPartnerImpl(inner.getValue(), this.manager())); } public VerifiedPartner get(String verifiedPartnerName) { 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/implementation/models/CaCertificatesListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificatesListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/CaCertificatesListResult.java index 9c73b151fd612..3182616bd4124 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/implementation/models/CaCertificatesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List CA Certificate operation. */ -@Fluent +@Immutable public final class CaCertificatesListResult implements JsonSerializable { /* - * A collection of CA Certificate. + * The CaCertificate items on this page */ private List value; /* - * A link for the next page of CA Certificate. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of CaCertificatesListResult class. */ - public CaCertificatesListResult() { + private CaCertificatesListResult() { } /** - * Get the value property: A collection of CA Certificate. + * Get the value property: The CaCertificate items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of CA Certificate. - * - * @param value the value value to set. - * @return the CaCertificatesListResult object itself. - */ - public CaCertificatesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of CA Certificate. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of CA Certificate. - * - * @param nextLink the nextLink value to set. - * @return the CaCertificatesListResult object itself. - */ - public CaCertificatesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the CaCertificatesListResult. */ public static CaCertificatesListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/ChannelsListResult.java similarity index 67% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/ChannelsListResult.java index 39be656f48bac..bc62b868b5afb 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/implementation/models/ChannelsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Channels operation. */ -@Fluent +@Immutable public final class ChannelsListResult implements JsonSerializable { /* - * A collection of Channels. + * The Channel items on this page */ private List value; /* - * A link for the next page of channels. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ChannelsListResult class. */ - public ChannelsListResult() { + private ChannelsListResult() { } /** - * Get the value property: A collection of Channels. + * Get the value property: The Channel items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Channels. - * - * @param value the value value to set. - * @return the ChannelsListResult object itself. - */ - public ChannelsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of channels. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of channels. - * - * @param nextLink the nextLink value to set. - * @return the ChannelsListResult object itself. - */ - public ChannelsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ChannelsListResult. */ public static ChannelsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/ClientGroupsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/ClientGroupsListResult.java index dc3987f460418..e57230f5bcd80 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/implementation/models/ClientGroupsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Client Group operation. */ -@Fluent +@Immutable public final class ClientGroupsListResult implements JsonSerializable { /* - * A collection of Client Group. + * The ClientGroup items on this page */ private List value; /* - * A link for the next page of Client Group. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ClientGroupsListResult class. */ - public ClientGroupsListResult() { + private ClientGroupsListResult() { } /** - * Get the value property: A collection of Client Group. + * Get the value property: The ClientGroup items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Client Group. - * - * @param value the value value to set. - * @return the ClientGroupsListResult object itself. - */ - public ClientGroupsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of Client Group. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of Client Group. - * - * @param nextLink the nextLink value to set. - * @return the ClientGroupsListResult object itself. - */ - public ClientGroupsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ClientGroupsListResult. */ public static ClientGroupsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/ClientsListResult.java similarity index 67% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/ClientsListResult.java index a935a97318c10..b186036ddcab2 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/implementation/models/ClientsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Client operation. */ -@Fluent +@Immutable public final class ClientsListResult implements JsonSerializable { /* - * A collection of Client. + * The Client items on this page */ private List value; /* - * A link for the next page of Client. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ClientsListResult class. */ - public ClientsListResult() { + private ClientsListResult() { } /** - * Get the value property: A collection of Client. + * Get the value property: The Client items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Client. - * - * @param value the value value to set. - * @return the ClientsListResult object itself. - */ - public ClientsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of Client. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of Client. - * - * @param nextLink the nextLink value to set. - * @return the ClientsListResult object itself. - */ - public ClientsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ClientsListResult. */ public static ClientsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/DomainTopicsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/DomainTopicsListResult.java index 76582c8e71b84..124c15725b871 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/implementation/models/DomainTopicsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Domain Topics operation. */ -@Fluent +@Immutable public final class DomainTopicsListResult implements JsonSerializable { /* - * A collection of Domain Topics. + * The DomainTopic items on this page */ private List value; /* - * A link for the next page of domain topics. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DomainTopicsListResult class. */ - public DomainTopicsListResult() { + private DomainTopicsListResult() { } /** - * Get the value property: A collection of Domain Topics. + * Get the value property: The DomainTopic items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Domain Topics. - * - * @param value the value value to set. - * @return the DomainTopicsListResult object itself. - */ - public DomainTopicsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of domain topics. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of domain topics. - * - * @param nextLink the nextLink value to set. - * @return the DomainTopicsListResult object itself. - */ - public DomainTopicsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DomainTopicsListResult. */ public static DomainTopicsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/DomainsListResult.java similarity index 67% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/DomainsListResult.java index 6816c89e6c289..3a4c044641400 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/implementation/models/DomainsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Domains operation. */ -@Fluent +@Immutable public final class DomainsListResult implements JsonSerializable { /* - * A collection of Domains. + * The Domain items on this page */ private List value; /* - * A link for the next page of domains. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DomainsListResult class. */ - public DomainsListResult() { + private DomainsListResult() { } /** - * Get the value property: A collection of Domains. + * Get the value property: The Domain items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Domains. - * - * @param value the value value to set. - * @return the DomainsListResult object itself. - */ - public DomainsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of domains. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of domains. - * - * @param nextLink the nextLink value to set. - * @return the DomainsListResult object itself. - */ - public DomainsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DomainsListResult. */ public static DomainsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/EventSubscriptionsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/EventSubscriptionsListResult.java index 54f3ce885267a..488171f326eb0 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/implementation/models/EventSubscriptionsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List EventSubscriptions operation. */ -@Fluent +@Immutable public final class EventSubscriptionsListResult implements JsonSerializable { /* - * A collection of EventSubscriptions + * The EventSubscription items on this page */ private List value; /* - * A link for the next page of event subscriptions + * The link to the next page of items */ private String nextLink; /** * Creates an instance of EventSubscriptionsListResult class. */ - public EventSubscriptionsListResult() { + private EventSubscriptionsListResult() { } /** - * Get the value property: A collection of EventSubscriptions. + * Get the value property: The EventSubscription items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of EventSubscriptions. - * - * @param value the value value to set. - * @return the EventSubscriptionsListResult object itself. - */ - public EventSubscriptionsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of event subscriptions. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of event subscriptions. - * - * @param nextLink the nextLink value to set. - * @return the EventSubscriptionsListResult object itself. - */ - public EventSubscriptionsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the EventSubscriptionsListResult. */ public static EventSubscriptionsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/EventTypesListResult.java similarity index 76% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/EventTypesListResult.java index 26365e2827ee4..6af217d2861ea 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/implementation/models/EventTypesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,17 +16,22 @@ /** * Result of the List Event Types operation. */ -@Fluent +@Immutable public final class EventTypesListResult implements JsonSerializable { /* * A collection of event types */ private List value; + /* + * The nextLink property. + */ + private String nextLink; + /** * Creates an instance of EventTypesListResult class. */ - public EventTypesListResult() { + private EventTypesListResult() { } /** @@ -39,25 +44,12 @@ public List value() { } /** - * Set the value property: A collection of event types. - * - * @param value the value value to set. - * @return the EventTypesListResult object itself. - */ - public EventTypesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The nextLink property. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -67,6 +59,7 @@ public void validate() { 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(); } @@ -88,6 +81,8 @@ public static EventTypesListResult fromJson(JsonReader jsonReader) throws IOExce if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> EventTypeInner.fromJson(reader1)); deserializedEventTypesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEventTypesListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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/implementation/models/NamespaceTopicsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/NamespaceTopicsListResult.java index 5b56270e99f42..345667eb376ea 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/implementation/models/NamespaceTopicsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List namespace topics operation. */ -@Fluent +@Immutable public final class NamespaceTopicsListResult implements JsonSerializable { /* - * A collection of namespace topics. + * The NamespaceTopic items on this page */ private List value; /* - * A link for the next page of namespace topics. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NamespaceTopicsListResult class. */ - public NamespaceTopicsListResult() { + private NamespaceTopicsListResult() { } /** - * Get the value property: A collection of namespace topics. + * Get the value property: The NamespaceTopic items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of namespace topics. - * - * @param value the value value to set. - * @return the NamespaceTopicsListResult object itself. - */ - public NamespaceTopicsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of namespace topics. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of namespace topics. - * - * @param nextLink the nextLink value to set. - * @return the NamespaceTopicsListResult object itself. - */ - public NamespaceTopicsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NamespaceTopicsListResult. */ public static NamespaceTopicsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/NamespacesListResult.java similarity index 67% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespacesListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/NamespacesListResult.java index 0f3d637e76c61..2994595d6dfc3 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/implementation/models/NamespacesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Namespaces operation. */ -@Fluent +@Immutable public final class NamespacesListResult implements JsonSerializable { /* - * A collection of namespaces. + * The Namespace items on this page */ private List value; /* - * A link for the next page of namespaces. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NamespacesListResult class. */ - public NamespacesListResult() { + private NamespacesListResult() { } /** - * Get the value property: A collection of namespaces. + * Get the value property: The Namespace items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of namespaces. - * - * @param value the value value to set. - * @return the NamespacesListResult object itself. - */ - public NamespacesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of namespaces. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of namespaces. - * - * @param nextLink the nextLink value to set. - * @return the NamespacesListResult object itself. - */ - public NamespacesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NamespacesListResult. */ public static NamespacesListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/NetworkSecurityPerimeterConfigurationList.java similarity index 65% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationList.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/NetworkSecurityPerimeterConfigurationList.java index a5da4ee091f19..df9cde5eb6e47 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/implementation/models/NetworkSecurityPerimeterConfigurationList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * Network security perimeter configuration List. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterConfigurationList implements JsonSerializable { /* - * List of all network security parameter configurations. + * The NetworkSecurityPerimeterConfiguration items on this page */ private List value; /* - * A link for the next page of Network Security Perimeter Configuration. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NetworkSecurityPerimeterConfigurationList class. */ - public NetworkSecurityPerimeterConfigurationList() { + private NetworkSecurityPerimeterConfigurationList() { } /** - * Get the value property: List of all network security parameter configurations. + * Get the value property: The NetworkSecurityPerimeterConfiguration items on this page. * * @return the value value. */ @@ -45,18 +45,7 @@ public List value() { } /** - * Set the value property: List of all network security parameter configurations. - * - * @param value the value value to set. - * @return the NetworkSecurityPerimeterConfigurationList object itself. - */ - public NetworkSecurityPerimeterConfigurationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of Network Security Perimeter Configuration. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -64,28 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of Network Security Perimeter Configuration. - * - * @param nextLink the nextLink value to set. - * @return the NetworkSecurityPerimeterConfigurationList object itself. - */ - public NetworkSecurityPerimeterConfigurationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -103,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationList. */ public static NetworkSecurityPerimeterConfigurationList fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/OperationsListResult.java similarity index 72% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/OperationsListResult.java index 680df0f439093..370949047d626 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/implementation/models/OperationsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,21 +16,26 @@ /** * Result of the List Operations operation. */ -@Fluent +@Immutable public final class OperationsListResult implements JsonSerializable { /* - * A collection of operations + * The Operation items on this page */ private List value; + /* + * The link to the next page of items + */ + private String nextLink; + /** * Creates an instance of OperationsListResult class. */ - public OperationsListResult() { + private OperationsListResult() { } /** - * Get the value property: A collection of operations. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -39,25 +44,12 @@ public List value() { } /** - * Set the value property: A collection of operations. - * - * @param value the value value to set. - * @return the OperationsListResult object itself. - */ - public OperationsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -67,6 +59,7 @@ public void validate() { 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(); } @@ -76,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationsListResult. */ public static OperationsListResult fromJson(JsonReader jsonReader) throws IOException { @@ -88,6 +82,8 @@ public static OperationsListResult fromJson(JsonReader jsonReader) throws IOExce if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); deserializedOperationsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationsListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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/implementation/models/PartnerConfigurationsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerConfigurationsListResult.java index a973d869d0a3d..8945f48b2a386 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/implementation/models/PartnerConfigurationsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List partner configurations operation. */ -@Fluent +@Immutable public final class PartnerConfigurationsListResult implements JsonSerializable { /* - * A collection of partner configurations. + * The PartnerConfiguration items on this page */ private List value; /* - * A link for the next page of partner configurations. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PartnerConfigurationsListResult class. */ - public PartnerConfigurationsListResult() { + private PartnerConfigurationsListResult() { } /** - * Get the value property: A collection of partner configurations. + * Get the value property: The PartnerConfiguration items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of partner configurations. - * - * @param value the value value to set. - * @return the PartnerConfigurationsListResult object itself. - */ - public PartnerConfigurationsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of partner configurations. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of partner configurations. - * - * @param nextLink the nextLink value to set. - * @return the PartnerConfigurationsListResult object itself. - */ - public PartnerConfigurationsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PartnerConfigurationsListResult. */ public static PartnerConfigurationsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/PartnerDestinationsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerDestinationsListResult.java index c67de8977496f..921af09629947 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/implementation/models/PartnerDestinationsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Partner Destinations operation. */ -@Fluent +@Immutable public final class PartnerDestinationsListResult implements JsonSerializable { /* - * A collection of partner destinations. + * The PartnerDestination items on this page */ private List value; /* - * A link for the next page of partner destinations. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PartnerDestinationsListResult class. */ - public PartnerDestinationsListResult() { + private PartnerDestinationsListResult() { } /** - * Get the value property: A collection of partner destinations. + * Get the value property: The PartnerDestination items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of partner destinations. - * - * @param value the value value to set. - * @return the PartnerDestinationsListResult object itself. - */ - public PartnerDestinationsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of partner destinations. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of partner destinations. - * - * @param nextLink the nextLink value to set. - * @return the PartnerDestinationsListResult object itself. - */ - public PartnerDestinationsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PartnerDestinationsListResult. */ public static PartnerDestinationsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/PartnerNamespacesListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerNamespacesListResult.java index 6b681621e75a7..5b075a3015622 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/implementation/models/PartnerNamespacesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Partner Namespaces operation. */ -@Fluent +@Immutable public final class PartnerNamespacesListResult implements JsonSerializable { /* - * A collection of partner namespaces. + * The PartnerNamespace items on this page */ private List value; /* - * A link for the next page of partner namespaces. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PartnerNamespacesListResult class. */ - public PartnerNamespacesListResult() { + private PartnerNamespacesListResult() { } /** - * Get the value property: A collection of partner namespaces. + * Get the value property: The PartnerNamespace items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of partner namespaces. - * - * @param value the value value to set. - * @return the PartnerNamespacesListResult object itself. - */ - public PartnerNamespacesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of partner namespaces. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of partner namespaces. - * - * @param nextLink the nextLink value to set. - * @return the PartnerNamespacesListResult object itself. - */ - public PartnerNamespacesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PartnerNamespacesListResult. */ public static PartnerNamespacesListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/PartnerRegistrationsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerRegistrationsListResult.java index ba8322993c94a..5f988b29b5986 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/implementation/models/PartnerRegistrationsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Partner Registrations operation. */ -@Fluent +@Immutable public final class PartnerRegistrationsListResult implements JsonSerializable { /* - * A collection of partner registrations. + * The PartnerRegistration items on this page */ private List value; /* - * A link for the next page of partner registrations. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PartnerRegistrationsListResult class. */ - public PartnerRegistrationsListResult() { + private PartnerRegistrationsListResult() { } /** - * Get the value property: A collection of partner registrations. + * Get the value property: The PartnerRegistration items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of partner registrations. - * - * @param value the value value to set. - * @return the PartnerRegistrationsListResult object itself. - */ - public PartnerRegistrationsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of partner registrations. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of partner registrations. - * - * @param nextLink the nextLink value to set. - * @return the PartnerRegistrationsListResult object itself. - */ - public PartnerRegistrationsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PartnerRegistrationsListResult. */ public static PartnerRegistrationsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/PartnerTopicsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerTopicsListResult.java index 47afd62c9c1e8..553c802b2a2ad 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/implementation/models/PartnerTopicsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Partner Topics operation. */ -@Fluent +@Immutable public final class PartnerTopicsListResult implements JsonSerializable { /* - * A collection of partner topics. + * The PartnerTopic items on this page */ private List value; /* - * A link for the next page of partner topics. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PartnerTopicsListResult class. */ - public PartnerTopicsListResult() { + private PartnerTopicsListResult() { } /** - * Get the value property: A collection of partner topics. + * Get the value property: The PartnerTopic items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of partner topics. - * - * @param value the value value to set. - * @return the PartnerTopicsListResult object itself. - */ - public PartnerTopicsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of partner topics. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of partner topics. - * - * @param nextLink the nextLink value to set. - * @return the PartnerTopicsListResult object itself. - */ - public PartnerTopicsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PartnerTopicsListResult. */ public static PartnerTopicsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/PermissionBindingsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PermissionBindingsListResult.java index d44cc02d030d1..6ab3405c1388a 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/implementation/models/PermissionBindingsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Permission Binding operation. */ -@Fluent +@Immutable public final class PermissionBindingsListResult implements JsonSerializable { /* - * A collection of Permission Binding. + * The PermissionBinding items on this page */ private List value; /* - * A link for the next page of Permission Binding. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PermissionBindingsListResult class. */ - public PermissionBindingsListResult() { + private PermissionBindingsListResult() { } /** - * Get the value property: A collection of Permission Binding. + * Get the value property: The PermissionBinding items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Permission Binding. - * - * @param value the value value to set. - * @return the PermissionBindingsListResult object itself. - */ - public PermissionBindingsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of Permission Binding. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of Permission Binding. - * - * @param nextLink the nextLink value to set. - * @return the PermissionBindingsListResult object itself. - */ - public PermissionBindingsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PermissionBindingsListResult. */ public static PermissionBindingsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/PrivateEndpointConnectionListResult.java similarity index 65% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PrivateEndpointConnectionListResult.java index 1e039719e350b..58f48818f176d 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/implementation/models/PrivateEndpointConnectionListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * Result of the list of all private endpoint connections operation. */ -@Fluent +@Immutable public final class PrivateEndpointConnectionListResult implements JsonSerializable { /* - * A collection of private endpoint connection resources. + * The PrivateEndpointConnection items on this page */ private List value; /* - * A link for the next page of private endpoint connection resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PrivateEndpointConnectionListResult class. */ - public PrivateEndpointConnectionListResult() { + private PrivateEndpointConnectionListResult() { } /** - * Get the value property: A collection of private endpoint connection resources. + * Get the value property: The PrivateEndpointConnection items on this page. * * @return the value value. */ @@ -45,18 +45,7 @@ public List value() { } /** - * Set the value property: A collection of private endpoint connection resources. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResult object itself. - */ - public PrivateEndpointConnectionListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of private endpoint connection resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -64,28 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of private endpoint connection resources. - * - * @param nextLink the nextLink value to set. - * @return the PrivateEndpointConnectionListResult object itself. - */ - public PrivateEndpointConnectionListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -103,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. */ public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/PrivateLinkResourcesListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PrivateLinkResourcesListResult.java index e424cae880a0c..15fd78047413f 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/implementation/models/PrivateLinkResourcesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List private link resources operation. */ -@Fluent +@Immutable public final class PrivateLinkResourcesListResult implements JsonSerializable { /* - * A collection of private link resources + * The PrivateLinkResource items on this page */ private List value; /* - * A link for the next page of private link resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PrivateLinkResourcesListResult class. */ - public PrivateLinkResourcesListResult() { + private PrivateLinkResourcesListResult() { } /** - * Get the value property: A collection of private link resources. + * Get the value property: The PrivateLinkResource items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourcesListResult object itself. - */ - public PrivateLinkResourcesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of private link resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of private link resources. - * - * @param nextLink the nextLink value to set. - * @return the PrivateLinkResourcesListResult object itself. - */ - public PrivateLinkResourcesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PrivateLinkResourcesListResult. */ public static PrivateLinkResourcesListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/SubscriptionsListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/SubscriptionsListResult.java index dfd21aef654a3..05fe4fb311a13 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/implementation/models/SubscriptionsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List event subscriptions operation. */ -@Fluent +@Immutable public final class SubscriptionsListResult implements JsonSerializable { /* - * A collection of Subscriptions. + * The Subscription items on this page */ private List value; /* - * A link for the next page of event subscriptions + * The link to the next page of items */ private String nextLink; /** * Creates an instance of SubscriptionsListResult class. */ - public SubscriptionsListResult() { + private SubscriptionsListResult() { } /** - * Get the value property: A collection of Subscriptions. + * Get the value property: The Subscription items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Subscriptions. - * - * @param value the value value to set. - * @return the SubscriptionsListResult object itself. - */ - public SubscriptionsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of event subscriptions. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of event subscriptions. - * - * @param nextLink the nextLink value to set. - * @return the SubscriptionsListResult object itself. - */ - public SubscriptionsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the SubscriptionsListResult. */ public static SubscriptionsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/SystemTopicsListResult.java similarity index 67% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/SystemTopicsListResult.java index f7c30ef38643b..bb30d51550330 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/implementation/models/SystemTopicsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List System topics operation. */ -@Fluent +@Immutable public final class SystemTopicsListResult implements JsonSerializable { /* - * A collection of system Topics. + * The SystemTopic items on this page */ private List value; /* - * A link for the next page of topics. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of SystemTopicsListResult class. */ - public SystemTopicsListResult() { + private SystemTopicsListResult() { } /** - * Get the value property: A collection of system Topics. + * Get the value property: The SystemTopic items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of system Topics. - * - * @param value the value value to set. - * @return the SystemTopicsListResult object itself. - */ - public SystemTopicsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of topics. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of topics. - * - * @param nextLink the nextLink value to set. - * @return the SystemTopicsListResult object itself. - */ - public SystemTopicsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the SystemTopicsListResult. */ public static SystemTopicsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/TopicSpacesListResult.java similarity index 66% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/TopicSpacesListResult.java index c85e16a3b104d..3c61706ebadd6 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/implementation/models/TopicSpacesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Topic Space operation. */ -@Fluent +@Immutable public final class TopicSpacesListResult implements JsonSerializable { /* - * A collection of Topic Space. + * The TopicSpace items on this page */ private List value; /* - * A link for the next page of Topic Space. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of TopicSpacesListResult class. */ - public TopicSpacesListResult() { + private TopicSpacesListResult() { } /** - * Get the value property: A collection of Topic Space. + * Get the value property: The TopicSpace items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Topic Space. - * - * @param value the value value to set. - * @return the TopicSpacesListResult object itself. - */ - public TopicSpacesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of Topic Space. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of Topic Space. - * - * @param nextLink the nextLink value to set. - * @return the TopicSpacesListResult object itself. - */ - public TopicSpacesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the TopicSpacesListResult. */ public static TopicSpacesListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/TopicTypesListResult.java similarity index 76% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/TopicTypesListResult.java index 49a03d932489a..550fa2637355f 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/implementation/models/TopicTypesListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,17 +16,22 @@ /** * Result of the List Topic Types operation. */ -@Fluent +@Immutable public final class TopicTypesListResult implements JsonSerializable { /* * A collection of topic types */ private List value; + /* + * The nextLink property. + */ + private String nextLink; + /** * Creates an instance of TopicTypesListResult class. */ - public TopicTypesListResult() { + private TopicTypesListResult() { } /** @@ -39,25 +44,12 @@ public List value() { } /** - * Set the value property: A collection of topic types. - * - * @param value the value value to set. - * @return the TopicTypesListResult object itself. - */ - public TopicTypesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The nextLink property. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -67,6 +59,7 @@ public void validate() { 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(); } @@ -88,6 +81,8 @@ public static TopicTypesListResult fromJson(JsonReader jsonReader) throws IOExce if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> TopicTypeInfoInner.fromJson(reader1)); deserializedTopicTypesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTopicTypesListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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/implementation/models/TopicsListResult.java similarity index 67% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/TopicsListResult.java index edadb20b18bf7..6c7564566d996 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/implementation/models/TopicsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Result of the List Topics operation. */ -@Fluent +@Immutable public final class TopicsListResult implements JsonSerializable { /* - * A collection of Topics + * The Topic items on this page */ private List value; /* - * A link for the next page of topics + * The link to the next page of items */ private String nextLink; /** * Creates an instance of TopicsListResult class. */ - public TopicsListResult() { + private TopicsListResult() { } /** - * Get the value property: A collection of Topics. + * Get the value property: The Topic items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of Topics. - * - * @param value the value value to set. - * @return the TopicsListResult object itself. - */ - public TopicsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of topics. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of topics. - * - * @param nextLink the nextLink value to set. - * @return the TopicsListResult object itself. - */ - public TopicsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the TopicsListResult. */ public static TopicsListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/VerifiedPartnersListResult.java similarity index 65% rename from sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java rename to sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/VerifiedPartnersListResult.java index fc28b69aab66a..40c9e4e04914a 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/implementation/models/VerifiedPartnersListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.eventgrid.models; +package com.azure.resourcemanager.eventgrid.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * Result of the List verified partners operation. + * Result of the List Topic Types operation. */ -@Fluent +@Immutable public final class VerifiedPartnersListResult implements JsonSerializable { /* - * A collection of verified partners. + * The VerifiedPartner items on this page */ private List value; /* - * A link for the next page of verified partners if any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of VerifiedPartnersListResult class. */ - public VerifiedPartnersListResult() { + private VerifiedPartnersListResult() { } /** - * Get the value property: A collection of verified partners. + * Get the value property: The VerifiedPartner items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: A collection of verified partners. - * - * @param value the value value to set. - * @return the VerifiedPartnersListResult object itself. - */ - public VerifiedPartnersListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link for the next page of verified partners if any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A link for the next page of verified partners if any. - * - * @param nextLink the nextLink value to set. - * @return the VerifiedPartnersListResult object itself. - */ - public VerifiedPartnersListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the VerifiedPartnersListResult. */ public static VerifiedPartnersListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/package-info.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/package-info.java index 44c1eb2435ba7..e46900e19b260 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/package-info.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for EventGridManagementClient. + * Package containing the implementations for EventGrid. * Azure EventGrid Management Client. */ package com.azure.resourcemanager.eventgrid.implementation; 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 73ca9410fb635..bdbb3e8c6d259 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -65,14 +65,6 @@ public AdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 0792d66252c62..9364e5a86582f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,98 +12,98 @@ */ public final class AdvancedFilterOperatorType extends ExpandableStringEnum { /** - * Static value NumberIn for AdvancedFilterOperatorType. + * NumberIn. */ public static final AdvancedFilterOperatorType NUMBER_IN = fromString("NumberIn"); /** - * Static value NumberNotIn for AdvancedFilterOperatorType. + * NumberNotIn. */ public static final AdvancedFilterOperatorType NUMBER_NOT_IN = fromString("NumberNotIn"); /** - * Static value NumberLessThan for AdvancedFilterOperatorType. + * NumberLessThan. */ public static final AdvancedFilterOperatorType NUMBER_LESS_THAN = fromString("NumberLessThan"); /** - * Static value NumberGreaterThan for AdvancedFilterOperatorType. + * NumberGreaterThan. */ public static final AdvancedFilterOperatorType NUMBER_GREATER_THAN = fromString("NumberGreaterThan"); /** - * Static value NumberLessThanOrEquals for AdvancedFilterOperatorType. + * NumberLessThanOrEquals. */ public static final AdvancedFilterOperatorType NUMBER_LESS_THAN_OR_EQUALS = fromString("NumberLessThanOrEquals"); /** - * Static value NumberGreaterThanOrEquals for AdvancedFilterOperatorType. + * NumberGreaterThanOrEquals. */ public static final AdvancedFilterOperatorType NUMBER_GREATER_THAN_OR_EQUALS = fromString("NumberGreaterThanOrEquals"); /** - * Static value BoolEquals for AdvancedFilterOperatorType. + * BoolEquals. */ public static final AdvancedFilterOperatorType BOOL_EQUALS = fromString("BoolEquals"); /** - * Static value StringIn for AdvancedFilterOperatorType. + * StringIn. */ public static final AdvancedFilterOperatorType STRING_IN = fromString("StringIn"); /** - * Static value StringNotIn for AdvancedFilterOperatorType. + * StringNotIn. */ public static final AdvancedFilterOperatorType STRING_NOT_IN = fromString("StringNotIn"); /** - * Static value StringBeginsWith for AdvancedFilterOperatorType. + * StringBeginsWith. */ public static final AdvancedFilterOperatorType STRING_BEGINS_WITH = fromString("StringBeginsWith"); /** - * Static value StringEndsWith for AdvancedFilterOperatorType. + * StringEndsWith. */ public static final AdvancedFilterOperatorType STRING_ENDS_WITH = fromString("StringEndsWith"); /** - * Static value StringContains for AdvancedFilterOperatorType. + * StringContains. */ public static final AdvancedFilterOperatorType STRING_CONTAINS = fromString("StringContains"); /** - * Static value NumberInRange for AdvancedFilterOperatorType. + * NumberInRange. */ public static final AdvancedFilterOperatorType NUMBER_IN_RANGE = fromString("NumberInRange"); /** - * Static value NumberNotInRange for AdvancedFilterOperatorType. + * NumberNotInRange. */ public static final AdvancedFilterOperatorType NUMBER_NOT_IN_RANGE = fromString("NumberNotInRange"); /** - * Static value StringNotBeginsWith for AdvancedFilterOperatorType. + * StringNotBeginsWith. */ public static final AdvancedFilterOperatorType STRING_NOT_BEGINS_WITH = fromString("StringNotBeginsWith"); /** - * Static value StringNotEndsWith for AdvancedFilterOperatorType. + * StringNotEndsWith. */ public static final AdvancedFilterOperatorType STRING_NOT_ENDS_WITH = fromString("StringNotEndsWith"); /** - * Static value StringNotContains for AdvancedFilterOperatorType. + * StringNotContains. */ public static final AdvancedFilterOperatorType STRING_NOT_CONTAINS = fromString("StringNotContains"); /** - * Static value IsNullOrUndefined for AdvancedFilterOperatorType. + * IsNullOrUndefined. */ public static final AdvancedFilterOperatorType IS_NULL_OR_UNDEFINED = fromString("IsNullOrUndefined"); /** - * Static value IsNotNull for AdvancedFilterOperatorType. + * IsNotNull. */ public static final AdvancedFilterOperatorType IS_NOT_NULL = fromString("IsNotNull"); 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 fc53c6536c89f..03b5cb98502a4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,28 +13,28 @@ public final class AlternativeAuthenticationNameSource extends ExpandableStringEnum { /** - * Static value ClientCertificateSubject for AlternativeAuthenticationNameSource. + * ClientCertificateSubject. */ public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_SUBJECT = fromString("ClientCertificateSubject"); /** - * Static value ClientCertificateDns for AlternativeAuthenticationNameSource. + * ClientCertificateDns. */ public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_DNS = fromString("ClientCertificateDns"); /** - * Static value ClientCertificateUri for AlternativeAuthenticationNameSource. + * ClientCertificateUri. */ public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_URI = fromString("ClientCertificateUri"); /** - * Static value ClientCertificateIp for AlternativeAuthenticationNameSource. + * ClientCertificateIp. */ public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_IP = fromString("ClientCertificateIp"); /** - * Static value ClientCertificateEmail for AlternativeAuthenticationNameSource. + * ClientCertificateEmail. */ public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_EMAIL = fromString("ClientCertificateEmail"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AutoScaleConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AutoScaleConfiguration.java new file mode 100644 index 0000000000000..038ac3b2d7d9b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AutoScaleConfiguration.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Auto-scale configuration for the namespace resource. + */ +@Fluent +public final class AutoScaleConfiguration implements JsonSerializable { + /* + * Indicates whether auto-scaling is enabled for the namespace. When enabled, the namespace will automatically scale + * between minimumThroughputUnits and maximumThroughputUnits based on usage patterns. + */ + private Boolean enableAutoScale; + + /* + * Minimum number of Throughput Units for auto-scaling. Valid only when EnableAutoScale is true. + */ + private Integer minimumThroughputUnits; + + /* + * Maximum number of Throughput Units for auto-scaling. Valid only when EnableAutoScale is true. + */ + private Integer maximumThroughputUnits; + + /** + * Creates an instance of AutoScaleConfiguration class. + */ + public AutoScaleConfiguration() { + } + + /** + * Get the enableAutoScale property: Indicates whether auto-scaling is enabled for the namespace. When enabled, the + * namespace will automatically scale + * between minimumThroughputUnits and maximumThroughputUnits based on usage patterns. + * + * @return the enableAutoScale value. + */ + public Boolean enableAutoScale() { + return this.enableAutoScale; + } + + /** + * Set the enableAutoScale property: Indicates whether auto-scaling is enabled for the namespace. When enabled, the + * namespace will automatically scale + * between minimumThroughputUnits and maximumThroughputUnits based on usage patterns. + * + * @param enableAutoScale the enableAutoScale value to set. + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withEnableAutoScale(Boolean enableAutoScale) { + this.enableAutoScale = enableAutoScale; + return this; + } + + /** + * Get the minimumThroughputUnits property: Minimum number of Throughput Units for auto-scaling. Valid only when + * EnableAutoScale is true. + * + * @return the minimumThroughputUnits value. + */ + public Integer minimumThroughputUnits() { + return this.minimumThroughputUnits; + } + + /** + * Set the minimumThroughputUnits property: Minimum number of Throughput Units for auto-scaling. Valid only when + * EnableAutoScale is true. + * + * @param minimumThroughputUnits the minimumThroughputUnits value to set. + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withMinimumThroughputUnits(Integer minimumThroughputUnits) { + this.minimumThroughputUnits = minimumThroughputUnits; + return this; + } + + /** + * Get the maximumThroughputUnits property: Maximum number of Throughput Units for auto-scaling. Valid only when + * EnableAutoScale is true. + * + * @return the maximumThroughputUnits value. + */ + public Integer maximumThroughputUnits() { + return this.maximumThroughputUnits; + } + + /** + * Set the maximumThroughputUnits property: Maximum number of Throughput Units for auto-scaling. Valid only when + * EnableAutoScale is true. + * + * @param maximumThroughputUnits the maximumThroughputUnits value to set. + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withMaximumThroughputUnits(Integer maximumThroughputUnits) { + this.maximumThroughputUnits = maximumThroughputUnits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableAutoScale", this.enableAutoScale); + jsonWriter.writeNumberField("minimumThroughputUnits", this.minimumThroughputUnits); + jsonWriter.writeNumberField("maximumThroughputUnits", this.maximumThroughputUnits); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutoScaleConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutoScaleConfiguration 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 AutoScaleConfiguration. + */ + public static AutoScaleConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutoScaleConfiguration deserializedAutoScaleConfiguration = new AutoScaleConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableAutoScale".equals(fieldName)) { + deserializedAutoScaleConfiguration.enableAutoScale = reader.getNullable(JsonReader::getBoolean); + } else if ("minimumThroughputUnits".equals(fieldName)) { + deserializedAutoScaleConfiguration.minimumThroughputUnits = reader.getNullable(JsonReader::getInt); + } else if ("maximumThroughputUnits".equals(fieldName)) { + deserializedAutoScaleConfiguration.maximumThroughputUnits = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAutoScaleConfiguration; + }); + } +} 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 497d5e07ca051..3377a3e34ed64 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -102,18 +102,6 @@ public String azureActiveDirectoryApplicationIdOrUri() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 53b4744603c3d..eba0e802392d9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -148,18 +148,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 b3db2ab7d8dff..de09777ce6bc4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public BoolEqualsAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 83cfe834e319b..ec6b692541d72 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public BoolEqualsFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 8c8fcd9156c1f..b1d91cf52f981 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -35,7 +35,7 @@ public interface CaCertificate { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -114,7 +114,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, namespaceName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @return the next definition stage. */ 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 aa079caa7e340..90cc1f29e4724 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,37 +12,37 @@ */ public final class CaCertificateProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for CaCertificateProvisioningState. + * Creating. */ public static final CaCertificateProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for CaCertificateProvisioningState. + * Updating. */ public static final CaCertificateProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for CaCertificateProvisioningState. + * Deleting. */ public static final CaCertificateProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for CaCertificateProvisioningState. + * Succeeded. */ public static final CaCertificateProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for CaCertificateProvisioningState. + * Canceled. */ public static final CaCertificateProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for CaCertificateProvisioningState. + * Failed. */ public static final CaCertificateProvisioningState FAILED = fromString("Failed"); /** - * Static value Deleted for CaCertificateProvisioningState. + * Deleted. */ public static final CaCertificateProvisioningState DELETED = fromString("Deleted"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificates.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificates.java index 31ef20bd10f21..e7dc1dc750a7c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificates.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificates.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,14 +17,16 @@ public interface CaCertificates { * * Get properties of a CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate along with {@link Response}. + * @return a CA certificate. + * + * Get properties of a CA certificate along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String namespaceName, String caCertificateName, Context context); @@ -34,13 +36,15 @@ Response getWithResponse(String resourceGroupName, String namespa * * Get properties of a CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate. + * @return a CA certificate. + * + * Get properties of a CA certificate. */ CaCertificate get(String resourceGroupName, String namespaceName, String caCertificateName); @@ -49,7 +53,7 @@ Response getWithResponse(String resourceGroupName, String namespa * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,7 +67,7 @@ Response getWithResponse(String resourceGroupName, String namespa * * Delete an existing CA certificate. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param caCertificateName Name of the CA certificate. * @param context The context to associate with this operation. @@ -78,12 +82,12 @@ Response getWithResponse(String resourceGroupName, String namespa * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List CA Certificate operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -92,7 +96,7 @@ Response getWithResponse(String resourceGroupName, String namespa * * Get all the CA certificates under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -105,7 +109,7 @@ Response getWithResponse(String resourceGroupName, String namespa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List CA Certificate operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context); @@ -119,7 +123,9 @@ PagedIterable listByNamespace(String resourceGroupName, String na * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate along with {@link Response}. + * @return a CA certificate. + * + * Get properties of a CA certificate along with {@link Response}. */ CaCertificate getById(String id); @@ -133,7 +139,9 @@ PagedIterable listByNamespace(String resourceGroupName, String na * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a CA certificate along with {@link Response}. + * @return a CA certificate. + * + * Get properties of a CA certificate along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 d62313522f459..6007052c11494 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -36,7 +36,7 @@ public interface Channel { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -135,7 +135,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, partnerNamespaceName. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @return the next definition stage. */ @@ -432,7 +432,9 @@ interface WithExpirationTimeIfNotActivatedUtc { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel along with {@link Response}. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel along with {@link Response}. */ Response getFullUrlWithResponse(Context context); @@ -443,7 +445,9 @@ interface WithExpirationTimeIfNotActivatedUtc { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel. */ EventSubscriptionFullUrl getFullUrl(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java index d26c465ef4498..dd02a3fc57a00 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,43 +12,43 @@ */ public final class ChannelProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for ChannelProvisioningState. + * Creating. */ public static final ChannelProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for ChannelProvisioningState. + * Updating. */ public static final ChannelProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for ChannelProvisioningState. + * Deleting. */ public static final ChannelProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for ChannelProvisioningState. + * Succeeded. */ public static final ChannelProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for ChannelProvisioningState. + * Canceled. */ public static final ChannelProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for ChannelProvisioningState. + * Failed. */ public static final ChannelProvisioningState FAILED = fromString("Failed"); /** - * Static value IdleDueToMirroredPartnerTopicDeletion for ChannelProvisioningState. + * IdleDueToMirroredPartnerTopicDeletion. */ public static final ChannelProvisioningState IDLE_DUE_TO_MIRRORED_PARTNER_TOPIC_DELETION = fromString("IdleDueToMirroredPartnerTopicDeletion"); /** - * Static value IdleDueToMirroredPartnerDestinationDeletion for ChannelProvisioningState. + * IdleDueToMirroredPartnerDestinationDeletion. */ public static final ChannelProvisioningState IDLE_DUE_TO_MIRRORED_PARTNER_DESTINATION_DELETION = fromString("IdleDueToMirroredPartnerDestinationDeletion"); 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 3388de345ddb9..ceea002bb57ed 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class ChannelType extends ExpandableStringEnum { /** - * Static value PartnerTopic for ChannelType. + * PartnerTopic. */ public static final ChannelType PARTNER_TOPIC = fromString("PartnerTopic"); /** - * Static value PartnerDestination for ChannelType. + * PartnerDestination. */ public static final ChannelType PARTNER_DESTINATION = fromString("PartnerDestination"); 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 bf423d3be6494..562d2773d2cb6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -115,17 +115,6 @@ public ChannelUpdateParameters withPartnerTopicInfo(PartnerUpdateTopicInfo partn return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java index 3e31153f98fa7..d46c5e77232dd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,14 +17,16 @@ public interface Channels { * * Get properties of a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel along with {@link Response}. + * @return a channel. + * + * Get properties of a channel along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, Context context); @@ -34,85 +36,87 @@ Response getWithResponse(String resourceGroupName, String partnerNamesp * * Get properties of a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel. + * @return a channel. + * + * Get properties of a channel. */ Channel get(String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Delete a channel. + * Update a Channel. * - * Delete an existing channel. + * Synchronously updates a channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. + * @param channelUpdateParameters Channel update information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String partnerNamespaceName, String channelName); + Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, + ChannelUpdateParameters channelUpdateParameters, Context context); /** - * Delete a channel. + * Update a Channel. * - * Delete an existing channel. + * Synchronously updates a channel with the specified parameters. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @param context The context to associate with this operation. + * @param channelUpdateParameters Channel update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context); + void update(String resourceGroupName, String partnerNamespaceName, String channelName, + ChannelUpdateParameters channelUpdateParameters); /** - * Update a Channel. + * Delete a channel. * - * Synchronously updates a channel with the specified parameters. + * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters, Context context); + void delete(String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Update a Channel. + * Delete a channel. * - * Synchronously updates a channel with the specified parameters. + * Delete an existing channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void update(String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters); + void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** * List channels. * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -126,7 +130,7 @@ void update(String resourceGroupName, String partnerNamespaceName, String channe * * List all the channels in a partner namespace. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -149,14 +153,16 @@ PagedIterable listByPartnerNamespace(String resourceGroupName, String p * * Get the full endpoint URL of a partner destination channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the Channel. + * @param channelName Name of the channel. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel along with {@link Response}. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel along with {@link Response}. */ Response getFullUrlWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, Context context); @@ -166,13 +172,15 @@ Response getFullUrlWithResponse(String resourceGroupNa * * Get the full endpoint URL of a partner destination channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the Channel. + * @param channelName Name of the channel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL of a partner destination channel. + * @return full URL of partner destination channel. + * + * Get the full endpoint URL of a partner destination channel. */ EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerNamespaceName, String channelName); @@ -185,7 +193,9 @@ Response getFullUrlWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel along with {@link Response}. + * @return a channel. + * + * Get properties of a channel along with {@link Response}. */ Channel getById(String id); @@ -199,7 +209,9 @@ Response getFullUrlWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a channel along with {@link Response}. + * @return a channel. + * + * Get properties of a channel along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 b97f92b8dd818..6f08c189530e7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -35,7 +35,7 @@ public interface Client { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -124,7 +124,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, namespaceName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @return the next definition stage. */ 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 e0861f80b2670..4725e6864689d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -104,20 +104,6 @@ public ClientAuthenticationSettings withWebhookAuthentication(WebhookAuthenticat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customJwtAuthentication() != null) { - customJwtAuthentication().validate(); - } - if (webhookAuthentication() != null) { - webhookAuthentication().validate(); - } - } - /** * {@inheritDoc} */ 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 80ecfa7b263c2..3a90bbdc7c953 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -78,14 +78,6 @@ public ClientCertificateAuthentication withAllowedThumbprints(List allow return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 b39cf9f8ba785..f062ea5ffa9e6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,37 +12,37 @@ */ public final class ClientCertificateValidationScheme extends ExpandableStringEnum { /** - * Static value SubjectMatchesAuthenticationName for ClientCertificateValidationScheme. + * SubjectMatchesAuthenticationName. */ public static final ClientCertificateValidationScheme SUBJECT_MATCHES_AUTHENTICATION_NAME = fromString("SubjectMatchesAuthenticationName"); /** - * Static value DnsMatchesAuthenticationName for ClientCertificateValidationScheme. + * DnsMatchesAuthenticationName. */ public static final ClientCertificateValidationScheme DNS_MATCHES_AUTHENTICATION_NAME = fromString("DnsMatchesAuthenticationName"); /** - * Static value UriMatchesAuthenticationName for ClientCertificateValidationScheme. + * UriMatchesAuthenticationName. */ public static final ClientCertificateValidationScheme URI_MATCHES_AUTHENTICATION_NAME = fromString("UriMatchesAuthenticationName"); /** - * Static value IpMatchesAuthenticationName for ClientCertificateValidationScheme. + * IpMatchesAuthenticationName. */ public static final ClientCertificateValidationScheme IP_MATCHES_AUTHENTICATION_NAME = fromString("IpMatchesAuthenticationName"); /** - * Static value EmailMatchesAuthenticationName for ClientCertificateValidationScheme. + * EmailMatchesAuthenticationName. */ public static final ClientCertificateValidationScheme EMAIL_MATCHES_AUTHENTICATION_NAME = fromString("EmailMatchesAuthenticationName"); /** - * Static value ThumbprintMatch for ClientCertificateValidationScheme. + * ThumbprintMatch. */ public static final ClientCertificateValidationScheme THUMBPRINT_MATCH = fromString("ThumbprintMatch"); 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 3b0cbe403b839..c970a818a7ea1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -34,7 +34,7 @@ public interface ClientGroup { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -100,7 +100,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, namespaceName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @return the next definition stage. */ 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 518a2b1795b20..311619d151d74 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,37 +12,37 @@ */ public final class ClientGroupProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for ClientGroupProvisioningState. + * Creating. */ public static final ClientGroupProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for ClientGroupProvisioningState. + * Updating. */ public static final ClientGroupProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for ClientGroupProvisioningState. + * Deleting. */ public static final ClientGroupProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for ClientGroupProvisioningState. + * Succeeded. */ public static final ClientGroupProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for ClientGroupProvisioningState. + * Canceled. */ public static final ClientGroupProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for ClientGroupProvisioningState. + * Failed. */ public static final ClientGroupProvisioningState FAILED = fromString("Failed"); /** - * Static value Deleted for ClientGroupProvisioningState. + * Deleted. */ public static final ClientGroupProvisioningState DELETED = fromString("Deleted"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroups.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroups.java index 8b9032994cb76..ae946edf06203 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroups.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroups.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,14 +17,16 @@ public interface ClientGroups { * * Get properties of a client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group along with {@link Response}. + * @return a client group. + * + * Get properties of a client group along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String namespaceName, String clientGroupName, Context context); @@ -34,13 +36,15 @@ Response getWithResponse(String resourceGroupName, String namespace * * Get properties of a client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group. + * @return a client group. + * + * Get properties of a client group. */ ClientGroup get(String resourceGroupName, String namespaceName, String clientGroupName); @@ -49,7 +53,7 @@ Response getWithResponse(String resourceGroupName, String namespace * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,7 +67,7 @@ Response getWithResponse(String resourceGroupName, String namespace * * Delete an existing client group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientGroupName Name of the client group. * @param context The context to associate with this operation. @@ -78,12 +82,12 @@ Response getWithResponse(String resourceGroupName, String namespace * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client Group operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -92,7 +96,7 @@ Response getWithResponse(String resourceGroupName, String namespace * * Get all the client groups under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -105,7 +109,7 @@ Response getWithResponse(String resourceGroupName, String namespace * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the client groups under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client Group operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context); @@ -119,7 +123,9 @@ PagedIterable listByNamespace(String resourceGroupName, String name * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group along with {@link Response}. + * @return a client group. + * + * Get properties of a client group along with {@link Response}. */ ClientGroup getById(String id); @@ -133,7 +139,9 @@ PagedIterable listByNamespace(String resourceGroupName, String name * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client group along with {@link Response}. + * @return a client group. + * + * Get properties of a client group along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 3189d2948e713..45ee55fbf0d8e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,37 +12,37 @@ */ public final class ClientProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for ClientProvisioningState. + * Creating. */ public static final ClientProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for ClientProvisioningState. + * Updating. */ public static final ClientProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for ClientProvisioningState. + * Deleting. */ public static final ClientProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for ClientProvisioningState. + * Succeeded. */ public static final ClientProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for ClientProvisioningState. + * Canceled. */ public static final ClientProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for ClientProvisioningState. + * Failed. */ public static final ClientProvisioningState FAILED = fromString("Failed"); /** - * Static value Deleted for ClientProvisioningState. + * Deleted. */ public static final ClientProvisioningState DELETED = fromString("Deleted"); 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 27d5c4b93d472..4d76710c19495 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class ClientState extends ExpandableStringEnum { /** - * Static value Enabled for ClientState. + * Enabled. */ public static final ClientState ENABLED = fromString("Enabled"); /** - * Static value Disabled for ClientState. + * Disabled. */ public static final ClientState DISABLED = fromString("Disabled"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Clients.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Clients.java index 17101f035aab3..eb0d76128dbdb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Clients.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Clients.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,14 +17,16 @@ public interface Clients { * * Get properties of a client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client along with {@link Response}. + * @return a client. + * + * Get properties of a client along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String namespaceName, String clientName, Context context); @@ -34,13 +36,15 @@ Response getWithResponse(String resourceGroupName, String namespaceName, * * Get properties of a client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client. + * @return a client. + * + * Get properties of a client. */ Client get(String resourceGroupName, String namespaceName, String clientName); @@ -49,7 +53,7 @@ Response getWithResponse(String resourceGroupName, String namespaceName, * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,7 +67,7 @@ Response getWithResponse(String resourceGroupName, String namespaceName, * * Delete an existing client. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param clientName Name of the client. * @param context The context to associate with this operation. @@ -78,12 +82,12 @@ Response getWithResponse(String resourceGroupName, String namespaceName, * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -92,7 +96,7 @@ Response getWithResponse(String resourceGroupName, String namespaceName, * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -105,7 +109,7 @@ Response getWithResponse(String resourceGroupName, String namespaceName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Client operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context); @@ -119,7 +123,9 @@ PagedIterable listByNamespace(String resourceGroupName, String namespace * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client along with {@link Response}. + * @return a client. + * + * Get properties of a client along with {@link Response}. */ Client getById(String id); @@ -133,7 +139,9 @@ PagedIterable listByNamespace(String resourceGroupName, String namespace * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a client along with {@link Response}. + * @return a client. + * + * Get properties of a client along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialCompute.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialCompute.java new file mode 100644 index 0000000000000..6d99f1244fa2f --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialCompute.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Azure Confidential Compute properties of the resource. + */ +@Fluent +public final class ConfidentialCompute implements JsonSerializable { + /* + * This property specifies the mode of the Azure Confidential Compute configuration. + * Possible values are 'Disabled' or 'Enabled'. + * This is an immutable property set at the time of resource creation and cannot be modified later. + * Enabling this property ensures that messages are processed and stored in a Azure Confidential Compute + * environment. + */ + private ConfidentialComputeMode mode; + + /** + * Creates an instance of ConfidentialCompute class. + */ + public ConfidentialCompute() { + } + + /** + * Get the mode property: This property specifies the mode of the Azure Confidential Compute configuration. + * Possible values are 'Disabled' or 'Enabled'. + * This is an immutable property set at the time of resource creation and cannot be modified later. + * Enabling this property ensures that messages are processed and stored in a Azure Confidential Compute + * environment. + * + * @return the mode value. + */ + public ConfidentialComputeMode mode() { + return this.mode; + } + + /** + * Set the mode property: This property specifies the mode of the Azure Confidential Compute configuration. + * Possible values are 'Disabled' or 'Enabled'. + * This is an immutable property set at the time of resource creation and cannot be modified later. + * Enabling this property ensures that messages are processed and stored in a Azure Confidential Compute + * environment. + * + * @param mode the mode value to set. + * @return the ConfidentialCompute object itself. + */ + public ConfidentialCompute withMode(ConfidentialComputeMode mode) { + this.mode = mode; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConfidentialCompute from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConfidentialCompute 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 ConfidentialCompute. + */ + public static ConfidentialCompute fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConfidentialCompute deserializedConfidentialCompute = new ConfidentialCompute(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedConfidentialCompute.mode = ConfidentialComputeMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedConfidentialCompute; + }); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialComputeMode.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialComputeMode.java new file mode 100644 index 0000000000000..c6fac0e12ad9e --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialComputeMode.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * This property specifies the mode of the Azure Confidential Compute configuration. + * Possible values are 'Disabled' or 'Enabled'. + * This is an immutable property set at the time of resource creation and cannot be modified later. + * Enabling this property ensures that messages are processed and stored in a Azure Confidential Compute environment. + */ +public final class ConfidentialComputeMode extends ExpandableStringEnum { + /** + * Disabled. + */ + public static final ConfidentialComputeMode DISABLED = fromString("Disabled"); + + /** + * Enabled. + */ + public static final ConfidentialComputeMode ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of ConfidentialComputeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfidentialComputeMode() { + } + + /** + * Creates or finds a ConfidentialComputeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConfidentialComputeMode. + */ + public static ConfidentialComputeMode fromString(String name) { + return fromString(name, ConfidentialComputeMode.class); + } + + /** + * Gets known ConfidentialComputeMode values. + * + * @return known ConfidentialComputeMode values. + */ + public static Collection values() { + return values(ConfidentialComputeMode.class); + } +} 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 43db07aa06337..2c8ef2c145363 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -97,14 +97,6 @@ public ConnectionState withActionsRequired(String actionsRequired) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 e9bec9c47fa2e..fb6e78e5fde8e 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -208,24 +207,6 @@ public CustomDomainConfiguration withExpectedTxtRecordValue(String expectedTxtRe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fullyQualifiedDomainName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fullyQualifiedDomainName in model CustomDomainConfiguration")); - } - if (identity() != null) { - identity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomDomainConfiguration.class); - /** * {@inheritDoc} */ 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 12139cfc75291..d7c35e50e9712 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,14 +72,6 @@ public CustomDomainIdentity withUserAssignedIdentity(String userAssignedIdentity return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 351a8b1da1293..63fafb0940260 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class CustomDomainIdentityType extends ExpandableStringEnum { /** - * Static value SystemAssigned for CustomDomainIdentityType. + * SystemAssigned. */ public static final CustomDomainIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for CustomDomainIdentityType. + * UserAssigned. */ public static final CustomDomainIdentityType USER_ASSIGNED = fromString("UserAssigned"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainOwnershipValidationResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainOwnershipValidationResult.java index 621f0fd6d30ee..a2d6efa29b818 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainOwnershipValidationResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainOwnershipValidationResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 600e4ea5cf5e4..6ea8093b0471b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,17 +13,17 @@ */ public final class CustomDomainValidationState extends ExpandableStringEnum { /** - * Static value Pending for CustomDomainValidationState. + * Pending. */ public static final CustomDomainValidationState PENDING = fromString("Pending"); /** - * Static value Approved for CustomDomainValidationState. + * Approved. */ public static final CustomDomainValidationState APPROVED = fromString("Approved"); /** - * Static value ErrorRetrievingDnsRecord for CustomDomainValidationState. + * ErrorRetrievingDnsRecord. */ public static final CustomDomainValidationState ERROR_RETRIEVING_DNS_RECORD = fromString("ErrorRetrievingDnsRecord"); 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 581b680b897f5..a223a7e54b5e2 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -74,21 +73,6 @@ public CustomJwtAuthenticationManagedIdentity withUserAssignedIdentity(String us return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property type in model CustomJwtAuthenticationManagedIdentity")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomJwtAuthenticationManagedIdentity.class); - /** * {@inheritDoc} */ 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 5e26e33f9cb53..adb4312b1e518 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,12 +13,12 @@ public final class CustomJwtAuthenticationManagedIdentityType extends ExpandableStringEnum { /** - * Static value SystemAssigned for CustomJwtAuthenticationManagedIdentityType. + * SystemAssigned. */ public static final CustomJwtAuthenticationManagedIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for CustomJwtAuthenticationManagedIdentityType. + * UserAssigned. */ public static final CustomJwtAuthenticationManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); 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 4b83a576db1d6..a43b61c43dbe3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -104,20 +104,6 @@ public List encodedIssuerCertificates() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (issuerCertificates() != null) { - issuerCertificates().forEach(e -> e.validate()); - } - if (encodedIssuerCertificates() != null) { - encodedIssuerCertificates().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentity.java index 1793050f01e3f..db8b95d39de12 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentity.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -74,21 +73,6 @@ public CustomWebhookAuthenticationManagedIdentity withUserAssignedIdentity(Strin return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property type in model CustomWebhookAuthenticationManagedIdentity")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomWebhookAuthenticationManagedIdentity.class); - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentityType.java index ddb93ae1f491d..43f682c39f61e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentityType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,12 +13,12 @@ public final class CustomWebhookAuthenticationManagedIdentityType extends ExpandableStringEnum { /** - * Static value SystemAssigned for CustomWebhookAuthenticationManagedIdentityType. + * SystemAssigned. */ public static final CustomWebhookAuthenticationManagedIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for CustomWebhookAuthenticationManagedIdentityType. + * UserAssigned. */ public static final CustomWebhookAuthenticationManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomerManagedKeyEncryption.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomerManagedKeyEncryption.java new file mode 100644 index 0000000000000..ab96a198935ea --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CustomerManagedKeyEncryption.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * All Customer-managed key encryption properties for the resource. + */ +@Fluent +public final class CustomerManagedKeyEncryption implements JsonSerializable { + /* + * Key encryption key URL. This URL can be either versioned (e.g., + * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78), or unversioned (e.g., + * https://contosovault.vault.azure.net/keys/contosokek. When versioned URL is used, this version of the key will be + * used by Event Grid Runtime even if it is rotated. It is user + * responsibility to update the URL with the new version by updating the namespace resource. When URL without + * version is used, Event Grid will query and get latest version and will + * be used automatically. + */ + private String keyEncryptionKeyUrl; + + /* + * All identity configuration for Customer-managed key settings defining which identity should be used to auth to + * Key Vault. This is an optional property. + * When not specified, the SystemAssigned identity will be used. + */ + private KeyEncryptionKeyIdentity keyEncryptionKeyIdentity; + + /* + * The state of the Customer Managed Key (CMK) encryption. This is a read-only property which determines if the + * associated key is active and valid and used + * actively by runtime as expected. When the associated CMK becomes invalid (e.g., if it is deleted, or if versioned + * CMK is not current anymore), Event Grid + * Service will set this state to disabled to indicate that this key is not valid anymore and requires action from + * user. + */ + private KeyEncryptionKeyStatus keyEncryptionKeyStatus; + + /* + * Friendly description about the Customer Managed Key (CMK) encryption state. This is a read-only property which + * determines why the associated key is revoked which + * will help user to mitigate the issue and re-enable the CMK key. + */ + private String keyEncryptionKeyStatusFriendlyDescription; + + /** + * Creates an instance of CustomerManagedKeyEncryption class. + */ + public CustomerManagedKeyEncryption() { + } + + /** + * Get the keyEncryptionKeyUrl property: Key encryption key URL. This URL can be either versioned (e.g., + * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78), or unversioned (e.g., + * https://contosovault.vault.azure.net/keys/contosokek. When versioned URL is used, this version of the key will be + * used by Event Grid Runtime even if it is rotated. It is user + * responsibility to update the URL with the new version by updating the namespace resource. When URL without + * version is used, Event Grid will query and get latest version and will + * be used automatically. + * + * @return the keyEncryptionKeyUrl value. + */ + public String keyEncryptionKeyUrl() { + return this.keyEncryptionKeyUrl; + } + + /** + * Set the keyEncryptionKeyUrl property: Key encryption key URL. This URL can be either versioned (e.g., + * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78), or unversioned (e.g., + * https://contosovault.vault.azure.net/keys/contosokek. When versioned URL is used, this version of the key will be + * used by Event Grid Runtime even if it is rotated. It is user + * responsibility to update the URL with the new version by updating the namespace resource. When URL without + * version is used, Event Grid will query and get latest version and will + * be used automatically. + * + * @param keyEncryptionKeyUrl the keyEncryptionKeyUrl value to set. + * @return the CustomerManagedKeyEncryption object itself. + */ + public CustomerManagedKeyEncryption withKeyEncryptionKeyUrl(String keyEncryptionKeyUrl) { + this.keyEncryptionKeyUrl = keyEncryptionKeyUrl; + return this; + } + + /** + * Get the keyEncryptionKeyIdentity property: All identity configuration for Customer-managed key settings defining + * which identity should be used to auth to Key Vault. This is an optional property. + * When not specified, the SystemAssigned identity will be used. + * + * @return the keyEncryptionKeyIdentity value. + */ + public KeyEncryptionKeyIdentity keyEncryptionKeyIdentity() { + return this.keyEncryptionKeyIdentity; + } + + /** + * Set the keyEncryptionKeyIdentity property: All identity configuration for Customer-managed key settings defining + * which identity should be used to auth to Key Vault. This is an optional property. + * When not specified, the SystemAssigned identity will be used. + * + * @param keyEncryptionKeyIdentity the keyEncryptionKeyIdentity value to set. + * @return the CustomerManagedKeyEncryption object itself. + */ + public CustomerManagedKeyEncryption + withKeyEncryptionKeyIdentity(KeyEncryptionKeyIdentity keyEncryptionKeyIdentity) { + this.keyEncryptionKeyIdentity = keyEncryptionKeyIdentity; + return this; + } + + /** + * Get the keyEncryptionKeyStatus property: The state of the Customer Managed Key (CMK) encryption. This is a + * read-only property which determines if the associated key is active and valid and used + * actively by runtime as expected. When the associated CMK becomes invalid (e.g., if it is deleted, or if versioned + * CMK is not current anymore), Event Grid + * Service will set this state to disabled to indicate that this key is not valid anymore and requires action from + * user. + * + * @return the keyEncryptionKeyStatus value. + */ + public KeyEncryptionKeyStatus keyEncryptionKeyStatus() { + return this.keyEncryptionKeyStatus; + } + + /** + * Get the keyEncryptionKeyStatusFriendlyDescription property: Friendly description about the Customer Managed Key + * (CMK) encryption state. This is a read-only property which determines why the associated key is revoked which + * will help user to mitigate the issue and re-enable the CMK key. + * + * @return the keyEncryptionKeyStatusFriendlyDescription value. + */ + public String keyEncryptionKeyStatusFriendlyDescription() { + return this.keyEncryptionKeyStatusFriendlyDescription; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyEncryptionKeyUrl", this.keyEncryptionKeyUrl); + jsonWriter.writeJsonField("keyEncryptionKeyIdentity", this.keyEncryptionKeyIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomerManagedKeyEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomerManagedKeyEncryption 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 CustomerManagedKeyEncryption. + */ + public static CustomerManagedKeyEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomerManagedKeyEncryption deserializedCustomerManagedKeyEncryption = new CustomerManagedKeyEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyEncryptionKeyUrl".equals(fieldName)) { + deserializedCustomerManagedKeyEncryption.keyEncryptionKeyUrl = reader.getString(); + } else if ("keyEncryptionKeyIdentity".equals(fieldName)) { + deserializedCustomerManagedKeyEncryption.keyEncryptionKeyIdentity + = KeyEncryptionKeyIdentity.fromJson(reader); + } else if ("keyEncryptionKeyStatus".equals(fieldName)) { + deserializedCustomerManagedKeyEncryption.keyEncryptionKeyStatus + = KeyEncryptionKeyStatus.fromString(reader.getString()); + } else if ("keyEncryptionKeyStatusFriendlyDescription".equals(fieldName)) { + deserializedCustomerManagedKeyEncryption.keyEncryptionKeyStatusFriendlyDescription + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCustomerManagedKeyEncryption; + }); + } +} 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 8c64d754a51bd..25485cb7d4100 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class DataResidencyBoundary extends ExpandableStringEnum { /** - * Static value WithinGeopair for DataResidencyBoundary. + * WithinGeopair. */ public static final DataResidencyBoundary WITHIN_GEOPAIR = fromString("WithinGeopair"); /** - * Static value WithinRegion for DataResidencyBoundary. + * WithinRegion. */ public static final DataResidencyBoundary WITHIN_REGION = fromString("WithinRegion"); 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 d778ee1c733ad..d3d0c22c12f30 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -38,14 +38,6 @@ public DeadLetterEndPointType endpointType() { return this.endpointType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 4c50a7afc1c81..c7a8b198367b7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class DeadLetterEndPointType extends ExpandableStringEnum { /** - * Static value StorageBlob for DeadLetterEndPointType. + * StorageBlob. */ public static final DeadLetterEndPointType STORAGE_BLOB = fromString("StorageBlob"); 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 bdb7b99b930d9..7bd569a6f1bef 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -80,20 +80,6 @@ public DeadLetterWithResourceIdentity withDeadLetterDestination(DeadLetterDestin return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (deadLetterDestination() != null) { - deadLetterDestination().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeListResult.java index 53a2c8c88ba7f..68a134f57810e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeListResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 2129ee1253365..12391f9da3c68 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -61,14 +61,6 @@ public DeliveryAttributeMapping withName(String name) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 1e5096453e301..423aaf5ba6207 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class DeliveryAttributeMappingType extends ExpandableStringEnum { /** - * Static value Static for DeliveryAttributeMappingType. + * Static. */ public static final DeliveryAttributeMappingType STATIC = fromString("Static"); /** - * Static value Dynamic for DeliveryAttributeMappingType. + * Dynamic. */ public static final DeliveryAttributeMappingType DYNAMIC = fromString("Dynamic"); 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 28e3d2ef6ef28..955b6a600f2e0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -103,20 +103,6 @@ public DeliveryConfiguration withPush(PushInfo push) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queue() != null) { - queue().validate(); - } - if (push() != null) { - push().validate(); - } - } - /** * {@inheritDoc} */ 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 2070b74f09b06..0dcd4284a6056 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class DeliveryMode extends ExpandableStringEnum { /** - * Static value Queue for DeliveryMode. + * Queue. */ public static final DeliveryMode QUEUE = fromString("Queue"); /** - * Static value Push for DeliveryMode. + * Push. */ public static final DeliveryMode PUSH = fromString("Push"); 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 47cf9dec1bca5..76b826d355877 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class DeliverySchema extends ExpandableStringEnum { /** - * Static value CloudEventSchemaV1_0 for DeliverySchema. + * CloudEventSchemaV1_0. */ public static final DeliverySchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); 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 d5f6f811acbf2..3d85e66f0a2a7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -80,20 +80,6 @@ public DeliveryWithResourceIdentity withDestination(EventSubscriptionDestination return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (destination() != null) { - destination().validate(); - } - } - /** * {@inheritDoc} */ 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 602cbab16d8f1..4530f00ccd319 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -66,7 +66,7 @@ public interface Domain { IdentityInfo identity(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -278,7 +278,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java index 5c5b055ad5977..befac694bf48b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,52 +13,21 @@ * Resource collection API of DomainEventSubscriptions. */ public interface DomainEventSubscriptions { - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain along with {@link Response}. - */ - Response getDeliveryAttributesWithResponse(String resourceGroupName, String domainName, - String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain. - */ - DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, - String eventSubscriptionName); - /** * Get an event subscription of a domain. * * Get properties of an event subscription of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a domain along with {@link Response}. + * @return an event subscription of a domain. + * + * Get properties of an event subscription of a domain along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, Context context); @@ -68,13 +37,15 @@ Response getWithResponse(String resourceGroupName, String dom * * Get properties of an event subscription of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a domain. + * @return an event subscription of a domain. + * + * Get properties of an event subscription of a domain. */ EventSubscription get(String resourceGroupName, String domainName, String eventSubscriptionName); @@ -83,10 +54,9 @@ Response getWithResponse(String resourceGroupName, String dom * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,10 +71,9 @@ EventSubscription createOrUpdate(String resourceGroupName, String domainName, St * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,43 +84,14 @@ EventSubscription createOrUpdate(String resourceGroupName, String domainName, St EventSubscription createOrUpdate(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String domainName, String eventSubscriptionName); - - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context); - /** * Update an event subscription for a domain. * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -166,9 +106,9 @@ EventSubscription update(String resourceGroupName, String domainName, String eve * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,43 +120,40 @@ EventSubscription update(String resourceGroupName, String domainName, String eve EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription for domain. + * Delete an event subscription for a domain. * - * Get the full endpoint URL for an event subscription for domain. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for domain along with {@link Response}. */ - Response getFullUrlWithResponse(String resourceGroupName, String domainName, - String eventSubscriptionName, Context context); + void delete(String resourceGroupName, String domainName, String eventSubscriptionName); /** - * Get full URL of an event subscription for domain. + * Delete an event subscription for a domain. * - * Get the full endpoint URL for an event subscription for domain. + * Delete an existing event subscription for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for domain. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName); + void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** * List all event subscriptions for a specific domain. * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -230,7 +167,7 @@ Response getFullUrlWithResponse(String resourceGroupNa * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -247,4 +184,77 @@ Response getFullUrlWithResponse(String resourceGroupNa */ PagedIterable list(String resourceGroupName, String domainName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain along with {@link Response}. + */ + Response getDeliveryAttributesWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for domain. + * + * Get all delivery attributes for an event subscription for domain. + */ + DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, + String eventSubscriptionName); + + /** + * Get full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain along with {@link Response}. + */ + Response getFullUrlWithResponse(String resourceGroupName, String domainName, + String eventSubscriptionName, Context context); + + /** + * Get full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for domain. + * + * Get the full endpoint URL for an event subscription for domain. + */ + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName); } 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 7f52130ec5d08..67391c17b975b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,32 +12,32 @@ */ public final class DomainProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for DomainProvisioningState. + * Creating. */ public static final DomainProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for DomainProvisioningState. + * Updating. */ public static final DomainProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for DomainProvisioningState. + * Deleting. */ public static final DomainProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for DomainProvisioningState. + * Succeeded. */ public static final DomainProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for DomainProvisioningState. + * Canceled. */ public static final DomainProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for DomainProvisioningState. + * Failed. */ public static final DomainProvisioningState FAILED = fromString("Failed"); 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 5faf511278b24..87f1ae6fa8ae3 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -48,21 +47,6 @@ public DomainRegenerateKeyRequest withKeyName(String keyName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyName in model DomainRegenerateKeyRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DomainRegenerateKeyRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainSharedAccessKeys.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainSharedAccessKeys.java index 50fc515231743..748127f09031b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainSharedAccessKeys.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainSharedAccessKeys.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 50e7ebc646bec..2efce3701dc3c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -33,7 +33,7 @@ public interface DomainTopic { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java index 0ed5b039060fb..4e5217387a04a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -14,122 +14,127 @@ */ public interface DomainTopicEventSubscriptions { /** - * Get delivery attributes for an event subscription for domain topic. + * Get a nested event subscription for domain topic. * - * Get all delivery attributes for an event subscription for domain topic. + * Get properties of a nested event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. + * @return a nested event subscription for domain topic. + * + * Get properties of a nested event subscription for a domain topic along with {@link Response}. */ - Response getDeliveryAttributesWithResponse(String resourceGroupName, String domainName, - String topicName, String eventSubscriptionName, Context context); + Response getWithResponse(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, Context context); /** - * Get delivery attributes for an event subscription for domain topic. + * Get a nested event subscription for domain topic. * - * Get all delivery attributes for an event subscription for domain topic. + * Get properties of a nested event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for domain topic. + * @return a nested event subscription for domain topic. + * + * Get properties of a nested event subscription for a domain topic. */ - DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName); + EventSubscription get(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Get a nested event subscription for domain topic. + * Create or update a nested event subscription to a domain topic. * - * Get properties of a nested event subscription for a domain topic. + * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a nested event subscription for a domain topic along with {@link Response}. + * @return event Subscription. */ - Response getWithResponse(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, Context context); + EventSubscription createOrUpdate(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo); /** - * Get a nested event subscription for domain topic. + * Create or update a nested event subscription to a domain topic. * - * Get properties of a nested event subscription for a domain topic. + * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a nested event subscription for a domain topic. + * @return event Subscription. */ - EventSubscription get(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); + EventSubscription createOrUpdate(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); /** - * Create or update a nested event subscription to a domain topic. + * Update a nested event subscription for a domain topic. * - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return event Subscription. */ - EventSubscription createOrUpdate(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo); + EventSubscription update(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Create or update a nested event subscription to a domain topic. + * Update a nested event subscription for a domain topic. * - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Update an existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return event Subscription. */ - EventSubscription createOrUpdate(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); + EventSubscription update(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); /** * Delete a nested event subscription for a domain topic. * * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -141,10 +146,10 @@ EventSubscription createOrUpdate(String resourceGroupName, String domainName, St * * Delete a nested existing event subscription for a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -154,114 +159,119 @@ void delete(String resourceGroupName, String domainName, String topicName, Strin Context context); /** - * Update a nested event subscription for a domain topic. + * List all nested event subscriptions for a specific domain topic. * - * Update an existing event subscription for a domain topic. + * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - EventSubscription update(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); + PagedIterable list(String resourceGroupName, String domainName, String topicName); /** - * Update a nested event subscription for a domain topic. + * List all nested event subscriptions for a specific domain topic. * - * Update an existing event subscription for a domain topic. + * List all event subscriptions that have been created for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - EventSubscription update(String resourceGroupName, String domainName, String topicName, - String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - Context context); + PagedIterable list(String resourceGroupName, String domainName, String topicName, String filter, + Integer top, Context context); /** - * Get full URL of a nested event subscription for domain topic. + * Get delivery attributes for an event subscription for domain topic. * - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get all delivery attributes for an event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. + * @return delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic along with {@link Response}. */ - Response getFullUrlWithResponse(String resourceGroupName, String domainName, + Response getDeliveryAttributesWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Get full URL of a nested event subscription for domain topic. + * Get delivery attributes for an event subscription for domain topic. * - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get all delivery attributes for an event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for a nested event subscription for domain topic. + * @return delivery attributes for an event subscription for domain topic. + * + * Get all delivery attributes for an event subscription for domain topic. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String topicName, + DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * List all nested event subscriptions for a specific domain topic. + * Get full URL of a nested event subscription for domain topic. * - * List all event subscriptions that have been created for a specific domain topic. + * Get the full endpoint URL for a nested event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String domainName, String topicName); + Response getFullUrlWithResponse(String resourceGroupName, String domainName, + String topicName, String eventSubscriptionName, Context context); /** - * List all nested event subscriptions for a specific domain topic. + * Get full URL of a nested event subscription for domain topic. * - * List all event subscriptions that have been created for a specific domain topic. + * Get the full endpoint URL for a nested event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return full URL of a nested event subscription for domain topic. + * + * Get the full endpoint URL for a nested event subscription for domain topic. */ - PagedIterable list(String resourceGroupName, String domainName, String topicName, String filter, - Integer top, Context context); + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String topicName, + String eventSubscriptionName); } 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 e4e9bf426319f..ab0e59d8de5ea 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,32 +12,32 @@ */ public final class DomainTopicProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for DomainTopicProvisioningState. + * Creating. */ public static final DomainTopicProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for DomainTopicProvisioningState. + * Updating. */ public static final DomainTopicProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for DomainTopicProvisioningState. + * Deleting. */ public static final DomainTopicProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for DomainTopicProvisioningState. + * Succeeded. */ public static final DomainTopicProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for DomainTopicProvisioningState. + * Canceled. */ public static final DomainTopicProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for DomainTopicProvisioningState. + * Failed. */ public static final DomainTopicProvisioningState FAILED = fromString("Failed"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopics.java index 443b7c8b8b9a5..419b13768f6e4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,14 +17,16 @@ public interface DomainTopics { * * Get properties of a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain topic along with {@link Response}. + * @return a domain topic. + * + * Get properties of a domain topic along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String domainName, String domainTopicName, Context context); @@ -34,13 +36,15 @@ Response getWithResponse(String resourceGroupName, String domainNam * * Get properties of a domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain topic. + * @return a domain topic. + * + * Get properties of a domain topic. */ DomainTopic get(String resourceGroupName, String domainName, String domainTopicName); @@ -49,9 +53,9 @@ Response getWithResponse(String resourceGroupName, String domainNam * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -64,9 +68,9 @@ Response getWithResponse(String resourceGroupName, String domainNam * * Asynchronously creates or updates a new domain topic with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -80,9 +84,9 @@ Response getWithResponse(String resourceGroupName, String domainNam * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -94,9 +98,9 @@ Response getWithResponse(String resourceGroupName, String domainNam * * Delete existing domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. - * @param domainTopicName Name of the domain topic. + * @param domainTopicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -109,8 +113,8 @@ Response getWithResponse(String resourceGroupName, String domainNam * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -123,8 +127,8 @@ Response getWithResponse(String resourceGroupName, String domainNam * * List all the topics in a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the domain. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic 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 52155f4a3ff41..79076cb2c5508 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -363,23 +363,6 @@ public DomainUpdateParameters withEventTypeInfo(EventTypeInfo eventTypeInfo) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java index 6224830cdadb4..89d08c36e8cd4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,13 +17,15 @@ public interface Domains { * * Get properties of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain along with {@link Response}. + * @return a domain. + * + * Get properties of a domain along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context); @@ -32,12 +34,14 @@ public interface Domains { * * Get properties of a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain. + * @return a domain. + * + * Get properties of a domain. */ Domain getByResourceGroup(String resourceGroupName, String domainName); @@ -46,7 +50,7 @@ public interface Domains { * * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,7 +63,7 @@ public interface Domains { * * Delete existing domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,21 +73,24 @@ public interface Domains { void delete(String resourceGroupName, String domainName, Context context); /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List domains under an Azure subscription. + * List domains under a resource group. * - * List all the domains under an Azure subscription. + * List all the domains under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -97,27 +104,24 @@ public interface Domains { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List domains under a resource group. + * List domains under an Azure subscription. * - * List all the domains under a resource group. + * List all the domains under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -131,14 +135,14 @@ public interface Domains { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Domains operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); + PagedIterable list(String filter, Integer top, Context context); /** * List keys for a domain. * * List the two keys used to publish to a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -154,7 +158,7 @@ Response listSharedAccessKeysWithResponse(String resourc * * List the two keys used to publish to a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -168,7 +172,7 @@ Response listSharedAccessKeysWithResponse(String resourc * * Regenerate a shared access key for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -185,7 +189,7 @@ Response regenerateKeyWithResponse(String resourceGroupN * * Regenerate a shared access key for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -205,7 +209,9 @@ DomainSharedAccessKeys regenerateKey(String resourceGroupName, String domainName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain along with {@link Response}. + * @return a domain. + * + * Get properties of a domain along with {@link Response}. */ Domain getById(String id); @@ -219,7 +225,9 @@ DomainSharedAccessKeys regenerateKey(String resourceGroupName, String domainName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a domain along with {@link Response}. + * @return a domain. + * + * Get properties of a domain along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 797161b44b9fc..60f3f5e2b7780 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -83,18 +83,6 @@ public DynamicDeliveryAttributeMapping withSourceField(String sourceField) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 55ce0678f4ea9..bf4755b045e7b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,14 +72,6 @@ public DynamicRoutingEnrichment withValue(String value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index b3cc57621aecc..1934450d4b793 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -73,26 +72,6 @@ public EncodedIssuerCertificateInfo withEncodedCertificate(String encodedCertifi 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} */ 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 8bcfdbb9a90a8..90a5bfd6bcb43 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,52 +12,52 @@ */ public final class EndpointType extends ExpandableStringEnum { /** - * Static value WebHook for EndpointType. + * WebHook. */ public static final EndpointType WEB_HOOK = fromString("WebHook"); /** - * Static value EventHub for EndpointType. + * EventHub. */ public static final EndpointType EVENT_HUB = fromString("EventHub"); /** - * Static value StorageQueue for EndpointType. + * StorageQueue. */ public static final EndpointType STORAGE_QUEUE = fromString("StorageQueue"); /** - * Static value HybridConnection for EndpointType. + * HybridConnection. */ public static final EndpointType HYBRID_CONNECTION = fromString("HybridConnection"); /** - * Static value ServiceBusQueue for EndpointType. + * ServiceBusQueue. */ public static final EndpointType SERVICE_BUS_QUEUE = fromString("ServiceBusQueue"); /** - * Static value ServiceBusTopic for EndpointType. + * ServiceBusTopic. */ public static final EndpointType SERVICE_BUS_TOPIC = fromString("ServiceBusTopic"); /** - * Static value AzureFunction for EndpointType. + * AzureFunction. */ public static final EndpointType AZURE_FUNCTION = fromString("AzureFunction"); /** - * Static value PartnerDestination for EndpointType. + * PartnerDestination. */ public static final EndpointType PARTNER_DESTINATION = fromString("PartnerDestination"); /** - * Static value MonitorAlert for EndpointType. + * MonitorAlert. */ public static final EndpointType MONITOR_ALERT = fromString("MonitorAlert"); /** - * Static value NamespaceTopic for EndpointType. + * NamespaceTopic. */ public static final EndpointType NAMESPACE_TOPIC = fromString("NamespaceTopic"); 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 6f46ed61d1573..0f7d2dadec09a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class EventDefinitionKind extends ExpandableStringEnum { /** - * Static value Inline for EventDefinitionKind. + * Inline. */ public static final EventDefinitionKind INLINE = fromString("Inline"); 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 282923da71bab..ce3c7e435695c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,17 +12,17 @@ */ public final class EventDeliverySchema extends ExpandableStringEnum { /** - * Static value EventGridSchema for EventDeliverySchema. + * EventGridSchema. */ public static final EventDeliverySchema EVENT_GRID_SCHEMA = fromString("EventGridSchema"); /** - * Static value CustomInputSchema for EventDeliverySchema. + * CustomInputSchema. */ public static final EventDeliverySchema CUSTOM_INPUT_SCHEMA = fromString("CustomInputSchema"); /** - * Static value CloudEventSchemaV1_0 for EventDeliverySchema. + * CloudEventSchemaV1_0. */ public static final EventDeliverySchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); 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 eed38f4444573..405b7138dd7d6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -101,18 +101,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 dae327690ac55..bc77fe3a1c9ad 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class EventInputSchema extends ExpandableStringEnum { /** - * Static value CloudEventSchemaV1_0 for EventInputSchema. + * CloudEventSchemaV1_0. */ public static final EventInputSchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); 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 3424a24c90100..80876001ebf08 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -37,7 +37,7 @@ public interface EventSubscription { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -163,15 +163,7 @@ interface WithScope { /** * Specifies scope. * - * @param scope The identifier of the resource to which the event subscription needs to be created or - * updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' - * for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource - * group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param scope undefined. * @return the next definition stage. */ WithCreate withExistingScope(String scope); @@ -552,7 +544,9 @@ interface WithDeadLetterWithResourceIdentity { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response}. */ Response getDeliveryAttributesWithResponse(Context context); @@ -563,7 +557,9 @@ interface WithDeadLetterWithResourceIdentity { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. */ DeliveryAttributeListResult getDeliveryAttributes(); @@ -576,7 +572,9 @@ interface WithDeadLetterWithResourceIdentity { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription along with {@link Response}. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription along with {@link Response}. */ Response getFullUrlWithResponse(Context context); @@ -587,7 +585,9 @@ interface WithDeadLetterWithResourceIdentity { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription. */ EventSubscriptionFullUrl getFullUrl(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java index e97db3a5fea12..0c76c0a7bdb5b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -36,14 +36,6 @@ public EndpointType endpointType() { return this.endpointType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 6a4ad2592b055..6e1d42fd1da32 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -196,17 +196,6 @@ public EventSubscriptionFilter withAdvancedFilters(List advanced return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (advancedFilters() != null) { - advancedFilters().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFullUrl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFullUrl.java index c83f9a95f2824..448da2afd7d53 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFullUrl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFullUrl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 902ec04c677e2..eb9752cab5857 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -100,17 +100,6 @@ public 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} */ 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 b4eba3354b9bf..833e93b60e168 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class EventSubscriptionIdentityType extends ExpandableStringEnum { /** - * Static value SystemAssigned for EventSubscriptionIdentityType. + * SystemAssigned. */ public static final EventSubscriptionIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for EventSubscriptionIdentityType. + * UserAssigned. */ public static final EventSubscriptionIdentityType USER_ASSIGNED = fromString("UserAssigned"); 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 62783951a2e67..95dc98a511162 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,37 +12,37 @@ */ public final class EventSubscriptionProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for EventSubscriptionProvisioningState. + * Creating. */ public static final EventSubscriptionProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for EventSubscriptionProvisioningState. + * Updating. */ public static final EventSubscriptionProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for EventSubscriptionProvisioningState. + * Deleting. */ public static final EventSubscriptionProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for EventSubscriptionProvisioningState. + * Succeeded. */ public static final EventSubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for EventSubscriptionProvisioningState. + * Canceled. */ public static final EventSubscriptionProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for EventSubscriptionProvisioningState. + * Failed. */ public static final EventSubscriptionProvisioningState FAILED = fromString("Failed"); /** - * Static value AwaitingManualAction for EventSubscriptionProvisioningState. + * AwaitingManualAction. */ public static final EventSubscriptionProvisioningState AWAITING_MANUAL_ACTION = fromString("AwaitingManualAction"); 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 983fcad7f6d20..ba38c490a6b6a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -290,32 +290,6 @@ public DeadLetterWithResourceIdentity deadLetterWithResourceIdentity() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (destination() != null) { - destination().validate(); - } - if (deliveryWithResourceIdentity() != null) { - deliveryWithResourceIdentity().validate(); - } - if (filter() != null) { - filter().validate(); - } - if (retryPolicy() != null) { - retryPolicy().validate(); - } - if (deadLetterDestination() != null) { - deadLetterDestination().validate(); - } - if (deadLetterWithResourceIdentity() != null) { - deadLetterWithResourceIdentity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java index d3602eede2319..6681ab54c6146 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,68 +13,93 @@ */ public interface EventSubscriptions { /** - * Get delivery attributes for an event subscription. + * List all global event subscriptions under an Azure subscription and resource group. * - * Get all delivery attributes for an event subscription. + * List all global event subscriptions under a specific Azure subscription and resource group. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all global event subscriptions under an Azure subscription and resource group. + * + * List all global event subscriptions under a specific Azure subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - Response getDeliveryAttributesWithResponse(String scope, String eventSubscriptionName, + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); /** - * Get delivery attributes for an event subscription. + * List all event subscriptions for a specific domain topic. * - * Get all delivery attributes for an event subscription. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName); + + /** + * List all event subscriptions for a specific domain topic. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * List all event subscriptions that have been created for a specific domain topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. + * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName); + PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName, + String filter, Integer top, Context context); /** * Get an event subscription. * * Get properties of an event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param scope undefined. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription along with {@link Response}. + * @return an event subscription. + * + * Get properties of an event subscription along with {@link Response}. */ Response getWithResponse(String scope, String eventSubscriptionName, Context context); @@ -83,19 +108,14 @@ Response getDeliveryAttributesWithResponse(String s * * Get properties of an event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param scope undefined. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription. + * @return an event subscription. + * + * Get properties of an event subscription. */ EventSubscription get(String scope, String eventSubscriptionName); @@ -104,15 +124,8 @@ Response getDeliveryAttributesWithResponse(String s * * Delete an existing event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -124,15 +137,8 @@ Response getDeliveryAttributesWithResponse(String s * * Delete an existing event subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,65 +147,68 @@ Response getDeliveryAttributesWithResponse(String s void delete(String scope, String eventSubscriptionName, Context context); /** - * Get full URL of an event subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * Get the full endpoint URL for an event subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription along with {@link Response}. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with + * {@link PagedIterable}. */ - Response getFullUrlWithResponse(String scope, String eventSubscriptionName, - Context context); + PagedIterable list(); /** - * Get full URL of an event subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. * - * Get the full endpoint URL for an event subscription. + * List all aggregated global event subscriptions under a specific Azure subscription. * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function + * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic + * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne + * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription. + * @return an aggregated list of all global event subscriptions under an Azure subscription. + * + * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with + * {@link PagedIterable}. */ - EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptionName); + PagedIterable list(String filter, Integer top, Context context); /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all event subscriptions. * - * List all aggregated global event subscriptions under a specific Azure subscription. + * List all event subscriptions that have been created for a specific resource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResource(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName); /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. + * List all event subscriptions. * - * List all aggregated global event subscriptions under a specific Azure subscription. + * List all event subscriptions that have been created for a specific resource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace Namespace of the provider of the topic. + * @param resourceTypeName Name of the resource type. + * @param resourceName Name of the resource. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -213,62 +222,96 @@ Response getFullUrlWithResponse(String scope, String e * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResource(String resourceGroupName, String providerNamespace, + String resourceTypeName, String resourceName, String filter, Integer top, Context context); /** - * List all global event subscriptions for a topic type. + * Get delivery attributes for an event subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * Get all delivery attributes for an event subscription. * - * @param topicTypeName Name of the topic type. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response}. */ - PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName); + Response getDeliveryAttributesWithResponse(String scope, String eventSubscriptionName, + Context context); /** - * List all global event subscriptions for a topic type. + * Get delivery attributes for an event subscription. * - * List all global event subscriptions under an Azure subscription for a topic type. + * Get all delivery attributes for an event subscription. * - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + */ + DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName); + + /** + * Get full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription along with {@link Response}. */ - PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName, String filter, - Integer top, Context context); + Response getFullUrlWithResponse(String scope, String eventSubscriptionName, + Context context); /** - * List all global event subscriptions under an Azure subscription and resource group. + * Get full URL of an event subscription. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * Get the full endpoint URL for an event subscription. + * + * @param scope undefined. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription. + * + * Get the full endpoint URL for an event subscription. + */ + EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptionName); + + /** + * List all global event subscriptions for a topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * List all global event subscriptions under an Azure subscription for a topic type. + * + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName); /** - * List all global event subscriptions under an Azure subscription and resource group. + * List all global event subscriptions for a topic type. * - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription for a topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -282,15 +325,15 @@ PagedIterable listGlobalBySubscriptionForTopicType(String top * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName, String filter, + Integer top, Context context); /** * List all global event subscriptions under a resource group for a topic type. * * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -305,7 +348,7 @@ PagedIterable listGlobalByResourceGroupForTopicType(String re * * List all global event subscriptions under a resource group for a specific topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -328,7 +371,7 @@ PagedIterable listGlobalByResourceGroupForTopicType(String re * * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. + * @param location The location name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -341,7 +384,7 @@ PagedIterable listGlobalByResourceGroupForTopicType(String re * * List all event subscriptions from the given location under a specific Azure subscription. * - * @param location Name of the location. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -363,8 +406,8 @@ PagedIterable listRegionalBySubscription(String location, Str * * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -377,8 +420,8 @@ PagedIterable listRegionalBySubscription(String location, Str * * List all event subscriptions from the given location under a specific Azure subscription and resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -400,7 +443,7 @@ PagedIterable listRegionalByResourceGroup(String resourceGrou * * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param location Name of the location. + * @param location The location name. * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -414,7 +457,7 @@ PagedIterable listRegionalByResourceGroup(String resourceGrou * * List all event subscriptions from the given location under a specific Azure subscription and topic type. * - * @param location Name of the location. + * @param location The location name. * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -438,8 +481,8 @@ PagedIterable listRegionalBySubscriptionForTopicType(String l * List all event subscriptions from the given location under a specific Azure subscription and resource group and * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -455,8 +498,8 @@ PagedIterable listRegionalByResourceGroupForTopicType(String * List all event subscriptions from the given location under a specific Azure subscription and resource group and * topic type. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param location Name of the location. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location name. * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -474,87 +517,6 @@ PagedIterable listRegionalByResourceGroupForTopicType(String PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName, String location, String topicTypeName, String filter, Integer top, Context context); - /** - * List all event subscriptions. - * - * List all event subscriptions that have been created for a specific resource. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResource(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName); - - /** - * List all event subscriptions. - * - * List all event subscriptions that have been created for a specific resource. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResource(String resourceGroupName, String providerNamespace, - String resourceTypeName, String resourceName, String filter, Integer top, Context context); - - /** - * List all event subscriptions for a specific domain topic. - * - * List all event subscriptions that have been created for a specific domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName); - - /** - * List all event subscriptions for a specific domain topic. - * - * List all event subscriptions that have been created for a specific domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName, - String filter, Integer top, Context context); - /** * Get an event subscription. * @@ -564,7 +526,9 @@ PagedIterable listByDomainTopic(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription along with {@link Response}. + * @return an event subscription. + * + * Get properties of an event subscription along with {@link Response}. */ EventSubscription getById(String id); @@ -578,7 +542,9 @@ PagedIterable listByDomainTopic(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription along with {@link Response}. + * @return an event subscription. + * + * Get properties of an event subscription along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 436a512d0afa4..a3dc3eea1d003 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.EventTypeInner; /** @@ -31,6 +32,13 @@ public interface EventType { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the event type. * 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 6e23d0e95060b..3d8c09f07b94f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -85,21 +85,6 @@ public EventTypeInfo withInlineEventTypes(Map inl return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (inlineEventTypes() != null) { - inlineEventTypes().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - /** * {@inheritDoc} */ 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 2b261ce176b96..095e7c76cd5f7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,14 +72,6 @@ public ExtendedLocation withType(String type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 2fc22b1930bb4..c28aef30e7c10 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -33,7 +33,7 @@ public interface ExtensionTopic { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java index 0d00f1d96dcba..ac1c591e9ded2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -16,17 +16,14 @@ public interface ExtensionTopics { * * Get the properties of an extension topic. * - * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, - * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an extension topic along with {@link Response}. + * @return properties of an extension topic. + * + * Get the properties of an extension topic along with {@link Response}. */ Response getWithResponse(String scope, Context context); @@ -35,16 +32,13 @@ public interface ExtensionTopics { * * Get the properties of an extension topic. * - * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, - * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for Azure resource. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an extension topic. + * @return properties of an extension topic. + * + * Get the properties of an extension topic. */ ExtensionTopic get(String scope); } 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 index ea29358a139af..bc7d7235afed6 100644 --- 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 @@ -1,18 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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. @@ -22,7 +19,7 @@ public final class FederatedIdentityCredentialInfo implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedFederatedIdentityCredentialInfo.federatedClientId = reader.getString(); } else { reader.skipChildren(); } 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 fda341f5b0850..0a9875ef7b4a8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -65,14 +65,6 @@ public Filter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 2d820c122e293..93a055036a8e1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,97 +12,97 @@ */ public final class FilterOperatorType extends ExpandableStringEnum { /** - * Static value NumberIn for FilterOperatorType. + * NumberIn. */ public static final FilterOperatorType NUMBER_IN = fromString("NumberIn"); /** - * Static value NumberNotIn for FilterOperatorType. + * NumberNotIn. */ public static final FilterOperatorType NUMBER_NOT_IN = fromString("NumberNotIn"); /** - * Static value NumberLessThan for FilterOperatorType. + * NumberLessThan. */ public static final FilterOperatorType NUMBER_LESS_THAN = fromString("NumberLessThan"); /** - * Static value NumberGreaterThan for FilterOperatorType. + * NumberGreaterThan. */ public static final FilterOperatorType NUMBER_GREATER_THAN = fromString("NumberGreaterThan"); /** - * Static value NumberLessThanOrEquals for FilterOperatorType. + * NumberLessThanOrEquals. */ public static final FilterOperatorType NUMBER_LESS_THAN_OR_EQUALS = fromString("NumberLessThanOrEquals"); /** - * Static value NumberGreaterThanOrEquals for FilterOperatorType. + * NumberGreaterThanOrEquals. */ public static final FilterOperatorType NUMBER_GREATER_THAN_OR_EQUALS = fromString("NumberGreaterThanOrEquals"); /** - * Static value BoolEquals for FilterOperatorType. + * BoolEquals. */ public static final FilterOperatorType BOOL_EQUALS = fromString("BoolEquals"); /** - * Static value StringIn for FilterOperatorType. + * StringIn. */ public static final FilterOperatorType STRING_IN = fromString("StringIn"); /** - * Static value StringNotIn for FilterOperatorType. + * StringNotIn. */ public static final FilterOperatorType STRING_NOT_IN = fromString("StringNotIn"); /** - * Static value StringBeginsWith for FilterOperatorType. + * StringBeginsWith. */ public static final FilterOperatorType STRING_BEGINS_WITH = fromString("StringBeginsWith"); /** - * Static value StringEndsWith for FilterOperatorType. + * StringEndsWith. */ public static final FilterOperatorType STRING_ENDS_WITH = fromString("StringEndsWith"); /** - * Static value StringContains for FilterOperatorType. + * StringContains. */ public static final FilterOperatorType STRING_CONTAINS = fromString("StringContains"); /** - * Static value NumberInRange for FilterOperatorType. + * NumberInRange. */ public static final FilterOperatorType NUMBER_IN_RANGE = fromString("NumberInRange"); /** - * Static value NumberNotInRange for FilterOperatorType. + * NumberNotInRange. */ public static final FilterOperatorType NUMBER_NOT_IN_RANGE = fromString("NumberNotInRange"); /** - * Static value StringNotBeginsWith for FilterOperatorType. + * StringNotBeginsWith. */ public static final FilterOperatorType STRING_NOT_BEGINS_WITH = fromString("StringNotBeginsWith"); /** - * Static value StringNotEndsWith for FilterOperatorType. + * StringNotEndsWith. */ public static final FilterOperatorType STRING_NOT_ENDS_WITH = fromString("StringNotEndsWith"); /** - * Static value StringNotContains for FilterOperatorType. + * StringNotContains. */ public static final FilterOperatorType STRING_NOT_CONTAINS = fromString("StringNotContains"); /** - * Static value IsNullOrUndefined for FilterOperatorType. + * IsNullOrUndefined. */ public static final FilterOperatorType IS_NULL_OR_UNDEFINED = fromString("IsNullOrUndefined"); /** - * Static value IsNotNull for FilterOperatorType. + * IsNotNull. */ public static final FilterOperatorType IS_NOT_NULL = fromString("IsNotNull"); 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 1bc8c34bf8921..7a66e5f97d138 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -76,17 +76,6 @@ public FiltersConfiguration withFilters(List filters) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (filters() != null) { - filters().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 47db1f57bb2af..ccc6555fc1255 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -101,18 +101,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 ed6d4b95a4912..7beb1d055c89e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -136,21 +136,6 @@ public IdentityInfo withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); - } - } - /** * {@inheritDoc} */ 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 b1ff0748efb9f..7bb03b62b1743 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,22 +13,22 @@ */ public final class IdentityType extends ExpandableStringEnum { /** - * Static value None for IdentityType. + * None. */ public static final IdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for IdentityType. + * SystemAssigned. */ public static final IdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for IdentityType. + * UserAssigned. */ public static final IdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned, UserAssigned for IdentityType. + * SystemAssigned, UserAssigned. */ public static final IdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned, UserAssigned"); 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 fc23ee63fc638..6208901d5cfc7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,14 +72,6 @@ public InboundIpRule withAction(IpActionType action) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 342e552e568b5..d3d52f3bf2f57 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -122,14 +122,6 @@ public InlineEventProperties withDataSchemaUrl(String dataSchemaUrl) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 245788fffb209..6b5086988bd33 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,17 +13,17 @@ */ public final class InputSchema extends ExpandableStringEnum { /** - * Static value EventGridSchema for InputSchema. + * EventGridSchema. */ public static final InputSchema EVENT_GRID_SCHEMA = fromString("EventGridSchema"); /** - * Static value CustomEventSchema for InputSchema. + * CustomEventSchema. */ public static final InputSchema CUSTOM_EVENT_SCHEMA = fromString("CustomEventSchema"); /** - * Static value CloudEventSchemaV1_0 for InputSchema. + * CloudEventSchemaV1_0. */ public static final InputSchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); 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 3ac9be76e0d15..6c8e53c8ea7df 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -38,14 +38,6 @@ public InputSchemaMappingType inputSchemaMappingType() { return this.inputSchemaMappingType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 7f96a63bddd33..7ca8b53feb9ae 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class InputSchemaMappingType extends ExpandableStringEnum { /** - * Static value Json for InputSchemaMappingType. + * Json. */ public static final InputSchemaMappingType JSON = fromString("Json"); 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 b5efc61cbb035..b82fe518bdd1f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class IpActionType extends ExpandableStringEnum { /** - * Static value Allow for IpActionType. + * Allow. */ public static final IpActionType ALLOW = fromString("Allow"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpAddressType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpAddressType.java new file mode 100644 index 0000000000000..07f8d0b19d40a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpAddressType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * IP address type for the namespace resource. + */ +public final class IpAddressType extends ExpandableStringEnum { + /** + * Only IPv4 addresses are supported. + */ + public static final IpAddressType IPV4 = fromString("IPv4"); + + /** + * Both IPv4 and IPv6 addresses are supported. + */ + public static final IpAddressType DUAL_STACK = fromString("DualStack"); + + /** + * Creates a new instance of IpAddressType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpAddressType() { + } + + /** + * Creates or finds a IpAddressType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpAddressType. + */ + public static IpAddressType fromString(String name) { + return fromString(name, IpAddressType.class); + } + + /** + * Gets known IpAddressType values. + * + * @return known IpAddressType values. + */ + public static Collection values() { + return values(IpAddressType.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 18dd115046549..ee49f2139793e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -46,15 +46,6 @@ public IsNotNullAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 36c8ba03c23c0..a052c806b68f8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -46,15 +46,6 @@ public IsNotNullFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 7e345d2b39175..2e20c77f50f84 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -46,15 +46,6 @@ public IsNullOrUndefinedAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 ddddd9d7d5da2..e0947c8a4bd7d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -46,15 +46,6 @@ public IsNullOrUndefinedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 e6733175a04b4..4959878b0bc59 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -76,24 +75,6 @@ public IssuerCertificateInfo withIdentity(CustomJwtAuthenticationManagedIdentity return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (certificateUrl() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property certificateUrl in model IssuerCertificateInfo")); - } - if (identity() != null) { - identity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IssuerCertificateInfo.class); - /** * {@inheritDoc} */ 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 3437e74e16c71..c38045fa98807 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -51,14 +51,6 @@ public JsonField withSourceField(String sourceField) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 9646c040fde1d..010de7ac6d339 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -80,14 +80,6 @@ public JsonFieldWithDefault withDefaultValue(String defaultValue) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 93ade16d1c726..598271fa7802a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -190,18 +190,6 @@ public JsonInputSchemaMapping withDataVersion(JsonFieldWithDefault dataVersion) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryption.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryption.java new file mode 100644 index 0000000000000..f848829c126b8 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryption.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of the Encryption settings. + */ +@Fluent +public final class KeyEncryption implements JsonSerializable { + /* + * List of all customer-managed key encryption properties for the resource. However only one key is supported at a + * time. + */ + private List customerManagedKeyEncryption; + + /** + * Creates an instance of KeyEncryption class. + */ + public KeyEncryption() { + } + + /** + * Get the customerManagedKeyEncryption property: List of all customer-managed key encryption properties for the + * resource. However only one key is supported at a time. + * + * @return the customerManagedKeyEncryption value. + */ + public List customerManagedKeyEncryption() { + return this.customerManagedKeyEncryption; + } + + /** + * Set the customerManagedKeyEncryption property: List of all customer-managed key encryption properties for the + * resource. However only one key is supported at a time. + * + * @param customerManagedKeyEncryption the customerManagedKeyEncryption value to set. + * @return the KeyEncryption object itself. + */ + public KeyEncryption + withCustomerManagedKeyEncryption(List customerManagedKeyEncryption) { + this.customerManagedKeyEncryption = customerManagedKeyEncryption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("customerManagedKeyEncryption", this.customerManagedKeyEncryption, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyEncryption 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 KeyEncryption. + */ + public static KeyEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyEncryption deserializedKeyEncryption = new KeyEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("customerManagedKeyEncryption".equals(fieldName)) { + List customerManagedKeyEncryption + = reader.readArray(reader1 -> CustomerManagedKeyEncryption.fromJson(reader1)); + deserializedKeyEncryption.customerManagedKeyEncryption = customerManagedKeyEncryption; + } else { + reader.skipChildren(); + } + } + + return deserializedKeyEncryption; + }); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionIdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionIdentityType.java new file mode 100644 index 0000000000000..3acd6f713cc08 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionIdentityType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of managed identity used. Only UserAssigned or SystemAssigned Identity are supported. + */ +public final class KeyEncryptionIdentityType extends ExpandableStringEnum { + /** + * SystemAssigned. + */ + public static final KeyEncryptionIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * UserAssigned. + */ + public static final KeyEncryptionIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Creates a new instance of KeyEncryptionIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KeyEncryptionIdentityType() { + } + + /** + * Creates or finds a KeyEncryptionIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding KeyEncryptionIdentityType. + */ + public static KeyEncryptionIdentityType fromString(String name) { + return fromString(name, KeyEncryptionIdentityType.class); + } + + /** + * Gets known KeyEncryptionIdentityType values. + * + * @return known KeyEncryptionIdentityType values. + */ + public static Collection values() { + return values(KeyEncryptionIdentityType.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyIdentity.java new file mode 100644 index 0000000000000..be6f92c1ea6d6 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyIdentity.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The KeyEncryptionKeyIdentity model. + */ +@Fluent +public final class KeyEncryptionKeyIdentity implements JsonSerializable { + /* + * The type of managed identity used. Only UserAssigned or SystemAssigned Identity are supported. + */ + private KeyEncryptionIdentityType type; + + /* + * Azure Resource fully qualified Id for the user-assigned identity associated with the resource. The resource Id + * takes the following format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}'. + */ + private String userAssignedIdentityResourceId; + + /** + * Creates an instance of KeyEncryptionKeyIdentity class. + */ + public KeyEncryptionKeyIdentity() { + } + + /** + * Get the type property: The type of managed identity used. Only UserAssigned or SystemAssigned Identity are + * supported. + * + * @return the type value. + */ + public KeyEncryptionIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of managed identity used. Only UserAssigned or SystemAssigned Identity are + * supported. + * + * @param type the type value to set. + * @return the KeyEncryptionKeyIdentity object itself. + */ + public KeyEncryptionKeyIdentity withType(KeyEncryptionIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentityResourceId property: Azure Resource fully qualified Id for the user-assigned identity + * associated with the resource. The resource Id takes the following format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: Azure Resource fully qualified Id for the user-assigned identity + * associated with the resource. The resource Id takes the following format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the KeyEncryptionKeyIdentity object itself. + */ + public KeyEncryptionKeyIdentity withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyEncryptionKeyIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyEncryptionKeyIdentity 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 KeyEncryptionKeyIdentity. + */ + public static KeyEncryptionKeyIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyEncryptionKeyIdentity deserializedKeyEncryptionKeyIdentity = new KeyEncryptionKeyIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedKeyEncryptionKeyIdentity.type + = KeyEncryptionIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentityResourceId".equals(fieldName)) { + deserializedKeyEncryptionKeyIdentity.userAssignedIdentityResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyEncryptionKeyIdentity; + }); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyStatus.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyStatus.java new file mode 100644 index 0000000000000..bfe57f9bafa8c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyStatus.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state of the Customer Managed Key (CMK) encryption. This is a read-only property which determines if the + * associated key is active and valid and used + * actively by runtime as expected. When the associated CMK becomes invalid (e.g., if it is deleted, or if versioned CMK + * is not current anymore), Event Grid + * Service will set this state to disabled to indicate that this key is not valid anymore and requires action from user. + */ +public final class KeyEncryptionKeyStatus extends ExpandableStringEnum { + /** + * Active. + */ + public static final KeyEncryptionKeyStatus ACTIVE = fromString("Active"); + + /** + * Revoked. + */ + public static final KeyEncryptionKeyStatus REVOKED = fromString("Revoked"); + + /** + * Creates a new instance of KeyEncryptionKeyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KeyEncryptionKeyStatus() { + } + + /** + * Creates or finds a KeyEncryptionKeyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding KeyEncryptionKeyStatus. + */ + public static KeyEncryptionKeyStatus fromString(String name) { + return fromString(name, KeyEncryptionKeyStatus.class); + } + + /** + * Gets known KeyEncryptionKeyStatus values. + * + * @return known KeyEncryptionKeyStatus values. + */ + public static Collection values() { + return values(KeyEncryptionKeyStatus.class); + } +} 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 a3acbb6c00596..b01066cc82e76 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -133,18 +133,6 @@ public MonitorAlertEventSubscriptionDestination withActionGroups(List ac return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 c2023e0bf71c2..c8d5a1d457347 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,27 +13,27 @@ */ public final class MonitorAlertSeverity extends ExpandableStringEnum { /** - * Static value Sev0 for MonitorAlertSeverity. + * Sev0. */ public static final MonitorAlertSeverity SEV0 = fromString("Sev0"); /** - * Static value Sev1 for MonitorAlertSeverity. + * Sev1. */ public static final MonitorAlertSeverity SEV1 = fromString("Sev1"); /** - * Static value Sev2 for MonitorAlertSeverity. + * Sev2. */ public static final MonitorAlertSeverity SEV2 = fromString("Sev2"); /** - * Static value Sev3 for MonitorAlertSeverity. + * Sev3. */ public static final MonitorAlertSeverity SEV3 = fromString("Sev3"); /** - * Static value Sev4 for MonitorAlertSeverity. + * Sev4. */ public static final MonitorAlertSeverity SEV4 = fromString("Sev4"); 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 15f3353a4284b..09f6c14fa228f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -67,7 +67,7 @@ public interface Namespace { IdentityInfo identity(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -134,12 +134,27 @@ public interface Namespace { /** * Gets the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this - * namespace. Only TLS version 1.2 is supported. + * namespace. The TlsVersion values are shared with topics and domains; for namespaces, only TLS version 1.2 is + * currently supported. * * @return the minimumTlsVersionAllowed value. */ TlsVersion minimumTlsVersionAllowed(); + /** + * Gets the ipAddressType property: IP address type for the namespace resource. + * + * @return the ipAddressType value. + */ + IpAddressType ipAddressType(); + + /** + * Gets the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @return the autoScaleConfiguration value. + */ + AutoScaleConfiguration autoScaleConfiguration(); + /** * Gets the region of the resource. * @@ -213,7 +228,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -227,7 +242,8 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku DefinitionStages.WithPrivateEndpointConnections, DefinitionStages.WithTopicsConfiguration, DefinitionStages.WithTopicSpacesConfiguration, DefinitionStages.WithIsZoneRedundant, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithInboundIpRules, - DefinitionStages.WithMinimumTlsVersionAllowed { + DefinitionStages.WithMinimumTlsVersionAllowed, DefinitionStages.WithIpAddressType, + DefinitionStages.WithAutoScaleConfiguration { /** * Executes the create request. * @@ -388,14 +404,42 @@ interface WithInboundIpRules { interface WithMinimumTlsVersionAllowed { /** * Specifies the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish - * to this namespace. Only TLS version 1.2 is supported.. + * to this namespace. The TlsVersion values are shared with topics and domains; for namespaces, only TLS + * version 1.2 is currently supported.. * * @param minimumTlsVersionAllowed Minimum TLS version of the publisher allowed to publish to this - * namespace. Only TLS version 1.2 is supported. + * namespace. The TlsVersion values are shared with topics and domains; for namespaces, only TLS version 1.2 + * is currently supported. * @return the next definition stage. */ WithCreate withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed); } + + /** + * The stage of the Namespace definition allowing to specify ipAddressType. + */ + interface WithIpAddressType { + /** + * Specifies the ipAddressType property: IP address type for the namespace resource.. + * + * @param ipAddressType IP address type for the namespace resource. + * @return the next definition stage. + */ + WithCreate withIpAddressType(IpAddressType ipAddressType); + } + + /** + * The stage of the Namespace definition allowing to specify autoScaleConfiguration. + */ + interface WithAutoScaleConfiguration { + /** + * Specifies the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @param autoScaleConfiguration Auto-scale configuration for the namespace resource. + * @return the next definition stage. + */ + WithCreate withAutoScaleConfiguration(AutoScaleConfiguration autoScaleConfiguration); + } } /** @@ -410,7 +454,8 @@ interface WithMinimumTlsVersionAllowed { */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, UpdateStages.WithTopicSpacesConfiguration, UpdateStages.WithTopicsConfiguration, - UpdateStages.WithPublicNetworkAccess, UpdateStages.WithInboundIpRules { + UpdateStages.WithPublicNetworkAccess, UpdateStages.WithInboundIpRules, UpdateStages.WithIpAddressType, + UpdateStages.WithAutoScaleConfiguration { /** * Executes the update request. * @@ -532,6 +577,32 @@ interface WithInboundIpRules { */ Update withInboundIpRules(List inboundIpRules); } + + /** + * The stage of the Namespace update allowing to specify ipAddressType. + */ + interface WithIpAddressType { + /** + * Specifies the ipAddressType property: IP address type for the namespace resource.. + * + * @param ipAddressType IP address type for the namespace resource. + * @return the next definition stage. + */ + Update withIpAddressType(IpAddressType ipAddressType); + } + + /** + * The stage of the Namespace update allowing to specify autoScaleConfiguration. + */ + interface WithAutoScaleConfiguration { + /** + * Specifies the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @param autoScaleConfiguration Auto-scale configuration for the namespace resource. + * @return the next definition stage. + */ + Update withAutoScaleConfiguration(UpdateAutoScaleConfiguration autoScaleConfiguration); + } } /** 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 a9c8c5695c212..be92318e73888 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,52 +12,52 @@ */ public final class NamespaceProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for NamespaceProvisioningState. + * Creating. */ public static final NamespaceProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for NamespaceProvisioningState. + * Updating. */ public static final NamespaceProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for NamespaceProvisioningState. + * Deleting. */ public static final NamespaceProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for NamespaceProvisioningState. + * Succeeded. */ public static final NamespaceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for NamespaceProvisioningState. + * Canceled. */ public static final NamespaceProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for NamespaceProvisioningState. + * Failed. */ public static final NamespaceProvisioningState FAILED = fromString("Failed"); /** - * Static value Deleted for NamespaceProvisioningState. + * Deleted. */ public static final NamespaceProvisioningState DELETED = fromString("Deleted"); /** - * Static value DeleteFailed for NamespaceProvisioningState. + * DeleteFailed. */ public static final NamespaceProvisioningState DELETE_FAILED = fromString("DeleteFailed"); /** - * Static value CreateFailed for NamespaceProvisioningState. + * CreateFailed. */ public static final NamespaceProvisioningState CREATE_FAILED = fromString("CreateFailed"); /** - * Static value UpdatedFailed for NamespaceProvisioningState. + * UpdatedFailed. */ public static final NamespaceProvisioningState UPDATED_FAILED = fromString("UpdatedFailed"); 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 2095601532897..3b969d9d21d9f 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -48,21 +47,6 @@ public NamespaceRegenerateKeyRequest withKeyName(String keyName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyName in model NamespaceRegenerateKeyRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NamespaceRegenerateKeyRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSharedAccessKeys.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSharedAccessKeys.java index 2a11cff78fd72..8aefdad9412df 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSharedAccessKeys.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSharedAccessKeys.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 1271bdb5717fd..4d0b3f26cceb9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -81,14 +81,6 @@ public NamespaceSku withCapacity(Integer capacity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 dec28d601ac4a..e84a8299c759e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -35,7 +35,7 @@ public interface NamespaceTopic { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -110,7 +110,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, namespaceName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @return the next definition stage. */ 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 2ded163704227..a3aa935d3a605 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -82,18 +82,6 @@ public NamespaceTopicEventSubscriptionDestination withResourceId(String resource return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptions.java index 3a52bcf663f5b..19eff6b852d4a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,7 +17,7 @@ public interface NamespaceTopicEventSubscriptions { * * Get properties of an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param eventSubscriptionName Name of the event subscription to be found. @@ -25,7 +25,9 @@ public interface NamespaceTopicEventSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic along with {@link Response}. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context); @@ -35,14 +37,16 @@ Response getWithResponse(String resourceGroupName, String namespac * * Get properties of an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic. */ Subscription get(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); @@ -51,10 +55,10 @@ Response getWithResponse(String resourceGroupName, String namespac * * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -66,10 +70,10 @@ Response getWithResponse(String resourceGroupName, String namespac * * Delete an existing event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -83,7 +87,7 @@ void delete(String resourceGroupName, String namespaceName, String topicName, St * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,7 +102,7 @@ void delete(String resourceGroupName, String namespaceName, String topicName, St * * List event subscriptions that belong to a specific namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -122,15 +126,17 @@ PagedIterable listByNamespaceTopic(String resourceGroupName, Strin * * Get all delivery attributes for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic along with {@link Response}. + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic along with {@link Response}. */ Response getDeliveryAttributesWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context); @@ -140,14 +146,16 @@ Response getDeliveryAttributesWithResponse(String r * * Get all delivery attributes for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic. + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic. */ DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); @@ -157,15 +165,17 @@ DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, Stri * * Get the full endpoint URL for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. */ Response getFullUrlWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context); @@ -175,14 +185,16 @@ Response getFullUrlWithResponse(String resourceGroupName, S * * Get the full endpoint URL for an event subscription of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic. + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic. */ SubscriptionFullUrl getFullUrl(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); @@ -196,7 +208,9 @@ SubscriptionFullUrl getFullUrl(String resourceGroupName, String namespaceName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic along with {@link Response}. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic along with {@link Response}. */ Subscription getById(String id); @@ -210,7 +224,9 @@ SubscriptionFullUrl getFullUrl(String resourceGroupName, String namespaceName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a namespace topic along with {@link Response}. + * @return an event subscription of a namespace topic. + * + * Get properties of an event subscription of a namespace topic along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 7397d68e06110..5417ed0a5b0c3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,52 +12,52 @@ */ public final class NamespaceTopicProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for NamespaceTopicProvisioningState. + * Creating. */ public static final NamespaceTopicProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for NamespaceTopicProvisioningState. + * Updating. */ public static final NamespaceTopicProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for NamespaceTopicProvisioningState. + * Deleting. */ public static final NamespaceTopicProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for NamespaceTopicProvisioningState. + * Succeeded. */ public static final NamespaceTopicProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for NamespaceTopicProvisioningState. + * Canceled. */ public static final NamespaceTopicProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for NamespaceTopicProvisioningState. + * Failed. */ public static final NamespaceTopicProvisioningState FAILED = fromString("Failed"); /** - * Static value Deleted for NamespaceTopicProvisioningState. + * Deleted. */ public static final NamespaceTopicProvisioningState DELETED = fromString("Deleted"); /** - * Static value DeleteFailed for NamespaceTopicProvisioningState. + * DeleteFailed. */ public static final NamespaceTopicProvisioningState DELETE_FAILED = fromString("DeleteFailed"); /** - * Static value CreateFailed for NamespaceTopicProvisioningState. + * CreateFailed. */ public static final NamespaceTopicProvisioningState CREATE_FAILED = fromString("CreateFailed"); /** - * Static value UpdatedFailed for NamespaceTopicProvisioningState. + * UpdatedFailed. */ public static final NamespaceTopicProvisioningState UPDATED_FAILED = fromString("UpdatedFailed"); 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 b0af7b0c9be2d..c577072783eaa 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -64,17 +64,6 @@ public NamespaceTopicUpdateParameters withEventRetentionInDays(Integer eventRete return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopics.java index 2f1a941a87ad0..b716ecdf1afd8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,14 +17,16 @@ public interface NamespaceTopics { * * Get properties of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic along with {@link Response}. + * @return a namespace topic. + * + * Get properties of a namespace topic along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String namespaceName, String topicName, Context context); @@ -34,13 +36,15 @@ Response getWithResponse(String resourceGroupName, String namesp * * Get properties of a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic. + * @return a namespace topic. + * + * Get properties of a namespace topic. */ NamespaceTopic get(String resourceGroupName, String namespaceName, String topicName); @@ -49,9 +53,9 @@ Response getWithResponse(String resourceGroupName, String namesp * * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -63,9 +67,9 @@ Response getWithResponse(String resourceGroupName, String namesp * * Delete existing namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -78,7 +82,7 @@ Response getWithResponse(String resourceGroupName, String namesp * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -92,7 +96,7 @@ Response getWithResponse(String resourceGroupName, String namesp * * List all the namespace topics under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -115,9 +119,9 @@ PagedIterable listByNamespace(String resourceGroupName, String n * * List the two keys used to publish to a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -132,9 +136,9 @@ Response listSharedAccessKeysWithResponse(String resource * * List the two keys used to publish to a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -147,9 +151,9 @@ Response listSharedAccessKeysWithResponse(String resource * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -164,9 +168,9 @@ TopicSharedAccessKeys regenerateKey(String resourceGroupName, String namespaceNa * * Regenerate a shared access key for a namespace topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. - * @param topicName Name of the topic. + * @param topicName Name of the namespace topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -186,7 +190,9 @@ TopicSharedAccessKeys regenerateKey(String resourceGroupName, String namespaceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic along with {@link Response}. + * @return a namespace topic. + * + * Get properties of a namespace topic along with {@link Response}. */ NamespaceTopic getById(String id); @@ -200,7 +206,9 @@ TopicSharedAccessKeys regenerateKey(String resourceGroupName, String namespaceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace topic along with {@link Response}. + * @return a namespace topic. + * + * Get properties of a namespace topic along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 99ba80c5dd813..b4cd0a79e4f6b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -218,20 +218,49 @@ public NamespaceUpdateParameters withInboundIpRules(List inboundI } /** - * Validates the instance. + * Get the ipAddressType property: IP address type for the namespace resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the ipAddressType value. */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); + public IpAddressType ipAddressType() { + return this.innerProperties() == null ? null : this.innerProperties().ipAddressType(); + } + + /** + * Set the ipAddressType property: IP address type for the namespace resource. + * + * @param ipAddressType the ipAddressType value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withIpAddressType(IpAddressType ipAddressType) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceUpdateParameterProperties(); } - if (innerProperties() != null) { - innerProperties().validate(); + this.innerProperties().withIpAddressType(ipAddressType); + return this; + } + + /** + * Get the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @return the autoScaleConfiguration value. + */ + public UpdateAutoScaleConfiguration autoScaleConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().autoScaleConfiguration(); + } + + /** + * Set the autoScaleConfiguration property: Auto-scale configuration for the namespace resource. + * + * @param autoScaleConfiguration the autoScaleConfiguration value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withAutoScaleConfiguration(UpdateAutoScaleConfiguration autoScaleConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceUpdateParameterProperties(); } + this.innerProperties().withAutoScaleConfiguration(autoScaleConfiguration); + return this; } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespaces.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespaces.java index 1233c26d68de9..c66bb69e9dc4c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespaces.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespaces.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,13 +17,15 @@ public interface Namespaces { * * Get properties of a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace along with {@link Response}. + * @return a namespace. + * + * Get properties of a namespace along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, Context context); @@ -32,12 +34,14 @@ public interface Namespaces { * * Get properties of a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace. + * @return a namespace. + * + * Get properties of a namespace. */ Namespace getByResourceGroup(String resourceGroupName, String namespaceName); @@ -46,7 +50,7 @@ public interface Namespaces { * * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,7 +63,7 @@ public interface Namespaces { * * Delete existing namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,21 +73,24 @@ public interface Namespaces { void delete(String resourceGroupName, String namespaceName, Context context); /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List namespaces under an Azure subscription. + * List namespaces under a resource group. * - * List all the namespaces under an Azure subscription. + * List all the namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -97,27 +104,24 @@ public interface Namespaces { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List namespaces under a resource group. + * List namespaces under an Azure subscription. * - * List all the namespaces under a resource group. + * List all the namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -131,14 +135,14 @@ public interface Namespaces { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); + PagedIterable list(String filter, Integer top, Context context); /** * List keys for a namespace. * * List the two keys used to publish to a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -154,7 +158,7 @@ Response listSharedAccessKeysWithResponse(String reso * * List the two keys used to publish to a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -168,8 +172,8 @@ Response listSharedAccessKeysWithResponse(String reso * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -184,8 +188,8 @@ NamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String namespa * * Regenerate a shared access key for a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,8 +205,8 @@ NamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String namespa * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -215,8 +219,8 @@ NamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String namespa * * Performs ownership validation via checking TXT records for all custom domains in a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param namespaceName Name of the Namespace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param namespaceName Name of the namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -235,7 +239,9 @@ CustomDomainOwnershipValidationResult validateCustomDomainOwnership(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace along with {@link Response}. + * @return a namespace. + * + * Get properties of a namespace along with {@link Response}. */ Namespace getById(String id); @@ -249,7 +255,9 @@ CustomDomainOwnershipValidationResult validateCustomDomainOwnership(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a namespace along with {@link Response}. + * @return a namespace. + * + * Get properties of a namespace along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 5c3ff202f211a..05015cb03ca1f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,17 +13,17 @@ public final class NetworkSecurityPerimeterAssociationAccessMode extends ExpandableStringEnum { /** - * Static value Learning for NetworkSecurityPerimeterAssociationAccessMode. + * Learning. */ public static final NetworkSecurityPerimeterAssociationAccessMode LEARNING = fromString("Learning"); /** - * Static value Enforced for NetworkSecurityPerimeterAssociationAccessMode. + * Enforced. */ public static final NetworkSecurityPerimeterAssociationAccessMode ENFORCED = fromString("Enforced"); /** - * Static value Audit for NetworkSecurityPerimeterAssociationAccessMode. + * Audit. */ public static final NetworkSecurityPerimeterAssociationAccessMode AUDIT = fromString("Audit"); 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 f7e337d512d46..f28d38422fb40 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,42 +13,42 @@ public final class NetworkSecurityPerimeterConfigProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for NetworkSecurityPerimeterConfigProvisioningState. + * Creating. */ public static final NetworkSecurityPerimeterConfigProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for NetworkSecurityPerimeterConfigProvisioningState. + * Updating. */ public static final NetworkSecurityPerimeterConfigProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for NetworkSecurityPerimeterConfigProvisioningState. + * Deleting. */ public static final NetworkSecurityPerimeterConfigProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for NetworkSecurityPerimeterConfigProvisioningState. + * Succeeded. */ public static final NetworkSecurityPerimeterConfigProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for NetworkSecurityPerimeterConfigProvisioningState. + * Canceled. */ public static final NetworkSecurityPerimeterConfigProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for NetworkSecurityPerimeterConfigProvisioningState. + * Failed. */ public static final NetworkSecurityPerimeterConfigProvisioningState FAILED = fromString("Failed"); /** - * Static value Deleted for NetworkSecurityPerimeterConfigProvisioningState. + * Deleted. */ public static final NetworkSecurityPerimeterConfigProvisioningState DELETED = fromString("Deleted"); /** - * Static value Accepted for NetworkSecurityPerimeterConfigProvisioningState. + * Accepted. */ public static final NetworkSecurityPerimeterConfigProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfiguration.java index a9456afebfd90..a1f50b5b14596 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfiguration.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfiguration.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner; import java.util.List; @@ -32,6 +33,13 @@ public interface NetworkSecurityPerimeterConfiguration { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: Provisioning state to reflect configuration state and indicate status of nsp * profile configuration retrieval. 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 11c64d814fcf8..0a21763a3270c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,12 +13,12 @@ public final class NetworkSecurityPerimeterConfigurationIssueSeverity extends ExpandableStringEnum { /** - * Static value Warning for NetworkSecurityPerimeterConfigurationIssueSeverity. + * Warning. */ public static final NetworkSecurityPerimeterConfigurationIssueSeverity WARNING = fromString("Warning"); /** - * Static value Error for NetworkSecurityPerimeterConfigurationIssueSeverity. + * Error. */ public static final NetworkSecurityPerimeterConfigurationIssueSeverity ERROR = fromString("Error"); 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 69d011ccc6969..88fe65620c9dd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,25 +13,25 @@ public final class NetworkSecurityPerimeterConfigurationIssueType extends ExpandableStringEnum { /** - * Static value MissingPerimeterConfiguration for NetworkSecurityPerimeterConfigurationIssueType. + * MissingPerimeterConfiguration. */ public static final NetworkSecurityPerimeterConfigurationIssueType MISSING_PERIMETER_CONFIGURATION = fromString("MissingPerimeterConfiguration"); /** - * Static value MissingIdentityConfiguration for NetworkSecurityPerimeterConfigurationIssueType. + * MissingIdentityConfiguration. */ public static final NetworkSecurityPerimeterConfigurationIssueType MISSING_IDENTITY_CONFIGURATION = fromString("MissingIdentityConfiguration"); /** - * Static value ConfigurationPropagationFailure for NetworkSecurityPerimeterConfigurationIssueType. + * ConfigurationPropagationFailure. */ public static final NetworkSecurityPerimeterConfigurationIssueType CONFIGURATION_PROPAGATION_FAILURE = fromString("ConfigurationPropagationFailure"); /** - * Static value Other for NetworkSecurityPerimeterConfigurationIssueType. + * Other. */ public static final NetworkSecurityPerimeterConfigurationIssueType OTHER = fromString("Other"); 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 1e68f92a704ed..08f3cc55dcc44 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Network security perimeter configuration issues. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterConfigurationIssues implements JsonSerializable { /* @@ -32,7 +32,7 @@ public final class NetworkSecurityPerimeterConfigurationIssues /** * Creates an instance of NetworkSecurityPerimeterConfigurationIssues class. */ - public NetworkSecurityPerimeterConfigurationIssues() { + private NetworkSecurityPerimeterConfigurationIssues() { } /** @@ -44,17 +44,6 @@ public String name() { return this.name; } - /** - * Set the name property: Provisioning issue name. - * - * @param name the name value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues withName(String name) { - this.name = name; - return this; - } - /** * Get the innerProperties property: Provisioning issue properties. * @@ -73,21 +62,6 @@ public NetworkSecurityPerimeterConfigurationIssueType issueType() { return this.innerProperties() == null ? null : this.innerProperties().issueType(); } - /** - * Set the issueType property: Provisioning issue type. - * - * @param issueType the issueType value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues - withIssueType(NetworkSecurityPerimeterConfigurationIssueType issueType) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withIssueType(issueType); - return this; - } - /** * Get the severity property: Provisioning issue severity. * @@ -97,21 +71,6 @@ public NetworkSecurityPerimeterConfigurationIssueSeverity severity() { return this.innerProperties() == null ? null : this.innerProperties().severity(); } - /** - * Set the severity property: Provisioning issue severity. - * - * @param severity the severity value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues - withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - /** * Get the description property: Provisioning issue description. * @@ -121,20 +80,6 @@ public String description() { return this.innerProperties() == null ? null : this.innerProperties().description(); } - /** - * Set the description property: Provisioning issue description. - * - * @param description the description value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - /** * Get the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to * remediate the issue. @@ -145,21 +90,6 @@ public List suggestedResourceIds() { return this.innerProperties() == null ? null : this.innerProperties().suggestedResourceIds(); } - /** - * Set the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to - * remediate the issue. - * - * @param suggestedResourceIds the suggestedResourceIds value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues withSuggestedResourceIds(List suggestedResourceIds) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withSuggestedResourceIds(suggestedResourceIds); - return this; - } - /** * Get the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. * @@ -169,31 +99,6 @@ public List suggestedAccessRules() { return this.innerProperties() == null ? null : this.innerProperties().suggestedAccessRules(); } - /** - * Set the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. - * - * @param suggestedAccessRules the suggestedAccessRules value to set. - * @return the NetworkSecurityPerimeterConfigurationIssues object itself. - */ - public NetworkSecurityPerimeterConfigurationIssues withSuggestedAccessRules(List suggestedAccessRules) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterConfigurationIssuesProperties(); - } - this.innerProperties().withSuggestedAccessRules(suggestedAccessRules); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 dbc4f2bdcc59c..85422f80f79de 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Nsp configuration with profile information. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterConfigurationProfile implements JsonSerializable { /* @@ -46,7 +46,7 @@ public final class NetworkSecurityPerimeterConfigurationProfile /** * Creates an instance of NetworkSecurityPerimeterConfigurationProfile class. */ - public NetworkSecurityPerimeterConfigurationProfile() { + private NetworkSecurityPerimeterConfigurationProfile() { } /** @@ -58,17 +58,6 @@ public String name() { return this.name; } - /** - * Set the name property: Nsp configuration profile name. - * - * @param name the name value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile withName(String name) { - this.name = name; - return this; - } - /** * Get the accessRulesVersion property: Access rules version number for nsp profile. * @@ -78,17 +67,6 @@ public String accessRulesVersion() { return this.accessRulesVersion; } - /** - * Set the accessRulesVersion property: Access rules version number for nsp profile. - * - * @param accessRulesVersion the accessRulesVersion value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile withAccessRulesVersion(String accessRulesVersion) { - this.accessRulesVersion = accessRulesVersion; - return this; - } - /** * Get the accessRules property: List of inbound or outbound access rule setup on the nsp profile. * @@ -98,18 +76,6 @@ public List accessRules() { return this.accessRules; } - /** - * Set the accessRules property: List of inbound or outbound access rule setup on the nsp profile. - * - * @param accessRules the accessRules value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile - withAccessRules(List accessRules) { - this.accessRules = accessRules; - return this; - } - /** * Get the diagnosticSettingsVersion property: Diagnostic settings version number for nsp profile. * @@ -119,18 +85,6 @@ public String diagnosticSettingsVersion() { return this.diagnosticSettingsVersion; } - /** - * Set the diagnosticSettingsVersion property: Diagnostic settings version number for nsp profile. - * - * @param diagnosticSettingsVersion the diagnosticSettingsVersion value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile - withDiagnosticSettingsVersion(String diagnosticSettingsVersion) { - this.diagnosticSettingsVersion = diagnosticSettingsVersion; - return this; - } - /** * Get the enabledLogCategories property: Enabled log categories for nsp profile. * @@ -140,28 +94,6 @@ public List enabledLogCategories() { return this.enabledLogCategories; } - /** - * Set the enabledLogCategories property: Enabled log categories for nsp profile. - * - * @param enabledLogCategories the enabledLogCategories value to set. - * @return the NetworkSecurityPerimeterConfigurationProfile object itself. - */ - public NetworkSecurityPerimeterConfigurationProfile withEnabledLogCategories(List enabledLogCategories) { - this.enabledLogCategories = enabledLogCategories; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accessRules() != null) { - accessRules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurations.java index a01e5c878368f..7a3965078c368 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurations.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,16 +17,18 @@ public interface NetworkSecurityPerimeterConfigurations { * * Get a specific network security perimeter configuration with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain along with {@link Response}. + * @return a specific network security perimeter configuration. + * + * Get a specific network security perimeter configuration with a topic or domain along with {@link Response}. */ Response getWithResponse(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, @@ -37,29 +39,70 @@ Response getWithResponse(String resourceG * * Get a specific network security perimeter configuration with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\', or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration with a topic or domain. + * @return a specific network security perimeter configuration. + * + * Get a specific network security perimeter configuration with a topic or domain. */ NetworkSecurityPerimeterConfiguration get(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName); + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName); + + /** + * Get all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all network security perimeter configurations for resource. + * + * Get all network security perimeter configurations associated with a topic or domain as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, + NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context); + /** * Reconcile a specific network security perimeter configuration for a given network security perimeter association. * * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,9 +120,9 @@ NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, * Reconcile a specific network security perimeter configuration for a given network security perimeter association * with a topic or domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. + * @param resourceName The name of the resource group within the user's subscription. * @param perimeterGuid Unique identifier for perimeter. * @param associationName Association name to association network security perimeter resource to profile. * @param context The context to associate with this operation. @@ -91,39 +134,4 @@ NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName, Context context); - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName); - - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param resourceType The type of the resource. This can be either \'topics\' or \'domains\'. - * @param resourceName The name of the resource (namely, either, the topic name or domain name). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations associated with a topic or domain as paginated response - * with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, - NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterInfo.java index 41fad643253f7..191e1d9016f44 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Network security perimeter info. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterInfo implements JsonSerializable { /* * Arm id for network security perimeter. @@ -34,7 +34,7 @@ public final class NetworkSecurityPerimeterInfo implements JsonSerializable { /* @@ -42,7 +42,7 @@ public final class NetworkSecurityPerimeterProfileAccessRule /** * Creates an instance of NetworkSecurityPerimeterProfileAccessRule class. */ - public NetworkSecurityPerimeterProfileAccessRule() { + private NetworkSecurityPerimeterProfileAccessRule() { } /** @@ -54,17 +54,6 @@ public String fullyQualifiedArmId() { return this.fullyQualifiedArmId; } - /** - * Set the fullyQualifiedArmId property: Fully Qualified Arm id for network security perimeter profile access rule. - * - * @param fullyQualifiedArmId the fullyQualifiedArmId value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withFullyQualifiedArmId(String fullyQualifiedArmId) { - this.fullyQualifiedArmId = fullyQualifiedArmId; - return this; - } - /** * Get the name property: Name for nsp access rule. * @@ -74,17 +63,6 @@ public String name() { return this.name; } - /** - * Set the name property: Name for nsp access rule. - * - * @param name the name value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withName(String name) { - this.name = name; - return this; - } - /** * Get the type property: nsp access rule type. * @@ -94,17 +72,6 @@ public String type() { return this.type; } - /** - * Set the type property: nsp access rule type. - * - * @param type the type value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withType(String type) { - this.type = type; - return this; - } - /** * Get the innerProperties property: NSP access rule properties. * @@ -123,21 +90,6 @@ public NetworkSecurityPerimeterProfileAccessRuleDirection direction() { return this.innerProperties() == null ? null : this.innerProperties().direction(); } - /** - * Set the direction property: NSP access rule direction. - * - * @param direction the direction value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule - withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection direction) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withDirection(direction); - return this; - } - /** * Get the addressPrefixes property: Address prefixes. * @@ -147,20 +99,6 @@ public List addressPrefixes() { return this.innerProperties() == null ? null : this.innerProperties().addressPrefixes(); } - /** - * Set the addressPrefixes property: Address prefixes. - * - * @param addressPrefixes the addressPrefixes value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withAddressPrefixes(List addressPrefixes) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withAddressPrefixes(addressPrefixes); - return this; - } - /** * Get the subscriptions property: List of subscriptions. * @@ -170,21 +108,6 @@ public List subscriptions() { return this.innerProperties() == null ? null : this.innerProperties().subscriptions(); } - /** - * Set the subscriptions property: List of subscriptions. - * - * @param subscriptions the subscriptions value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule - withSubscriptions(List subscriptions) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withSubscriptions(subscriptions); - return this; - } - /** * Get the networkSecurityPerimeters property: Network security perimeters. * @@ -194,21 +117,6 @@ public List networkSecurityPerimeters() { return this.innerProperties() == null ? null : this.innerProperties().networkSecurityPerimeters(); } - /** - * Set the networkSecurityPerimeters property: Network security perimeters. - * - * @param networkSecurityPerimeters the networkSecurityPerimeters value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule - withNetworkSecurityPerimeters(List networkSecurityPerimeters) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withNetworkSecurityPerimeters(networkSecurityPerimeters); - return this; - } - /** * Get the fullyQualifiedDomainNames property: Fully qualified domain names. * @@ -218,21 +126,6 @@ public List fullyQualifiedDomainNames() { return this.innerProperties() == null ? null : this.innerProperties().fullyQualifiedDomainNames(); } - /** - * Set the fullyQualifiedDomainNames property: Fully qualified domain names. - * - * @param fullyQualifiedDomainNames the fullyQualifiedDomainNames value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule - withFullyQualifiedDomainNames(List fullyQualifiedDomainNames) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withFullyQualifiedDomainNames(fullyQualifiedDomainNames); - return this; - } - /** * Get the emailAddresses property: List of email addresses. * @@ -242,20 +135,6 @@ public List emailAddresses() { return this.innerProperties() == null ? null : this.innerProperties().emailAddresses(); } - /** - * Set the emailAddresses property: List of email addresses. - * - * @param emailAddresses the emailAddresses value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withEmailAddresses(List emailAddresses) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withEmailAddresses(emailAddresses); - return this; - } - /** * Get the phoneNumbers property: List of phone numbers. * @@ -265,31 +144,6 @@ public List phoneNumbers() { return this.innerProperties() == null ? null : this.innerProperties().phoneNumbers(); } - /** - * Set the phoneNumbers property: List of phone numbers. - * - * @param phoneNumbers the phoneNumbers value to set. - * @return the NetworkSecurityPerimeterProfileAccessRule object itself. - */ - public NetworkSecurityPerimeterProfileAccessRule withPhoneNumbers(List phoneNumbers) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkSecurityPerimeterProfileAccessRuleProperties(); - } - this.innerProperties().withPhoneNumbers(phoneNumbers); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 5261b6371258d..d0c4346b9b4d8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,12 +13,12 @@ public final class NetworkSecurityPerimeterProfileAccessRuleDirection extends ExpandableStringEnum { /** - * Static value Inbound for NetworkSecurityPerimeterProfileAccessRuleDirection. + * Inbound. */ public static final NetworkSecurityPerimeterProfileAccessRuleDirection INBOUND = fromString("Inbound"); /** - * Static value Outbound for NetworkSecurityPerimeterProfileAccessRuleDirection. + * Outbound. */ public static final NetworkSecurityPerimeterProfileAccessRuleDirection OUTBOUND = fromString("Outbound"); 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 0ea56f24cc477..caadd30a48f2d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,12 +13,12 @@ public final class NetworkSecurityPerimeterResourceType extends ExpandableStringEnum { /** - * Static value topics for NetworkSecurityPerimeterResourceType. + * topics. */ public static final NetworkSecurityPerimeterResourceType TOPICS = fromString("topics"); /** - * Static value domains for NetworkSecurityPerimeterResourceType. + * domains. */ public static final NetworkSecurityPerimeterResourceType DOMAINS = fromString("domains"); 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 e95dc426a10a3..cf3b3c47dbfaa 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Network security perimeter subscription inbound access rule. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterSubscription implements JsonSerializable { /* @@ -25,7 +25,7 @@ public final class NetworkSecurityPerimeterSubscription /** * Creates an instance of NetworkSecurityPerimeterSubscription class. */ - public NetworkSecurityPerimeterSubscription() { + private NetworkSecurityPerimeterSubscription() { } /** @@ -37,25 +37,6 @@ public String id() { return this.id; } - /** - * Set the id property: Subscription id. - * - * @param id the id value to set. - * @return the NetworkSecurityPerimeterSubscription object itself. - */ - public NetworkSecurityPerimeterSubscription withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 00e6f4af89e73..4db316467c690 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public NumberGreaterThanAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 7d212310c2ff5..2413684969ac0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public NumberGreaterThanFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 a99e3beb889e6..a1243bccc25af 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public NumberGreaterThanOrEqualsAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 2ecbdf2eb49f4..af93b0cf33d4e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public NumberGreaterThanOrEqualsFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 df80fb997cbb0..ce7b51e97e3cc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public NumberInAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 5de876abf5098..b419a3f0ba3ea 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public NumberInFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 e13be09b196cc..163324be9309b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public NumberInRangeAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 497ac0cb384e5..2ab617994941d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public NumberInRangeFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 a2fc2330df539..609771a493195 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public NumberLessThanAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 e32127ba1da28..f7927939df994 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public NumberLessThanFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 100469d8ac10b..814dc86df5dfd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public NumberLessThanOrEqualsAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 436dda9417d24..c1604abc506ba 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -71,15 +71,6 @@ public NumberLessThanOrEqualsFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 7ba56ae7f4c24..68db7944a8646 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public NumberNotInAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 9ab600f9a3f2f..b0d4350e6c3ee 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public NumberNotInFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 dce50c3765301..981b6ab87275f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public NumberNotInRangeAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 e6d2bbf02a4e2..45e76eaf3ee59 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public NumberNotInRangeFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operation.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operation.java index b1b233358cb45..d13162bb27d02 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operation.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 34b7a3669833f..1084e72b03828 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Information about an operation. */ -@Fluent +@Immutable public final class OperationInfo implements JsonSerializable { /* * Name of the provider @@ -39,7 +39,7 @@ public final class OperationInfo implements JsonSerializable { /** * Creates an instance of OperationInfo class. */ - public OperationInfo() { + private OperationInfo() { } /** @@ -51,17 +51,6 @@ public String provider() { return this.provider; } - /** - * Set the provider property: Name of the provider. - * - * @param provider the provider value to set. - * @return the OperationInfo object itself. - */ - public OperationInfo withProvider(String provider) { - this.provider = provider; - return this; - } - /** * Get the resource property: Name of the resource type. * @@ -71,17 +60,6 @@ public String resource() { return this.resource; } - /** - * Set the resource property: Name of the resource type. - * - * @param resource the resource value to set. - * @return the OperationInfo object itself. - */ - public OperationInfo withResource(String resource) { - this.resource = resource; - return this; - } - /** * Get the operation property: Name of the operation. * @@ -91,17 +69,6 @@ public String operation() { return this.operation; } - /** - * Set the operation property: Name of the operation. - * - * @param operation the operation value to set. - * @return the OperationInfo object itself. - */ - public OperationInfo withOperation(String operation) { - this.operation = operation; - return this; - } - /** * Get the description property: Description of the operation. * @@ -111,25 +78,6 @@ public String description() { return this.description; } - /** - * Set the description property: Description of the operation. - * - * @param description the description value to set. - * @return the OperationInfo object itself. - */ - public OperationInfo withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java index 5f098d2e04c23..46a1fdecd61b4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 7bce66052b806..6a6c77d0f4947 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,8 +13,6 @@ 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. @@ -24,7 +22,7 @@ public final class Partner implements JsonSerializable { /* * The immutableId of the corresponding partner registration. */ - private UUID partnerRegistrationImmutableId; + private String partnerRegistrationImmutableId; /* * The partner name. @@ -52,7 +50,7 @@ public Partner() { * * @return the partnerRegistrationImmutableId value. */ - public UUID partnerRegistrationImmutableId() { + public String partnerRegistrationImmutableId() { return this.partnerRegistrationImmutableId; } @@ -62,7 +60,7 @@ public UUID partnerRegistrationImmutableId() { * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. * @return the Partner object itself. */ - public Partner withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + public Partner withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId) { this.partnerRegistrationImmutableId = partnerRegistrationImmutableId; return this; } @@ -117,22 +115,13 @@ public Partner withAuthorizationExpirationTimeInUtc(OffsetDateTime authorization return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("partnerRegistrationImmutableId", - Objects.toString(this.partnerRegistrationImmutableId, null)); + jsonWriter.writeStringField("partnerRegistrationImmutableId", this.partnerRegistrationImmutableId); jsonWriter.writeStringField("partnerName", this.partnerName); jsonWriter.writeStringField("authorizationExpirationTimeInUtc", this.authorizationExpirationTimeInUtc == null @@ -157,8 +146,7 @@ public static Partner fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("partnerRegistrationImmutableId".equals(fieldName)) { - deserializedPartner.partnerRegistrationImmutableId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedPartner.partnerRegistrationImmutableId = reader.getString(); } else if ("partnerName".equals(fieldName)) { deserializedPartner.partnerName = reader.getString(); } else if ("authorizationExpirationTimeInUtc".equals(fieldName)) { 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 a223183d9070c..eeeb54a05155f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -79,17 +79,6 @@ public PartnerAuthorization withAuthorizedPartnersList(List authorizedP return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (authorizedPartnersList() != null) { - authorizedPartnersList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 97d9ba12c368a..3693e6aac8d9f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -37,14 +37,6 @@ public PartnerClientAuthenticationType clientAuthenticationType() { return this.clientAuthenticationType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 9357adc266647..7c39a590a158e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class PartnerClientAuthenticationType extends ExpandableStringEnum { /** - * Static value AzureAD for PartnerClientAuthenticationType. + * AzureAD. */ public static final PartnerClientAuthenticationType AZURE_AD = fromString("AzureAD"); 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 36f53196b996f..6fe7694d383d7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -34,11 +34,11 @@ public interface PartnerConfiguration { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the tags property: Tags of the resource. * - * @return the systemData value. + * @return the tags value. */ - SystemData systemData(); + Map tags(); /** * Gets the location property: Location of the resource. @@ -48,11 +48,11 @@ public interface PartnerConfiguration { String location(); /** - * Gets the tags property: Tags of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the tags value. + * @return the systemData value. */ - Map tags(); + SystemData systemData(); /** * Gets the partnerAuthorization property: The details of authorized partners. 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 88af9e9b830b6..d11388d75583a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,32 +13,32 @@ public final class PartnerConfigurationProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for PartnerConfigurationProvisioningState. + * Creating. */ public static final PartnerConfigurationProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for PartnerConfigurationProvisioningState. + * Updating. */ public static final PartnerConfigurationProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for PartnerConfigurationProvisioningState. + * Deleting. */ public static final PartnerConfigurationProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for PartnerConfigurationProvisioningState. + * Succeeded. */ public static final PartnerConfigurationProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for PartnerConfigurationProvisioningState. + * Canceled. */ public static final PartnerConfigurationProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for PartnerConfigurationProvisioningState. + * Failed. */ public static final PartnerConfigurationProvisioningState FAILED = fromString("Failed"); 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 b9a78d3d3aef8..3eab170d1328b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -90,17 +90,6 @@ public Integer defaultMaximumExpirationTimeInDays() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java index f2343b82a40eb..171f8eb3baf15 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -18,12 +18,14 @@ public interface PartnerConfigurations { * * Get properties of a partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner configuration along with {@link Response}. + * @return a partner configuration. + * + * Get properties of a partner configuration along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, Context context); @@ -32,11 +34,13 @@ public interface PartnerConfigurations { * * Get properties of a partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner configuration. + * @return a partner configuration. + * + * Get properties of a partner configuration. */ PartnerConfiguration getByResourceGroup(String resourceGroupName); @@ -45,7 +49,7 @@ public interface PartnerConfigurations { * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,7 +63,7 @@ public interface PartnerConfigurations { * * Synchronously creates or updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerConfigurationInfo Partner configuration information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,67 +75,67 @@ PartnerConfiguration createOrUpdate(String resourceGroupName, PartnerConfigurati Context context); /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return partner configuration information. */ - void delete(String resourceGroupName); + PartnerConfiguration update(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); /** - * Delete a partner configuration. + * Update a partner configuration. * - * Delete existing partner configuration. + * Synchronously updates a partner configuration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerConfigurationUpdateParameters Partner configuration update information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return partner configuration information. */ - void delete(String resourceGroupName, Context context); + PartnerConfiguration update(String resourceGroupName, + PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context); /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. */ - PartnerConfiguration update(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); + void delete(String resourceGroupName); /** - * Update a partner configuration. + * Delete a partner configuration. * - * Synchronously updates a partner configuration with the specified parameters. + * Delete existing partner configuration. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerConfigurationUpdateParameters Partner configuration update information. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. */ - PartnerConfiguration update(String resourceGroupName, - PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context); + void delete(String resourceGroupName, Context context); /** * List partner configurations under a resource group. * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -144,7 +148,7 @@ PartnerConfiguration update(String resourceGroupName, * * List all the partner configurations under a resource group. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -189,7 +193,7 @@ PartnerConfiguration update(String resourceGroupName, * * Authorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be authorized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -205,7 +209,7 @@ Response authorizePartnerWithResponse(String resourceGroup * * Authorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be authorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -219,7 +223,7 @@ Response authorizePartnerWithResponse(String resourceGroup * * Unauthorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be unauthorized. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,7 +239,7 @@ Response unauthorizePartnerWithResponse(String resourceGro * * Unauthorize a single partner either by partner registration immutable Id or by partner name. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerInfo The information of the partner to be unauthorized. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 70bf8ad7fbc7e..8c14002bf195c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -11,7 +11,6 @@ import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; import java.time.OffsetDateTime; import java.util.Map; -import java.util.UUID; /** * An immutable client-side representation of PartnerDestination. @@ -53,7 +52,7 @@ public interface PartnerDestination { Map tags(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -64,7 +63,7 @@ public interface PartnerDestination { * * @return the partnerRegistrationImmutableId value. */ - UUID partnerRegistrationImmutableId(); + String partnerRegistrationImmutableId(); /** * Gets the endpointServiceContext property: Endpoint context associated with this partner destination. @@ -183,7 +182,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -237,7 +236,7 @@ interface WithPartnerRegistrationImmutableId { * @param partnerRegistrationImmutableId The immutable Id of the corresponding partner registration. * @return the next definition stage. */ - WithCreate withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId); + WithCreate withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId); } /** 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 fbf60be2096c8..061d5460f12eb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class PartnerDestinationActivationState extends ExpandableStringEnum { /** - * Static value NeverActivated for PartnerDestinationActivationState. + * NeverActivated. */ public static final PartnerDestinationActivationState NEVER_ACTIVATED = fromString("NeverActivated"); /** - * Static value Activated for PartnerDestinationActivationState. + * Activated. */ public static final PartnerDestinationActivationState ACTIVATED = fromString("Activated"); 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 f33b92d16f4c0..df161e952b541 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -173,17 +173,6 @@ public List resourceMoveChangeHistory() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceMoveChangeHistory() != null) { - resourceMoveChangeHistory().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 fdcb370f4c334..f1fdb7870fc4e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,37 +13,37 @@ public final class PartnerDestinationProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for PartnerDestinationProvisioningState. + * Creating. */ public static final PartnerDestinationProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for PartnerDestinationProvisioningState. + * Updating. */ public static final PartnerDestinationProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for PartnerDestinationProvisioningState. + * Deleting. */ public static final PartnerDestinationProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for PartnerDestinationProvisioningState. + * Succeeded. */ public static final PartnerDestinationProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for PartnerDestinationProvisioningState. + * Canceled. */ public static final PartnerDestinationProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for PartnerDestinationProvisioningState. + * Failed. */ public static final PartnerDestinationProvisioningState FAILED = fromString("Failed"); /** - * Static value IdleDueToMirroredChannelResourceDeletion for PartnerDestinationProvisioningState. + * IdleDueToMirroredChannelResourceDeletion. */ public static final PartnerDestinationProvisioningState IDLE_DUE_TO_MIRRORED_CHANNEL_RESOURCE_DELETION = fromString("IdleDueToMirroredChannelResourceDeletion"); 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 2f941896d597a..cd72d15d1b281 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -48,14 +48,6 @@ public PartnerDestinationUpdateParameters withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java index 115b0559eca8e..5c491f047ca0c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,13 +17,15 @@ public interface PartnerDestinations { * * Get properties of a partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. + * @return a partner destination. + * + * Get properties of a partner destination along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String partnerDestinationName, Context context); @@ -33,12 +35,14 @@ Response getByResourceGroupWithResponse(String resourceGroup * * Get properties of a partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination. + * @return a partner destination. + * + * Get properties of a partner destination. */ PartnerDestination getByResourceGroup(String resourceGroupName, String partnerDestinationName); @@ -47,7 +51,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,7 +64,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * * Delete existing partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,21 +74,24 @@ Response getByResourceGroupWithResponse(String resourceGroup void delete(String resourceGroupName, String partnerDestinationName, Context context); /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List partner destinations under an Azure subscription. + * List partner destinations under a resource group. * - * List all the partner destinations under an Azure subscription. + * List all the partner destinations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -98,27 +105,25 @@ Response getByResourceGroupWithResponse(String resourceGroup * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List partner destinations under a resource group. + * List partner destinations under an Azure subscription. * - * List all the partner destinations under a resource group. + * List all the partner destinations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -132,15 +137,14 @@ Response getByResourceGroupWithResponse(String resourceGroup * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * Activate a partner destination. * * Activate a newly created partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,7 +160,7 @@ Response activateWithResponse(String resourceGroupName, Stri * * Activate a newly created partner destination. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerDestinationName Name of the partner destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -174,7 +178,9 @@ Response activateWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. + * @return a partner destination. + * + * Get properties of a partner destination along with {@link Response}. */ PartnerDestination getById(String id); @@ -188,7 +194,9 @@ Response activateWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner destination along with {@link Response}. + * @return a partner destination. + * + * Get properties of a partner destination along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 ef3b67ad290ac..009b35663c61e 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Information about the partner. */ -@Fluent +@Immutable public final class PartnerDetails implements JsonSerializable { /* * This is short description about the partner. The length of this description should not exceed 256 characters. @@ -36,7 +36,7 @@ public final class PartnerDetails implements JsonSerializable { /** * Creates an instance of PartnerDetails class. */ - public PartnerDetails() { + private PartnerDetails() { } /** @@ -49,18 +49,6 @@ public String description() { return this.description; } - /** - * Set the description property: This is short description about the partner. The length of this description should - * not exceed 256 characters. - * - * @param description the description value to set. - * @return the PartnerDetails object itself. - */ - public PartnerDetails withDescription(String description) { - this.description = description; - return this; - } - /** * Get the longDescription property: Long description for the partner's scenarios and integration.Length of this * description should not exceed 2048 characters. @@ -71,18 +59,6 @@ public String longDescription() { return this.longDescription; } - /** - * Set the longDescription property: Long description for the partner's scenarios and integration.Length of this - * description should not exceed 2048 characters. - * - * @param longDescription the longDescription value to set. - * @return the PartnerDetails object itself. - */ - public PartnerDetails withLongDescription(String longDescription) { - this.longDescription = longDescription; - return this; - } - /** * Get the setupUri property: URI of the partner website that can be used by Azure customers to setup Event Grid * integration on an event source. @@ -93,26 +69,6 @@ public String setupUri() { return this.setupUri; } - /** - * Set the setupUri property: URI of the partner website that can be used by Azure customers to setup Event Grid - * integration on an event source. - * - * @param setupUri the setupUri value to set. - * @return the PartnerDetails object itself. - */ - public PartnerDetails withSetupUri(String setupUri) { - this.setupUri = setupUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 9897765401044..b9c37b4e5ceef 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class PartnerEndpointType extends ExpandableStringEnum { /** - * Static value WebHook for PartnerEndpointType. + * WebHook. */ public static final PartnerEndpointType WEB_HOOK = fromString("WebHook"); 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 7b3f72617e3d4..4c71b868c6158 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -76,18 +76,6 @@ public PartnerEventSubscriptionDestination withResourceId(String resourceId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 3fd0a86eb5daa..a4ec91ed0f47e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -52,7 +52,7 @@ public interface PartnerNamespace { Map tags(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -207,7 +207,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); 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 cedf947081eeb..bbf35806ec9ec 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,32 +12,32 @@ */ public final class PartnerNamespaceProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for PartnerNamespaceProvisioningState. + * Creating. */ public static final PartnerNamespaceProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for PartnerNamespaceProvisioningState. + * Updating. */ public static final PartnerNamespaceProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for PartnerNamespaceProvisioningState. + * Deleting. */ public static final PartnerNamespaceProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for PartnerNamespaceProvisioningState. + * Succeeded. */ public static final PartnerNamespaceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for PartnerNamespaceProvisioningState. + * Canceled. */ public static final PartnerNamespaceProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for PartnerNamespaceProvisioningState. + * Failed. */ public static final PartnerNamespaceProvisioningState FAILED = fromString("Failed"); 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 db4b0d39c0723..7fc6a894cfd57 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -49,21 +48,6 @@ public PartnerNamespaceRegenerateKeyRequest withKeyName(String keyName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyName in model PartnerNamespaceRegenerateKeyRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PartnerNamespaceRegenerateKeyRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceSharedAccessKeys.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceSharedAccessKeys.java index f7a7602e2930a..d336129192a92 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceSharedAccessKeys.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceSharedAccessKeys.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 c9b60ceaa94f9..d6e0001b9375b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -172,17 +172,6 @@ public PartnerNamespaceUpdateParameters withDisableLocalAuth(Boolean disableLoca return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java index 0bd74417764ac..486d20552f3d8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,13 +17,15 @@ public interface PartnerNamespaces { * * Get properties of a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace along with {@link Response}. + * @return a partner namespace. + * + * Get properties of a partner namespace along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String partnerNamespaceName, Context context); @@ -33,12 +35,14 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * * Get properties of a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace. + * @return a partner namespace. + * + * Get properties of a partner namespace. */ PartnerNamespace getByResourceGroup(String resourceGroupName, String partnerNamespaceName); @@ -47,7 +51,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,7 +64,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * * Delete existing partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,21 +74,24 @@ Response getByResourceGroupWithResponse(String resourceGroupNa void delete(String resourceGroupName, String partnerNamespaceName, Context context); /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List partner namespaces under an Azure subscription. + * List partner namespaces under a resource group. * - * List all the partner namespaces under an Azure subscription. + * List all the partner namespaces under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -98,27 +105,25 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List partner namespaces under a resource group. + * List partner namespaces under an Azure subscription. * - * List all the partner namespaces under a resource group. + * List all the partner namespaces under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -132,15 +137,14 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * List keys for a partner namespace. * * List the two keys used to publish to a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,7 +160,7 @@ Response listSharedAccessKeysWithResponse(Stri * * List the two keys used to publish to a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -170,7 +174,7 @@ Response listSharedAccessKeysWithResponse(Stri * * Regenerate a shared access key for a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -187,7 +191,7 @@ Response regenerateKeyWithResponse(String reso * * Regenerate a shared access key for a partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,7 +211,9 @@ PartnerNamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace along with {@link Response}. + * @return a partner namespace. + * + * Get properties of a partner namespace along with {@link Response}. */ PartnerNamespace getById(String id); @@ -221,7 +227,9 @@ PartnerNamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner namespace along with {@link Response}. + * @return a partner namespace. + * + * Get properties of a partner namespace along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 ff89e48d53f64..6bceed13dd2ea 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -9,7 +9,6 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationInner; import java.util.Map; -import java.util.UUID; /** * An immutable client-side representation of PartnerRegistration. @@ -51,7 +50,7 @@ public interface PartnerRegistration { Map tags(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -70,7 +69,7 @@ public interface PartnerRegistration { * * @return the partnerRegistrationImmutableId value. */ - UUID partnerRegistrationImmutableId(); + String partnerRegistrationImmutableId(); /** * Gets the region of the resource. @@ -145,7 +144,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -198,7 +197,7 @@ interface WithPartnerRegistrationImmutableId { * Note: This property is marked for deprecation and is not supported in any future GA API version. * @return the next definition stage. */ - WithCreate withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId); + WithCreate withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId); } } 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 f5092fc10f932..2c30032df3543 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,32 +13,32 @@ public final class PartnerRegistrationProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for PartnerRegistrationProvisioningState. + * Creating. */ public static final PartnerRegistrationProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for PartnerRegistrationProvisioningState. + * Updating. */ public static final PartnerRegistrationProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for PartnerRegistrationProvisioningState. + * Deleting. */ public static final PartnerRegistrationProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for PartnerRegistrationProvisioningState. + * Succeeded. */ public static final PartnerRegistrationProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for PartnerRegistrationProvisioningState. + * Canceled. */ public static final PartnerRegistrationProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for PartnerRegistrationProvisioningState. + * Failed. */ public static final PartnerRegistrationProvisioningState FAILED = fromString("Failed"); 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 09e1008b0a2ed..95a0d51fad120 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -49,14 +49,6 @@ public PartnerRegistrationUpdateParameters withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java index 760c6d4adf180..48529202b84c3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,13 +17,15 @@ public interface PartnerRegistrations { * * Gets a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters along with {@link Response}. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String partnerRegistrationName, Context context); @@ -33,12 +35,14 @@ Response getByResourceGroupWithResponse(String resourceGrou * * Gets a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters. */ PartnerRegistration getByResourceGroup(String resourceGroupName, String partnerRegistrationName); @@ -47,7 +51,7 @@ Response getByResourceGroupWithResponse(String resourceGrou * * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,7 +64,7 @@ Response getByResourceGroupWithResponse(String resourceGrou * * Deletes a partner registration with the specified parameters. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerRegistrationName Name of the partner registration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,21 +74,24 @@ Response getByResourceGroupWithResponse(String resourceGrou void delete(String resourceGroupName, String partnerRegistrationName, Context context); /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List partner registrations under an Azure subscription. + * List partner registrations under a resource group. * - * List all the partner registrations under an Azure subscription. + * List all the partner registrations under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -98,27 +105,25 @@ Response getByResourceGroupWithResponse(String resourceGrou * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List partner registrations under a resource group. + * List partner registrations under an Azure subscription. * - * List all the partner registrations under a resource group. + * List all the partner registrations under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -132,8 +137,7 @@ Response getByResourceGroupWithResponse(String resourceGrou * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * Get a partner registration. @@ -144,7 +148,9 @@ PagedIterable listByResourceGroup(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters along with {@link Response}. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters along with {@link Response}. */ PartnerRegistration getById(String id); @@ -158,7 +164,9 @@ PagedIterable listByResourceGroup(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration with the specified parameters along with {@link Response}. + * @return a partner registration. + * + * Gets a partner registration with the specified parameters along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 2acafe873f699..cf5d7966cc301 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -11,7 +11,6 @@ import com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicInner; import java.time.OffsetDateTime; import java.util.Map; -import java.util.UUID; /** * An immutable client-side representation of PartnerTopic. @@ -53,25 +52,25 @@ public interface PartnerTopic { Map tags(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the identity property: Identity information for the Partner Topic resource. * - * @return the systemData value. + * @return the identity value. */ - SystemData systemData(); + IdentityInfo identity(); /** - * Gets the identity property: Identity information for the Partner Topic resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the identity value. + * @return the systemData value. */ - IdentityInfo identity(); + SystemData systemData(); /** * Gets the partnerRegistrationImmutableId property: The immutableId of the corresponding partner registration. * * @return the partnerRegistrationImmutableId value. */ - UUID partnerRegistrationImmutableId(); + String partnerRegistrationImmutableId(); /** * Gets the source property: Source associated with this partner topic. This represents a unique partner resource. @@ -200,7 +199,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -268,7 +267,7 @@ interface WithPartnerRegistrationImmutableId { * @param partnerRegistrationImmutableId The immutableId of the corresponding partner registration. * @return the next definition stage. */ - WithCreate withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId); + WithCreate withPartnerRegistrationImmutableId(String partnerRegistrationImmutableId); } /** 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 103b1ad457295..a007f42f88bdd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,17 +12,17 @@ */ public final class PartnerTopicActivationState extends ExpandableStringEnum { /** - * Static value NeverActivated for PartnerTopicActivationState. + * NeverActivated. */ public static final PartnerTopicActivationState NEVER_ACTIVATED = fromString("NeverActivated"); /** - * Static value Activated for PartnerTopicActivationState. + * Activated. */ public static final PartnerTopicActivationState ACTIVATED = fromString("Activated"); /** - * Static value Deactivated for PartnerTopicActivationState. + * Deactivated. */ public static final PartnerTopicActivationState DEACTIVATED = fromString("Deactivated"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicEventSubscriptions.java index 704d680fcf478..cdff9247a4400 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicEventSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -18,14 +18,16 @@ public interface PartnerTopicEventSubscriptions { * * Get properties of an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a partner topic along with {@link Response}. + * @return an event subscription of a partner topic. + * + * Get properties of an event subscription of a partner topic along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); @@ -35,13 +37,15 @@ Response getWithResponse(String resourceGroupName, String par * * Get properties of an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a partner topic. + * @return an event subscription of a partner topic. + * + * Get properties of an event subscription of a partner topic. */ EventSubscription get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); @@ -51,10 +55,9 @@ Response getWithResponse(String resourceGroupName, String par * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -70,10 +73,9 @@ EventSubscription createOrUpdate(String resourceGroupName, String partnerTopicNa * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,43 +86,14 @@ EventSubscription createOrUpdate(String resourceGroupName, String partnerTopicNa EventSubscription createOrUpdate(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); - - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); - /** * Update event subscription of a partner topic. * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -135,9 +108,9 @@ EventSubscription update(String resourceGroupName, String partnerTopicName, Stri * * Update an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,44 +122,40 @@ EventSubscription update(String resourceGroupName, String partnerTopicName, Stri EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription of a partner topic. + * Delete an event subscription of a partner topic. * - * Get the full endpoint URL for an event subscription of a partner topic. + * Delete an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a partner topic along with {@link Response}. */ - Response getFullUrlWithResponse(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName, Context context); + void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); /** - * Get full URL of an event subscription of a partner topic. + * Delete an event subscription of a partner topic. * - * Get the full endpoint URL for an event subscription of a partner topic. + * Delete an existing event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a partner topic. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerTopicName, - String eventSubscriptionName); + void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** * List event subscriptions of a partner topic. * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -200,7 +169,7 @@ EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerTopi * * List event subscriptions that belong to a specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -218,19 +187,58 @@ EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerTopi PagedIterable listByPartnerTopic(String resourceGroupName, String partnerTopicName, String filter, Integer top, Context context); + /** + * Get full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic along with {@link Response}. + */ + Response getFullUrlWithResponse(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName, Context context); + + /** + * Get full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param partnerTopicName Name of the partner topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a partner topic. + * + * Get the full endpoint URL for an event subscription of a partner topic. + */ + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerTopicName, + String eventSubscriptionName); + /** * Get delivery attributes for an event subscription of a partner topic. * * Get all delivery attributes for an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a partner topic along with {@link Response}. + * @return delivery attributes for an event subscription of a partner topic. + * + * Get all delivery attributes for an event subscription of a partner topic along with {@link Response}. */ Response getDeliveryAttributesWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); @@ -240,13 +248,15 @@ Response getDeliveryAttributesWithResponse(String r * * Get all delivery attributes for an event subscription of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a partner topic. + * @return delivery attributes for an event subscription of a partner topic. + * + * Get all delivery attributes for an event subscription of a partner topic. */ DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java index e4dc65552316d..244016015af0a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -171,17 +171,6 @@ public PartnerTopicInfo withSource(String source) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (eventTypeInfo() != null) { - eventTypeInfo().validate(); - } - } - /** * {@inheritDoc} */ 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 03395b9c77c80..17fb2bb97d060 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,37 +12,37 @@ */ public final class PartnerTopicProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for PartnerTopicProvisioningState. + * Creating. */ public static final PartnerTopicProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for PartnerTopicProvisioningState. + * Updating. */ public static final PartnerTopicProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for PartnerTopicProvisioningState. + * Deleting. */ public static final PartnerTopicProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for PartnerTopicProvisioningState. + * Succeeded. */ public static final PartnerTopicProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for PartnerTopicProvisioningState. + * Canceled. */ public static final PartnerTopicProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for PartnerTopicProvisioningState. + * Failed. */ public static final PartnerTopicProvisioningState FAILED = fromString("Failed"); /** - * Static value IdleDueToMirroredChannelResourceDeletion for PartnerTopicProvisioningState. + * IdleDueToMirroredChannelResourceDeletion. */ public static final PartnerTopicProvisioningState IDLE_DUE_TO_MIRRORED_CHANNEL_RESOURCE_DELETION = fromString("IdleDueToMirroredChannelResourceDeletion"); 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 f1e18ae405739..d99564f1e3c92 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -14,12 +14,12 @@ */ public final class PartnerTopicRoutingMode extends ExpandableStringEnum { /** - * Static value SourceEventAttribute for PartnerTopicRoutingMode. + * SourceEventAttribute. */ public static final PartnerTopicRoutingMode SOURCE_EVENT_ATTRIBUTE = fromString("SourceEventAttribute"); /** - * Static value ChannelNameHeader for PartnerTopicRoutingMode. + * ChannelNameHeader. */ public static final PartnerTopicRoutingMode CHANNEL_NAME_HEADER = fromString("ChannelNameHeader"); 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 49c9dbb7aac79..748471c524054 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -73,17 +73,6 @@ public PartnerTopicUpdateParameters withIdentity(IdentityInfo identity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopics.java index 58fe89dcb979e..17e0ff8e561a5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,13 +17,15 @@ public interface PartnerTopics { * * Get properties of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic along with {@link Response}. + * @return a partner topic. + * + * Get properties of a partner topic along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String partnerTopicName, Context context); @@ -33,12 +35,14 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * * Get properties of a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic. + * @return a partner topic. + * + * Get properties of a partner topic. */ PartnerTopic getByResourceGroup(String resourceGroupName, String partnerTopicName); @@ -47,7 +51,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,7 +64,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * * Delete existing partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,21 +74,24 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void delete(String resourceGroupName, String partnerTopicName, Context context); /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List partner topics under an Azure subscription. + * List partner topics under a resource group. * - * List all the partner topics under an Azure subscription. + * List all the partner topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -98,27 +105,25 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List partner topics under a resource group. + * List partner topics under an Azure subscription. * - * List all the partner topics under a resource group. + * List all the partner topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -132,15 +137,14 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * Activate a partner topic. * * Activate a newly created partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -155,7 +159,7 @@ PagedIterable listByResourceGroup(String resourceGroupName, String * * Activate a newly created partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -169,7 +173,7 @@ PagedIterable listByResourceGroup(String resourceGroupName, String * * Deactivate specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +188,7 @@ PagedIterable listByResourceGroup(String resourceGroupName, String * * Deactivate specific partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param partnerTopicName Name of the partner topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -202,7 +206,9 @@ PagedIterable listByResourceGroup(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic along with {@link Response}. + * @return a partner topic. + * + * Get properties of a partner topic along with {@link Response}. */ PartnerTopic getById(String id); @@ -216,7 +222,9 @@ PagedIterable listByResourceGroup(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a partner topic along with {@link Response}. + * @return a partner topic. + * + * Get properties of a partner topic along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 1561fa4ae1475..37c959a04e462 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -36,14 +36,6 @@ public PartnerEndpointType endpointType() { return this.endpointType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 a58f77e70fd1e..67336321f0be9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -47,17 +47,6 @@ public PartnerUpdateTopicInfo withEventTypeInfo(EventTypeInfo eventTypeInfo) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (eventTypeInfo() != null) { - eventTypeInfo().validate(); - } - } - /** * {@inheritDoc} */ 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 2e70b12a1b8b5..2ee7a70a05c2d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -34,7 +34,7 @@ public interface PermissionBinding { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -115,7 +115,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, namespaceName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @return the next definition stage. */ 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 1d4b3e93984da..d65e93dff0159 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,37 +12,37 @@ */ public final class PermissionBindingProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for PermissionBindingProvisioningState. + * Creating. */ public static final PermissionBindingProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for PermissionBindingProvisioningState. + * Updating. */ public static final PermissionBindingProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for PermissionBindingProvisioningState. + * Deleting. */ public static final PermissionBindingProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for PermissionBindingProvisioningState. + * Succeeded. */ public static final PermissionBindingProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for PermissionBindingProvisioningState. + * Canceled. */ public static final PermissionBindingProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for PermissionBindingProvisioningState. + * Failed. */ public static final PermissionBindingProvisioningState FAILED = fromString("Failed"); /** - * Static value Deleted for PermissionBindingProvisioningState. + * Deleted. */ public static final PermissionBindingProvisioningState DELETED = fromString("Deleted"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindings.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindings.java index 73658cbdd69ee..a44ce32cd2512 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindings.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,14 +17,16 @@ public interface PermissionBindings { * * Get properties of a permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding along with {@link Response}. + * @return a permission binding. + * + * Get properties of a permission binding along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName, Context context); @@ -34,13 +36,15 @@ Response getWithResponse(String resourceGroupName, String nam * * Get properties of a permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding. + * @return a permission binding. + * + * Get properties of a permission binding. */ PermissionBinding get(String resourceGroupName, String namespaceName, String permissionBindingName); @@ -49,7 +53,7 @@ Response getWithResponse(String resourceGroupName, String nam * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,7 +67,7 @@ Response getWithResponse(String resourceGroupName, String nam * * Delete an existing permission binding. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param permissionBindingName Name of the permission binding. * @param context The context to associate with this operation. @@ -78,12 +82,12 @@ Response getWithResponse(String resourceGroupName, String nam * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Permission Binding operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -92,7 +96,7 @@ Response getWithResponse(String resourceGroupName, String nam * * Get all the permission bindings under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -105,7 +109,7 @@ Response getWithResponse(String resourceGroupName, String nam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Permission Binding operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context); @@ -119,7 +123,9 @@ PagedIterable listByNamespace(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding along with {@link Response}. + * @return a permission binding. + * + * Get properties of a permission binding along with {@link Response}. */ PermissionBinding getById(String id); @@ -133,7 +139,9 @@ PagedIterable listByNamespace(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a permission binding along with {@link Response}. + * @return a permission binding. + * + * Get properties of a permission binding along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 dd26e37ec6ab7..c8c20f5965a9c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class PermissionType extends ExpandableStringEnum { /** - * Static value Publisher for PermissionType. + * Publisher. */ public static final PermissionType PUBLISHER = fromString("Publisher"); /** - * Static value Subscriber for PermissionType. + * Subscriber. */ public static final PermissionType SUBSCRIBER = fromString("Subscriber"); 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 f42cc72d27b78..e7582c210f2e5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,22 +12,22 @@ */ public final class PersistedConnectionStatus extends ExpandableStringEnum { /** - * Static value Pending for PersistedConnectionStatus. + * Pending. */ public static final PersistedConnectionStatus PENDING = fromString("Pending"); /** - * Static value Approved for PersistedConnectionStatus. + * Approved. */ public static final PersistedConnectionStatus APPROVED = fromString("Approved"); /** - * Static value Rejected for PersistedConnectionStatus. + * Rejected. */ public static final PersistedConnectionStatus REJECTED = fromString("Rejected"); /** - * Static value Disconnected for PersistedConnectionStatus. + * Disconnected. */ public static final PersistedConnectionStatus DISCONNECTED = fromString("Disconnected"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PlatformCapabilities.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PlatformCapabilities.java new file mode 100644 index 0000000000000..165c0126fd71a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PlatformCapabilities.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Platform capabilities properties of the resource. + */ +@Fluent +public final class PlatformCapabilities implements JsonSerializable { + /* + * Represents the Azure Confidential Compute properties of the resource. + */ + private ConfidentialCompute confidentialCompute; + + /** + * Creates an instance of PlatformCapabilities class. + */ + public PlatformCapabilities() { + } + + /** + * Get the confidentialCompute property: Represents the Azure Confidential Compute properties of the resource. + * + * @return the confidentialCompute value. + */ + public ConfidentialCompute confidentialCompute() { + return this.confidentialCompute; + } + + /** + * Set the confidentialCompute property: Represents the Azure Confidential Compute properties of the resource. + * + * @param confidentialCompute the confidentialCompute value to set. + * @return the PlatformCapabilities object itself. + */ + public PlatformCapabilities withConfidentialCompute(ConfidentialCompute confidentialCompute) { + this.confidentialCompute = confidentialCompute; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("confidentialCompute", this.confidentialCompute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformCapabilities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformCapabilities 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 PlatformCapabilities. + */ + public static PlatformCapabilities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformCapabilities deserializedPlatformCapabilities = new PlatformCapabilities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("confidentialCompute".equals(fieldName)) { + deserializedPlatformCapabilities.confidentialCompute = ConfidentialCompute.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformCapabilities; + }); + } +} 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 3caec036f3940..7306080692e2c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -47,14 +47,6 @@ public PrivateEndpoint withId(String id) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnection.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnection.java index 13da5ca21d506..56e3a20fd6e73 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnection.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnection.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; import java.util.List; @@ -32,6 +33,13 @@ public interface PrivateEndpointConnection { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the privateEndpoint property: The Private Endpoint resource for this Connection. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnections.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnections.java index 8ef055c15429d..43ae9c3bcba1a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnections.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -18,18 +18,21 @@ public interface PrivateEndpointConnections { * * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along - * with {@link Response}. + * @return a specific private endpoint connection. + * + * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace along with + * {@link Response}. */ Response getWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, @@ -40,16 +43,19 @@ Response getWithResponse(String resourceGroupName, * * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace. + * @return a specific private endpoint connection. + * + * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. */ PrivateEndpointConnection get(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName); @@ -59,17 +65,18 @@ PrivateEndpointConnection get(String resourceGroupName, PrivateEndpointConnectio * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ PrivateEndpointConnection update(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, @@ -80,18 +87,19 @@ PrivateEndpointConnection update(String resourceGroupName, PrivateEndpointConnec * * Update a specific private endpoint connection under a topic, domain or partner namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ PrivateEndpointConnection update(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, @@ -102,12 +110,13 @@ PrivateEndpointConnection update(String resourceGroupName, PrivateEndpointConnec * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -120,12 +129,13 @@ void delete(String resourceGroupName, PrivateEndpointConnectionsParentType paren * * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). - * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', + * or \'partnerNamespaces\' or \'namespaces\'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,16 +149,16 @@ void delete(String resourceGroupName, PrivateEndpointConnectionsParentType paren * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated - * response with {@link PagedIterable}. + * @return result of the list of all private endpoint connections operation as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResource(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName); @@ -158,9 +168,9 @@ PagedIterable listByResource(String resourceGroupName * * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -174,8 +184,8 @@ PagedIterable listByResource(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated - * response with {@link PagedIterable}. + * @return result of the list of all private endpoint connections operation as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResource(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String filter, Integer top, 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 eed92653cb9ba..d895d4ebb8f11 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,22 +13,22 @@ public final class PrivateEndpointConnectionsParentType extends ExpandableStringEnum { /** - * Static value topics for PrivateEndpointConnectionsParentType. + * topics. */ public static final PrivateEndpointConnectionsParentType TOPICS = fromString("topics"); /** - * Static value domains for PrivateEndpointConnectionsParentType. + * domains. */ public static final PrivateEndpointConnectionsParentType DOMAINS = fromString("domains"); /** - * Static value partnerNamespaces for PrivateEndpointConnectionsParentType. + * partnerNamespaces. */ public static final PrivateEndpointConnectionsParentType PARTNER_NAMESPACES = fromString("partnerNamespaces"); /** - * Static value namespaces for PrivateEndpointConnectionsParentType. + * namespaces. */ public static final PrivateEndpointConnectionsParentType NAMESPACES = fromString("namespaces"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResource.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResource.java index 81575dabfe9a2..bd4f0f45c76f1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResource.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,21 +12,24 @@ */ public interface PrivateLinkResource { /** - * Gets the id property: Fully qualified identifier of the resource. + * Gets the id property: Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. * * @return the id value. */ String id(); /** - * Gets the name property: Name of the resource. + * Gets the name property: The name of private link resource will be either topic, domain, partnerNamespace or + * namespace. * * @return the name value. */ String name(); /** - * Gets the type property: Type of the resource. + * Gets the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts". * * @return the type value. */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java index 01f62ee571f58..5a332a0c69acd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,9 +17,9 @@ public interface PrivateLinkResources { * * Get properties of a private link resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace @@ -28,7 +28,9 @@ public interface PrivateLinkResources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a private link resource along with {@link Response}. + * @return a private link resource. + * + * Get properties of a private link resource along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String parentType, String parentName, String privateLinkResourceName, Context context); @@ -38,9 +40,9 @@ Response getWithResponse(String resourceGroupName, String p * * Get properties of a private link resource. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner * namespace name or namespace name). * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace @@ -48,7 +50,9 @@ Response getWithResponse(String resourceGroupName, String p * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a private link resource. + * @return a private link resource. + * + * Get properties of a private link resource. */ PrivateLinkResource get(String resourceGroupName, String parentType, String parentName, String privateLinkResourceName); @@ -58,11 +62,11 @@ PrivateLinkResource get(String resourceGroupName, String parentType, String pare * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -75,11 +79,11 @@ PrivateLinkResource get(String resourceGroupName, String parentType, String pare * * List all the private link resources under a topic, domain, or partner namespace or namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\' or \'namespaces\'. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or + * \\'partnerNamespaces\\' or \\'namespaces\\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace or namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic 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 0756cad18dc4c..2d252712d7cbc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -14,17 +14,17 @@ */ public final class PublicNetworkAccess extends ExpandableStringEnum { /** - * Static value Enabled for PublicNetworkAccess. + * Enabled. */ public static final PublicNetworkAccess ENABLED = fromString("Enabled"); /** - * Static value Disabled for PublicNetworkAccess. + * Disabled. */ public static final PublicNetworkAccess DISABLED = fromString("Disabled"); /** - * Static value SecuredByPerimeter for PublicNetworkAccess. + * SecuredByPerimeter. */ public static final PublicNetworkAccess SECURED_BY_PERIMETER = fromString("SecuredByPerimeter"); 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 306944b4c63c6..070c255b9e032 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class PublisherType extends ExpandableStringEnum { /** - * Static value Custom for PublisherType. + * Custom. */ public static final PublisherType CUSTOM = fromString("Custom"); 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 55b3370194f5b..18a86bdfa29bd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -221,23 +221,6 @@ public PushInfo withDestination(EventSubscriptionDestination destination) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deadLetterDestinationWithResourceIdentity() != null) { - deadLetterDestinationWithResourceIdentity().validate(); - } - if (deliveryWithResourceIdentity() != null) { - deliveryWithResourceIdentity().validate(); - } - if (destination() != null) { - destination().validate(); - } - } - /** * {@inheritDoc} */ 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 792dacda03042..0174eed97f0da 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -200,17 +200,6 @@ public QueueInfo withEventTimeToLive(Duration eventTimeToLive) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deadLetterDestinationWithResourceIdentity() != null) { - deadLetterDestinationWithResourceIdentity().validate(); - } - } - /** * {@inheritDoc} */ 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 eac08334912a4..861f404e209b5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class ReadinessState extends ExpandableStringEnum { /** - * Static value NeverActivated for ReadinessState. + * NeverActivated. */ public static final ReadinessState NEVER_ACTIVATED = fromString("NeverActivated"); /** - * Static value Activated for ReadinessState. + * Activated. */ public static final ReadinessState ACTIVATED = fromString("Activated"); 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 2c79d74ddb92b..ff6cf5dcf52b0 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Nsp resource association. */ -@Fluent +@Immutable public final class ResourceAssociation implements JsonSerializable { /* * Association name @@ -29,7 +29,7 @@ public final class ResourceAssociation implements JsonSerializable { /** - * Static value Azure for ResourceKind. + * Azure. */ public static final ResourceKind AZURE = fromString("Azure"); /** - * Static value AzureArc for ResourceKind. + * AzureArc. */ public static final ResourceKind AZURE_ARC = fromString("AzureArc"); 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 2f8c53a3438d3..9c6cd00fe2a3c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -100,14 +100,6 @@ public ResourceMoveChangeHistory withChangedTimeUtc(OffsetDateTime changedTimeUt return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 d167368ee78ac..5ada6c537949e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,32 +12,32 @@ */ public final class ResourceProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for ResourceProvisioningState. + * Creating. */ public static final ResourceProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for ResourceProvisioningState. + * Updating. */ public static final ResourceProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for ResourceProvisioningState. + * Deleting. */ public static final ResourceProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for ResourceProvisioningState. + * Succeeded. */ public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for ResourceProvisioningState. + * Canceled. */ public static final ResourceProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for ResourceProvisioningState. + * Failed. */ public static final ResourceProvisioningState FAILED = fromString("Failed"); 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 a57c01c8cac64..3e81d5153ce4d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class ResourceRegionType extends ExpandableStringEnum { /** - * Static value RegionalResource for ResourceRegionType. + * RegionalResource. */ public static final ResourceRegionType REGIONAL_RESOURCE = fromString("RegionalResource"); /** - * Static value GlobalResource for ResourceRegionType. + * GlobalResource. */ public static final ResourceRegionType GLOBAL_RESOURCE = fromString("GlobalResource"); 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 f462aefc5dee2..428b545181e33 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -47,14 +47,6 @@ public ResourceSku withName(Sku name) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 437e5642f1df7..7e318c5e7663d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,14 +72,6 @@ public RetryPolicy withEventTimeToLiveInMinutes(Integer eventTimeToLiveInMinutes return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 7bc79753067a7..934a34f2f2624 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -73,20 +73,6 @@ public RoutingEnrichments withDynamic(List dynamic) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (staticProperty() != null) { - staticProperty().forEach(e -> e.validate()); - } - if (dynamic() != null) { - dynamic().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 4ca8a0e5f8ab4..bf978aa222575 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,14 +72,6 @@ public RoutingIdentityInfo withUserAssignedIdentity(String userAssignedIdentity) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 9d7051b0d2775..96b9e6532630c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,17 +12,17 @@ */ public final class RoutingIdentityType extends ExpandableStringEnum { /** - * Static value None for RoutingIdentityType. + * None. */ public static final RoutingIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for RoutingIdentityType. + * SystemAssigned. */ public static final RoutingIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for RoutingIdentityType. + * UserAssigned. */ public static final RoutingIdentityType USER_ASSIGNED = fromString("UserAssigned"); 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 bd8a059571bb1..5ee4a96507088 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -101,18 +101,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 3139d0a26227a..60fdf6a023a1d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -101,18 +101,6 @@ public List deliveryAttributeMappings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 794aeca1c8eed..f47342ed4d075 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class Sku extends ExpandableStringEnum { /** - * Static value Basic for Sku. + * Basic. */ public static final Sku BASIC = fromString("Basic"); /** - * Static value Premium for Sku. + * Premium. */ public static final Sku PREMIUM = fromString("Premium"); 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 24be19cb6db8d..c12b5d6f32505 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class SkuName extends ExpandableStringEnum { /** - * Static value Standard for SkuName. + * Standard. */ public static final SkuName STANDARD = fromString("Standard"); 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 50bfff5d1d731..1ff1944ff4ae9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -106,18 +106,6 @@ public StaticDeliveryAttributeMapping withIsSecret(Boolean isSecret) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 45b486558bb1a..d75ac3caa6fdd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -61,14 +61,6 @@ public StaticRoutingEnrichment withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 3c42a1ebef62b..c1b6db9043903 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,7 +12,7 @@ */ public final class StaticRoutingEnrichmentType extends ExpandableStringEnum { /** - * Static value String for StaticRoutingEnrichmentType. + * String. */ public static final StaticRoutingEnrichmentType STRING = fromString("String"); 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 0dff06b61a970..d6922e2fedc2e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -70,15 +70,6 @@ public StaticStringRoutingEnrichment withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 f2b65c8dc84b1..eb1608c974c7e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -101,18 +101,6 @@ public StorageBlobDeadLetterDestination withBlobContainerName(String blobContain return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 80ae7881c2902..06622c20f69d3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -129,18 +129,6 @@ public Long queueMessageTimeToLiveInSeconds() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 45c66fbc63fec..4788aba544687 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringBeginsWithAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 e746a1826c2cd..387a8ec404cba 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringBeginsWithFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 b70d6948a0ce0..020f67b8da7e8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringContainsAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 eeacaaabb2bb7..cf2df9edfbeda 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringContainsFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 24e369e3b1185..5825244825274 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringEndsWithAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 b42a5c0f1ce2a..16e208baa446d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringEndsWithFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 fde5e5c0b42ab..11948d5357d11 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringInAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 79a4ba57eb54b..abcb330f90ab5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringInFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 87852c6d7bf60..7db5a9b002e23 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringNotBeginsWithAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 f891b468744d3..beacdf7a1e51e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringNotBeginsWithFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 3734d7208716c..8ed1d0a600ac9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringNotContainsAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 fcc33951160f9..b1316e2c29c3b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringNotContainsFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 32d597433091e..f14608d652cb9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringNotEndsWithAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 dccad82d21e02..a7237bbd38760 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringNotEndsWithFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 b6f76fc5b0fb0..72c5e9f74ce85 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringNotInAdvancedFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 8d9501afd19ff..d8b421fd83613 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,15 +72,6 @@ public StringNotInFilter withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ 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 a20a759206ea7..65e5cc8713623 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -37,7 +37,7 @@ public interface Subscription { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -123,7 +123,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, namespaceName, topicName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicName Name of the namespace topic. * @return the next definition stage. @@ -345,7 +345,9 @@ interface WithExpirationTimeUtc { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic along with {@link Response}. + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic along with {@link Response}. */ Response getDeliveryAttributesWithResponse(Context context); @@ -356,7 +358,9 @@ interface WithExpirationTimeUtc { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription of a namespace topic. + * @return delivery attributes for an event subscription of a namespace topic. + * + * Get all delivery attributes for an event subscription of a namespace topic. */ DeliveryAttributeListResult getDeliveryAttributes(); @@ -369,7 +373,9 @@ interface WithExpirationTimeUtc { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. */ Response getFullUrlWithResponse(Context context); @@ -380,7 +386,9 @@ interface WithExpirationTimeUtc { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a namespace topic. + * @return full URL of an event subscription of a namespace topic. + * + * Get the full endpoint URL for an event subscription of a namespace topic. */ SubscriptionFullUrl getFullUrl(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionFullUrl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionFullUrl.java index 49f7c3d064530..2ff1bfb90651d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionFullUrl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionFullUrl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 94a24d51fd706..a6cae0eb6e262 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,57 +12,57 @@ */ public final class SubscriptionProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for SubscriptionProvisioningState. + * Creating. */ public static final SubscriptionProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for SubscriptionProvisioningState. + * Updating. */ public static final SubscriptionProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for SubscriptionProvisioningState. + * Deleting. */ public static final SubscriptionProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for SubscriptionProvisioningState. + * Succeeded. */ public static final SubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for SubscriptionProvisioningState. + * Canceled. */ public static final SubscriptionProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for SubscriptionProvisioningState. + * Failed. */ public static final SubscriptionProvisioningState FAILED = fromString("Failed"); /** - * Static value AwaitingManualAction for SubscriptionProvisioningState. + * AwaitingManualAction. */ public static final SubscriptionProvisioningState AWAITING_MANUAL_ACTION = fromString("AwaitingManualAction"); /** - * Static value Deleted for SubscriptionProvisioningState. + * Deleted. */ public static final SubscriptionProvisioningState DELETED = fromString("Deleted"); /** - * Static value DeleteFailed for SubscriptionProvisioningState. + * DeleteFailed. */ public static final SubscriptionProvisioningState DELETE_FAILED = fromString("DeleteFailed"); /** - * Static value CreateFailed for SubscriptionProvisioningState. + * CreateFailed. */ public static final SubscriptionProvisioningState CREATE_FAILED = fromString("CreateFailed"); /** - * Static value UpdatedFailed for SubscriptionProvisioningState. + * UpdatedFailed. */ public static final SubscriptionProvisioningState UPDATED_FAILED = fromString("UpdatedFailed"); 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 f6c87dc649832..307927963646d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -154,17 +154,6 @@ public SubscriptionUpdateParameters withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 78ac3058910a4..4e51af04ad7e7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -50,18 +50,18 @@ public interface SystemTopic { Map tags(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the identity property: Identity information for the resource. * - * @return the systemData value. + * @return the identity value. */ - SystemData systemData(); + IdentityInfo identity(); /** - * Gets the identity property: Identity information for the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the identity value. + * @return the systemData value. */ - IdentityInfo identity(); + SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the system topic. @@ -91,6 +91,22 @@ public interface SystemTopic { */ String metricResourceId(); + /** + * Gets the encryption property: Key encryption configuration properties of the system topic resource. This is an + * optional property. When not specified, no key encryption is used. + * + * @return the encryption value. + */ + KeyEncryption encryption(); + + /** + * Gets the platformCapabilities property: Represents the platform capabilities of the resource, including Azure + * Confidential Compute related properties. + * + * @return the platformCapabilities value. + */ + PlatformCapabilities platformCapabilities(); + /** * Gets the region of the resource. * @@ -164,7 +180,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -174,8 +190,9 @@ interface WithResourceGroup { * The stage of the SystemTopic definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithSource, DefinitionStages.WithTopicType { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithSource, + DefinitionStages.WithTopicType, DefinitionStages.WithEncryption, DefinitionStages.WithPlatformCapabilities { /** * Executes the create request. * @@ -243,6 +260,36 @@ interface WithTopicType { */ WithCreate withTopicType(String topicType); } + + /** + * The stage of the SystemTopic definition allowing to specify encryption. + */ + interface WithEncryption { + /** + * Specifies the encryption property: Key encryption configuration properties of the system topic resource. + * This is an optional property. When not specified, no key encryption is used.. + * + * @param encryption Key encryption configuration properties of the system topic resource. This is an + * optional property. When not specified, no key encryption is used. + * @return the next definition stage. + */ + WithCreate withEncryption(KeyEncryption encryption); + } + + /** + * The stage of the SystemTopic definition allowing to specify platformCapabilities. + */ + interface WithPlatformCapabilities { + /** + * Specifies the platformCapabilities property: Represents the platform capabilities of the resource, + * including Azure Confidential Compute related properties.. + * + * @param platformCapabilities Represents the platform capabilities of the resource, including Azure + * Confidential Compute related properties. + * @return the next definition stage. + */ + WithCreate withPlatformCapabilities(PlatformCapabilities platformCapabilities); + } } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java index c25f9daf5b4a7..b2119e2a32274 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,52 +13,21 @@ * Resource collection API of SystemTopicEventSubscriptions. */ public interface SystemTopicEventSubscriptions { - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription along with {@link Response}. - */ - Response getDeliveryAttributesWithResponse(String resourceGroupName, - String systemTopicName, String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription. - */ - DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String systemTopicName, - String eventSubscriptionName); - /** * Get an event subscription of a system topic. * * Get an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription along with {@link Response}. + * @return an event subscription of a system topic. + * + * Get an event subscription along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); @@ -68,13 +37,15 @@ Response getWithResponse(String resourceGroupName, String sys * * Get an event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription. + * @return an event subscription of a system topic. + * + * Get an event subscription. */ EventSubscription get(String resourceGroupName, String systemTopicName, String eventSubscriptionName); @@ -84,10 +55,9 @@ Response getWithResponse(String resourceGroupName, String sys * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -103,10 +73,9 @@ EventSubscription createOrUpdate(String resourceGroupName, String systemTopicNam * Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -117,43 +86,14 @@ EventSubscription createOrUpdate(String resourceGroupName, String systemTopicNam EventSubscription createOrUpdate(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName); - - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); - /** * Update event subscription of a system topic. * * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -168,9 +108,9 @@ EventSubscription update(String resourceGroupName, String systemTopicName, Strin * * Update an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,43 +122,40 @@ EventSubscription update(String resourceGroupName, String systemTopicName, Strin EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Get the full endpoint URL for an event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a system topic along with {@link Response}. */ - Response getFullUrlWithResponse(String resourceGroupName, String systemTopicName, - String eventSubscriptionName, Context context); + void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName); /** - * Get full URL of an event subscription of a system topic. + * Delete an event subscription of a system topic. * - * Get the full endpoint URL for an event subscription of a system topic. + * Delete an existing event subscription of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription of a system topic. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String systemTopicName, String eventSubscriptionName); + void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** * List event subscriptions of a system topic. * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -232,7 +169,7 @@ Response getFullUrlWithResponse(String resourceGroupNa * * List event subscriptions that belong to a specific system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -249,4 +186,77 @@ Response getFullUrlWithResponse(String resourceGroupNa */ PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription along with {@link Response}. + */ + Response getDeliveryAttributesWithResponse(String resourceGroupName, + String systemTopicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription. + * + * Get all delivery attributes for an event subscription. + */ + DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String systemTopicName, + String eventSubscriptionName); + + /** + * Get full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic along with {@link Response}. + */ + Response getFullUrlWithResponse(String resourceGroupName, String systemTopicName, + String eventSubscriptionName, Context context); + + /** + * Get full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription of a system topic. + * + * Get the full endpoint URL for an event subscription of a system topic. + */ + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String systemTopicName, String eventSubscriptionName); } 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 ddbe3be5339d6..f51d77ee95d7e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -73,17 +73,6 @@ public SystemTopicUpdateParameters withIdentity(IdentityInfo identity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java index 171911e4adb15..b633b93981dbd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,13 +17,15 @@ public interface SystemTopics { * * Get properties of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic along with {@link Response}. + * @return a system topic. + * + * Get properties of a system topic along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String systemTopicName, Context context); @@ -33,12 +35,14 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * * Get properties of a system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic. + * @return a system topic. + * + * Get properties of a system topic. */ SystemTopic getByResourceGroup(String resourceGroupName, String systemTopicName); @@ -47,7 +51,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,7 +64,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * * Delete existing system topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param systemTopicName Name of the system topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,21 +74,24 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void delete(String resourceGroupName, String systemTopicName, Context context); /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List system topics under an Azure subscription. + * List system topics under a resource group. * - * List all the system topics under an Azure subscription. + * List all the system topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -98,27 +105,25 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, + Context context); /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List system topics under a resource group. + * List system topics under an Azure subscription. * - * List all the system topics under a resource group. + * List all the system topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -132,8 +137,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List System topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, - Context context); + PagedIterable list(String filter, Integer top, Context context); /** * Get a system topic. @@ -144,7 +148,9 @@ PagedIterable listByResourceGroup(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic along with {@link Response}. + * @return a system topic. + * + * Get properties of a system topic along with {@link Response}. */ SystemTopic getById(String id); @@ -158,7 +164,9 @@ PagedIterable listByResourceGroup(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a system topic along with {@link Response}. + * @return a system topic. + * + * Get properties of a system topic along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 7688c19bf9bd6..1cd0f2fb33f06 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,20 +12,25 @@ */ public final class TlsVersion extends ExpandableStringEnum { /** - * Static value 1.0 for TlsVersion. + * 1.0. */ public static final TlsVersion ONE_ZERO = fromString("1.0"); /** - * Static value 1.1 for TlsVersion. + * 1.1. */ public static final TlsVersion ONE_ONE = fromString("1.1"); /** - * Static value 1.2 for TlsVersion. + * 1.2. */ public static final TlsVersion ONE_TWO = fromString("1.2"); + /** + * TLS version 1.3. + */ + public static final TlsVersion ONE_THREE = fromString("1.3"); + /** * Creates a new instance of TlsVersion value. * 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 08919558ad437..156a699aa2373 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -80,7 +80,7 @@ public interface Topic { ExtendedLocation extendedLocation(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -182,6 +182,22 @@ public interface Topic { */ DataResidencyBoundary dataResidencyBoundary(); + /** + * Gets the encryption property: Key encryption configuration properties of the topic resource. This is an optional + * property. When not specified, no key encryption is used. + * + * @return the encryption value. + */ + KeyEncryption encryption(); + + /** + * Gets the platformCapabilities property: Represents the platform capabilities of the resource, including Azure + * Confidential Compute related properties. + * + * @return the platformCapabilities value. + */ + PlatformCapabilities platformCapabilities(); + /** * Gets the region of the resource. * @@ -255,7 +271,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -270,7 +286,8 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku DefinitionStages.WithMinimumTlsVersionAllowed, DefinitionStages.WithInputSchema, DefinitionStages.WithInputSchemaMapping, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithInboundIpRules, DefinitionStages.WithDisableLocalAuth, - DefinitionStages.WithDataResidencyBoundary { + DefinitionStages.WithDataResidencyBoundary, DefinitionStages.WithEncryption, + DefinitionStages.WithPlatformCapabilities { /** * Executes the create request. * @@ -478,6 +495,36 @@ interface WithDataResidencyBoundary { */ WithCreate withDataResidencyBoundary(DataResidencyBoundary dataResidencyBoundary); } + + /** + * The stage of the Topic definition allowing to specify encryption. + */ + interface WithEncryption { + /** + * Specifies the encryption property: Key encryption configuration properties of the topic resource. This is + * an optional property. When not specified, no key encryption is used.. + * + * @param encryption Key encryption configuration properties of the topic resource. This is an optional + * property. When not specified, no key encryption is used. + * @return the next definition stage. + */ + WithCreate withEncryption(KeyEncryption encryption); + } + + /** + * The stage of the Topic definition allowing to specify platformCapabilities. + */ + interface WithPlatformCapabilities { + /** + * Specifies the platformCapabilities property: Represents the platform capabilities of the resource, + * including Azure Confidential Compute related properties.. + * + * @param platformCapabilities Represents the platform capabilities of the resource, including Azure + * Confidential Compute related properties. + * @return the next definition stage. + */ + WithCreate withPlatformCapabilities(PlatformCapabilities platformCapabilities); + } } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java index f52aac8736061..62c5a9c59b248 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,52 +13,21 @@ * Resource collection API of TopicEventSubscriptions. */ public interface TopicEventSubscriptions { - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for topic along with {@link Response}. - */ - Response getDeliveryAttributesWithResponse(String resourceGroupName, String topicName, - String eventSubscriptionName, Context context); - - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all delivery attributes for an event subscription for topic. - */ - DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String topicName, - String eventSubscriptionName); - /** * Get an event subscription of a topic. * * Get properties of an event subscription of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a topic along with {@link Response}. + * @return an event subscription of a topic. + * + * Get properties of an event subscription of a topic along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, Context context); @@ -68,13 +37,15 @@ Response getWithResponse(String resourceGroupName, String top * * Get properties of an event subscription of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an event subscription of a topic. + * @return an event subscription of a topic. + * + * Get properties of an event subscription of a topic. */ EventSubscription get(String resourceGroupName, String topicName, String eventSubscriptionName); @@ -83,10 +54,9 @@ Response getWithResponse(String resourceGroupName, String top * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,10 +71,9 @@ EventSubscription createOrUpdate(String resourceGroupName, String topicName, Str * * Asynchronously creates a new event subscription or updates an existing event subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 64 characters in length and use alphanumeric letters only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,43 +84,14 @@ EventSubscription createOrUpdate(String resourceGroupName, String topicName, Str EventSubscription createOrUpdate(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String topicName, String eventSubscriptionName); - - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context); - /** * Update an event subscription for a topic. * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -166,9 +106,9 @@ EventSubscription update(String resourceGroupName, String topicName, String even * * Update an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be updated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @param eventSubscriptionUpdateParameters Updated event subscription information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,43 +120,40 @@ EventSubscription update(String resourceGroupName, String topicName, String even EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context); /** - * Get full URL of an event subscription for topic. + * Delete an event subscription for a topic. * - * Get the full endpoint URL for an event subscription for topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for topic along with {@link Response}. */ - Response getFullUrlWithResponse(String resourceGroupName, String topicName, - String eventSubscriptionName, Context context); + void delete(String resourceGroupName, String topicName, String eventSubscriptionName); /** - * Get full URL of an event subscription for topic. + * Delete an event subscription for a topic. * - * Get the full endpoint URL for an event subscription for topic. + * Delete an existing event subscription for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the full endpoint URL for an event subscription for topic. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName); + void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** * List all event subscriptions for a specific topic. * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -230,7 +167,7 @@ Response getFullUrlWithResponse(String resourceGroupNa * * List all event subscriptions that have been created for a specific topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -247,4 +184,77 @@ Response getFullUrlWithResponse(String resourceGroupNa */ PagedIterable list(String resourceGroupName, String topicName, String filter, Integer top, Context context); + + /** + * Get delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic along with {@link Response}. + */ + Response getDeliveryAttributesWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return delivery attributes for an event subscription for topic. + * + * Get all delivery attributes for an event subscription for topic. + */ + DeliveryAttributeListResult getDeliveryAttributes(String resourceGroupName, String topicName, + String eventSubscriptionName); + + /** + * Get full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic along with {@link Response}. + */ + Response getFullUrlWithResponse(String resourceGroupName, String topicName, + String eventSubscriptionName, Context context); + + /** + * Get full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full URL of an event subscription for topic. + * + * Get the full endpoint URL for an event subscription for topic. + */ + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName); } 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 0c86a4b3919e3..33c3c6dbfb2dc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,32 +12,32 @@ */ public final class TopicProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for TopicProvisioningState. + * Creating. */ public static final TopicProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for TopicProvisioningState. + * Updating. */ public static final TopicProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for TopicProvisioningState. + * Deleting. */ public static final TopicProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for TopicProvisioningState. + * Succeeded. */ public static final TopicProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for TopicProvisioningState. + * Canceled. */ public static final TopicProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for TopicProvisioningState. + * Failed. */ public static final TopicProvisioningState FAILED = fromString("Failed"); 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 d0717e0c1548d..a10c9d909e8ab 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -48,21 +47,6 @@ public TopicRegenerateKeyRequest withKeyName(String keyName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyName in model TopicRegenerateKeyRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TopicRegenerateKeyRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSharedAccessKeys.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSharedAccessKeys.java index 27cb818a757ba..e80292c854d72 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSharedAccessKeys.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSharedAccessKeys.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; 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 696b1c25401ac..9ed61d3f41400 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -35,7 +35,7 @@ public interface TopicSpace { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -104,7 +104,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, namespaceName. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @return the next definition stage. */ 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 fd2b3a03b0426..47aa3fff1f990 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,37 +12,37 @@ */ public final class TopicSpaceProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for TopicSpaceProvisioningState. + * Creating. */ public static final TopicSpaceProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for TopicSpaceProvisioningState. + * Updating. */ public static final TopicSpaceProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for TopicSpaceProvisioningState. + * Deleting. */ public static final TopicSpaceProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for TopicSpaceProvisioningState. + * Succeeded. */ public static final TopicSpaceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for TopicSpaceProvisioningState. + * Canceled. */ public static final TopicSpaceProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for TopicSpaceProvisioningState. + * Failed. */ public static final TopicSpaceProvisioningState FAILED = fromString("Failed"); /** - * Static value Deleted for TopicSpaceProvisioningState. + * Deleted. */ public static final TopicSpaceProvisioningState DELETED = fromString("Deleted"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaces.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaces.java index 5496b92b36dea..45f0403c8640f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaces.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaces.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,14 +17,16 @@ public interface TopicSpaces { * * Get properties of a topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space along with {@link Response}. + * @return a topic space. + * + * Get properties of a topic space along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName, Context context); @@ -34,13 +36,15 @@ Response getWithResponse(String resourceGroupName, String namespaceN * * Get properties of a topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space. + * @return a topic space. + * + * Get properties of a topic space. */ TopicSpace get(String resourceGroupName, String namespaceName, String topicSpaceName); @@ -49,7 +53,7 @@ Response getWithResponse(String resourceGroupName, String namespaceN * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,7 +67,7 @@ Response getWithResponse(String resourceGroupName, String namespaceN * * Delete an existing topic space. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param topicSpaceName Name of the Topic space. * @param context The context to associate with this operation. @@ -78,12 +82,12 @@ Response getWithResponse(String resourceGroupName, String namespaceN * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Topic Space operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName); @@ -92,7 +96,7 @@ Response getWithResponse(String resourceGroupName, String namespaceN * * Get all the topic spaces under a namespace. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param namespaceName Name of the namespace. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function @@ -105,7 +109,7 @@ Response getWithResponse(String resourceGroupName, String namespaceN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + * @return result of the List Topic Space operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context); @@ -119,7 +123,9 @@ PagedIterable listByNamespace(String resourceGroupName, String names * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space along with {@link Response}. + * @return a topic space. + * + * Get properties of a topic space along with {@link Response}. */ TopicSpace getById(String id); @@ -133,7 +139,9 @@ PagedIterable listByNamespace(String resourceGroupName, String names * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic space along with {@link Response}. + * @return a topic space. + * + * Get properties of a topic space along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 7107136af1b1c..5d0359b259e7f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -260,26 +260,6 @@ public TopicSpacesConfiguration withCustomDomains(List e.validate()); - } - } - /** * {@inheritDoc} */ 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 735967c316020..ca8bfdbc47ff7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,12 +12,12 @@ */ public final class TopicSpacesConfigurationState extends ExpandableStringEnum { /** - * Static value Disabled for TopicSpacesConfigurationState. + * Disabled. */ public static final TopicSpacesConfigurationState DISABLED = fromString("Disabled"); /** - * Static value Enabled for TopicSpacesConfigurationState. + * Enabled. */ public static final TopicSpacesConfigurationState ENABLED = fromString("Enabled"); 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 eaf18d450b2a6..8efe9dff987a1 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The TopicTypeAdditionalEnforcedPermission model. */ -@Fluent +@Immutable public final class TopicTypeAdditionalEnforcedPermission implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class TopicTypeAdditionalEnforcedPermission /** * Creates an instance of TopicTypeAdditionalEnforcedPermission class. */ - public TopicTypeAdditionalEnforcedPermission() { + private TopicTypeAdditionalEnforcedPermission() { } /** @@ -42,17 +42,6 @@ public String permissionName() { return this.permissionName; } - /** - * Set the permissionName property: The permissionName property. - * - * @param permissionName the permissionName value to set. - * @return the TopicTypeAdditionalEnforcedPermission object itself. - */ - public TopicTypeAdditionalEnforcedPermission withPermissionName(String permissionName) { - this.permissionName = permissionName; - return this; - } - /** * Get the isDataAction property: The isDataAction property. * @@ -62,25 +51,6 @@ public Boolean isDataAction() { return this.isDataAction; } - /** - * Set the isDataAction property: The isDataAction property. - * - * @param isDataAction the isDataAction value to set. - * @return the TopicTypeAdditionalEnforcedPermission object itself. - */ - public TopicTypeAdditionalEnforcedPermission withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java index d7aea3b654bfe..65305dffa0cb8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeInfoInner; import java.util.List; @@ -32,6 +33,13 @@ public interface TopicTypeInfo { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provider property: Namespace of the provider of the topic type. * 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 a59299547b3f4..46026baa8b990 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,32 +12,32 @@ */ public final class TopicTypeProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for TopicTypeProvisioningState. + * Creating. */ public static final TopicTypeProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for TopicTypeProvisioningState. + * Updating. */ public static final TopicTypeProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for TopicTypeProvisioningState. + * Deleting. */ public static final TopicTypeProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for TopicTypeProvisioningState. + * Succeeded. */ public static final TopicTypeProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for TopicTypeProvisioningState. + * Canceled. */ public static final TopicTypeProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for TopicTypeProvisioningState. + * Failed. */ public static final TopicTypeProvisioningState FAILED = fromString("Failed"); 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 d005e836400ad..832b31e436fc7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,22 +12,22 @@ */ public final class TopicTypeSourceScope extends ExpandableStringEnum { /** - * Static value Resource for TopicTypeSourceScope. + * Resource. */ public static final TopicTypeSourceScope RESOURCE = fromString("Resource"); /** - * Static value ResourceGroup for TopicTypeSourceScope. + * ResourceGroup. */ public static final TopicTypeSourceScope RESOURCE_GROUP = fromString("ResourceGroup"); /** - * Static value AzureSubscription for TopicTypeSourceScope. + * AzureSubscription. */ public static final TopicTypeSourceScope AZURE_SUBSCRIPTION = fromString("AzureSubscription"); /** - * Static value ManagementGroup for TopicTypeSourceScope. + * ManagementGroup. */ public static final TopicTypeSourceScope MANAGEMENT_GROUP = fromString("ManagementGroup"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypes.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypes.java index 18b04ec59e2d8..bafad60b720b3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypes.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -13,55 +13,59 @@ */ public interface TopicTypes { /** - * List topic types. + * Get a topic type. * - * List all registered topic types. + * Get information about a topic type. * + * @param topicTypeName Name of the topic type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. + * @return a topic type. + * + * Get information about a topic type along with {@link Response}. */ - PagedIterable list(); + Response getWithResponse(String topicTypeName, Context context); /** - * List topic types. + * Get a topic type. * - * List all registered topic types. + * Get information about a topic type. * - * @param context The context to associate with this operation. + * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. + * @return a topic type. + * + * Get information about a topic type. */ - PagedIterable list(Context context); + TopicTypeInfo get(String topicTypeName); /** - * Get a topic type. + * List topic types. * - * Get information about a topic type. + * List all registered topic types. * - * @param topicTypeName Name of the topic type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a topic type along with {@link Response}. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String topicTypeName, Context context); + PagedIterable list(); /** - * Get a topic type. + * List topic types. * - * Get information about a topic type. + * List all registered topic types. * - * @param topicTypeName Name of the topic type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a topic type. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ - TopicTypeInfo get(String topicTypeName); + PagedIterable list(Context context); /** * List event types. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java index 04ce6291b0cd2..c28357e98a0e8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -268,23 +268,6 @@ public TopicUpdateParameters withEventTypeInfo(EventTypeInfo eventTypeInfo) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java index 4ecce2c48924e..3b537a36a9323 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -17,13 +17,15 @@ public interface Topics { * * Get properties of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic along with {@link Response}. + * @return a topic. + * + * Get properties of a topic along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context); @@ -32,12 +34,14 @@ public interface Topics { * * Get properties of a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic. + * @return a topic. + * + * Get properties of a topic. */ Topic getByResourceGroup(String resourceGroupName, String topicName); @@ -46,7 +50,7 @@ public interface Topics { * * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,7 +63,7 @@ public interface Topics { * * Delete existing topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,21 +73,24 @@ public interface Topics { void delete(String resourceGroupName, String topicName, Context context); /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List topics under an Azure subscription. + * List topics under a resource group. * - * List all the topics under an Azure subscription. + * List all the topics under a resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -97,27 +104,24 @@ public interface Topics { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String filter, Integer top, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List topics under a resource group. + * List topics under an Azure subscription. * - * List all the topics under a resource group. + * List all the topics under an Azure subscription. * - * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic @@ -131,14 +135,14 @@ public interface Topics { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the List Topics operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); + PagedIterable list(String filter, Integer top, Context context); /** * List keys for a topic. * * List the two keys used to publish to a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -154,7 +158,7 @@ Response listSharedAccessKeysWithResponse(String resource * * List the two keys used to publish to a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -168,7 +172,7 @@ Response listSharedAccessKeysWithResponse(String resource * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +188,7 @@ TopicSharedAccessKeys regenerateKey(String resourceGroupName, String topicName, * * Regenerate a shared access key for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param topicName Name of the topic. * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -201,8 +205,8 @@ TopicSharedAccessKeys regenerateKey(String resourceGroupName, String topicName, * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -218,8 +222,8 @@ PagedIterable listEventTypes(String resourceGroupName, String provide * * List event types for a topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param providerNamespace Namespace of the provider of the topic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerNamespace the provider namespace. * @param resourceTypeName Name of the topic type. * @param resourceName Name of the topic. * @param context The context to associate with this operation. @@ -240,7 +244,9 @@ PagedIterable listEventTypes(String resourceGroupName, String provide * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic along with {@link Response}. + * @return a topic. + * + * Get properties of a topic along with {@link Response}. */ Topic getById(String id); @@ -254,7 +260,9 @@ PagedIterable listEventTypes(String resourceGroupName, String provide * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a topic along with {@link Response}. + * @return a topic. + * + * Get properties of a topic along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 cbe25ae572812..6edc06f081d4f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -62,17 +62,6 @@ public TopicsConfiguration withCustomDomains(List cus return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDomains() != null) { - customDomains().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateAutoScaleConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateAutoScaleConfiguration.java new file mode 100644 index 0000000000000..6332cfbb39565 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateAutoScaleConfiguration.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * UpdateAutoScaleConfiguration definition. + */ +@Fluent +public final class UpdateAutoScaleConfiguration implements JsonSerializable { + /* + * Indicates whether auto-scaling is enabled for the namespace. When enabled, the namespace will automatically scale + * between minimumThroughputUnits and maximumThroughputUnits based on usage patterns. + */ + private Boolean enableAutoScale; + + /* + * Minimum number of Throughput Units for auto-scaling. Valid only when EnableAutoScale is true. + */ + private Integer minimumThroughputUnits; + + /* + * Maximum number of Throughput Units for auto-scaling. Valid only when EnableAutoScale is true. + */ + private Integer maximumThroughputUnits; + + /** + * Creates an instance of UpdateAutoScaleConfiguration class. + */ + public UpdateAutoScaleConfiguration() { + } + + /** + * Get the enableAutoScale property: Indicates whether auto-scaling is enabled for the namespace. When enabled, the + * namespace will automatically scale + * between minimumThroughputUnits and maximumThroughputUnits based on usage patterns. + * + * @return the enableAutoScale value. + */ + public Boolean enableAutoScale() { + return this.enableAutoScale; + } + + /** + * Set the enableAutoScale property: Indicates whether auto-scaling is enabled for the namespace. When enabled, the + * namespace will automatically scale + * between minimumThroughputUnits and maximumThroughputUnits based on usage patterns. + * + * @param enableAutoScale the enableAutoScale value to set. + * @return the UpdateAutoScaleConfiguration object itself. + */ + public UpdateAutoScaleConfiguration withEnableAutoScale(Boolean enableAutoScale) { + this.enableAutoScale = enableAutoScale; + return this; + } + + /** + * Get the minimumThroughputUnits property: Minimum number of Throughput Units for auto-scaling. Valid only when + * EnableAutoScale is true. + * + * @return the minimumThroughputUnits value. + */ + public Integer minimumThroughputUnits() { + return this.minimumThroughputUnits; + } + + /** + * Set the minimumThroughputUnits property: Minimum number of Throughput Units for auto-scaling. Valid only when + * EnableAutoScale is true. + * + * @param minimumThroughputUnits the minimumThroughputUnits value to set. + * @return the UpdateAutoScaleConfiguration object itself. + */ + public UpdateAutoScaleConfiguration withMinimumThroughputUnits(Integer minimumThroughputUnits) { + this.minimumThroughputUnits = minimumThroughputUnits; + return this; + } + + /** + * Get the maximumThroughputUnits property: Maximum number of Throughput Units for auto-scaling. Valid only when + * EnableAutoScale is true. + * + * @return the maximumThroughputUnits value. + */ + public Integer maximumThroughputUnits() { + return this.maximumThroughputUnits; + } + + /** + * Set the maximumThroughputUnits property: Maximum number of Throughput Units for auto-scaling. Valid only when + * EnableAutoScale is true. + * + * @param maximumThroughputUnits the maximumThroughputUnits value to set. + * @return the UpdateAutoScaleConfiguration object itself. + */ + public UpdateAutoScaleConfiguration withMaximumThroughputUnits(Integer maximumThroughputUnits) { + this.maximumThroughputUnits = maximumThroughputUnits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableAutoScale", this.enableAutoScale); + jsonWriter.writeNumberField("minimumThroughputUnits", this.minimumThroughputUnits); + jsonWriter.writeNumberField("maximumThroughputUnits", this.maximumThroughputUnits); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateAutoScaleConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateAutoScaleConfiguration 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 UpdateAutoScaleConfiguration. + */ + public static UpdateAutoScaleConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateAutoScaleConfiguration deserializedUpdateAutoScaleConfiguration = new UpdateAutoScaleConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableAutoScale".equals(fieldName)) { + deserializedUpdateAutoScaleConfiguration.enableAutoScale + = reader.getNullable(JsonReader::getBoolean); + } else if ("minimumThroughputUnits".equals(fieldName)) { + deserializedUpdateAutoScaleConfiguration.minimumThroughputUnits + = reader.getNullable(JsonReader::getInt); + } else if ("maximumThroughputUnits".equals(fieldName)) { + deserializedUpdateAutoScaleConfiguration.maximumThroughputUnits + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateAutoScaleConfiguration; + }); + } +} 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 468617956599e..9d425b4c6823c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -238,26 +238,6 @@ public UpdateTopicSpacesConfigurationInfo withCustomDomains(List e.validate()); - } - } - /** * {@inheritDoc} */ 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 745255faaf7fb..a3d10d0fa574d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -48,17 +48,6 @@ public UpdateTopicsConfigurationInfo withCustomDomains(List e.validate()); - } - } - /** * {@inheritDoc} */ 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 592dc23c2a1b3..f4b4008faedba 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -72,14 +72,6 @@ public UserIdentityProperties withClientId(String clientId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 06b2592deb8af..0ed6a9f4f0da4 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 @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerInner; -import java.util.UUID; /** * An immutable client-side representation of VerifiedPartner. @@ -34,7 +33,7 @@ public interface VerifiedPartner { String type(); /** - * Gets the systemData property: The system metadata relating to the Event Grid resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -45,7 +44,7 @@ public interface VerifiedPartner { * * @return the partnerRegistrationImmutableId value. */ - UUID partnerRegistrationImmutableId(); + String partnerRegistrationImmutableId(); /** * Gets the organizationName property: Official name of the Partner. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java index de5640768e3f7..fccd924233bc4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -12,32 +12,32 @@ */ public final class VerifiedPartnerProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for VerifiedPartnerProvisioningState. + * Creating. */ public static final VerifiedPartnerProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for VerifiedPartnerProvisioningState. + * Updating. */ public static final VerifiedPartnerProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for VerifiedPartnerProvisioningState. + * Deleting. */ public static final VerifiedPartnerProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for VerifiedPartnerProvisioningState. + * Succeeded. */ public static final VerifiedPartnerProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Canceled for VerifiedPartnerProvisioningState. + * Canceled. */ public static final VerifiedPartnerProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for VerifiedPartnerProvisioningState. + * Failed. */ public static final VerifiedPartnerProvisioningState FAILED = fromString("Failed"); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java index d47ece95c882e..af39f300aa444 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -22,7 +22,9 @@ public interface VerifiedPartners { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a verified partner along with {@link Response}. + * @return a verified partner. + * + * Get properties of a verified partner along with {@link Response}. */ Response getWithResponse(String verifiedPartnerName, Context context); @@ -35,7 +37,9 @@ public interface VerifiedPartners { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a verified partner. + * @return a verified partner. + * + * Get properties of a verified partner. */ VerifiedPartner get(String verifiedPartnerName); @@ -46,7 +50,7 @@ public interface VerifiedPartners { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners as paginated response with {@link PagedIterable}. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -66,7 +70,7 @@ public interface VerifiedPartners { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all verified partners as paginated response with {@link PagedIterable}. + * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String filter, Integer top, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookAuthenticationSettings.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookAuthenticationSettings.java index 195c7652e807f..85aeddd4bb426 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookAuthenticationSettings.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookAuthenticationSettings.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -161,38 +160,6 @@ public WebhookAuthenticationSettings withAzureActiveDirectoryTenantId(String azu return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property identity in model WebhookAuthenticationSettings")); - } else { - identity().validate(); - } - if (endpointUrl() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property endpointUrl in model WebhookAuthenticationSettings")); - } - if (azureActiveDirectoryApplicationIdOrUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property azureActiveDirectoryApplicationIdOrUri in model WebhookAuthenticationSettings")); - } - if (azureActiveDirectoryTenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property azureActiveDirectoryTenantId in model WebhookAuthenticationSettings")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WebhookAuthenticationSettings.class); - /** * {@inheritDoc} */ 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 f2fa648777436..b4a95c42113e5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -230,18 +230,6 @@ public WebhookEventSubscriptionDestination withMinimumTlsVersionAllowed(TlsVersi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 bc9df82073a4f..2baeb71fc9c5c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -27,6 +27,11 @@ public final class WebhookPartnerDestinationInfo extends PartnerDestinationInfo */ private WebhookPartnerDestinationProperties innerProperties; + /* + * Change history of the resource move. + */ + private List resourceMoveChangeHistory; + /** * Creates an instance of WebhookPartnerDestinationInfo class. */ @@ -52,6 +57,27 @@ WebhookPartnerDestinationProperties innerProperties() { return this.innerProperties; } + /** + * Get the resourceMoveChangeHistory property: Change history of the resource move. + * + * @return the resourceMoveChangeHistory value. + */ + public List resourceMoveChangeHistory() { + return this.resourceMoveChangeHistory; + } + + /** + * Set the resourceMoveChangeHistory property: Change history of the resource move. + * + * @param resourceMoveChangeHistory the resourceMoveChangeHistory value to set. + * @return the WebhookPartnerDestinationInfo object itself. + */ + public WebhookPartnerDestinationInfo + withResourceMoveChangeHistory(List resourceMoveChangeHistory) { + this.resourceMoveChangeHistory = resourceMoveChangeHistory; + return this; + } + /** * {@inheritDoc} */ @@ -88,16 +114,6 @@ public WebhookPartnerDestinationInfo withEndpointServiceContext(String endpointS return this; } - /** - * {@inheritDoc} - */ - @Override - public WebhookPartnerDestinationInfo - withResourceMoveChangeHistory(List resourceMoveChangeHistory) { - super.withResourceMoveChangeHistory(resourceMoveChangeHistory); - return this; - } - /** * Get the endpointUrl property: The URL that represents the endpoint of the partner destination. * @@ -167,21 +183,6 @@ public WebhookPartnerDestinationInfo withClientAuthentication(PartnerClientAuthe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (resourceMoveChangeHistory() != null) { - resourceMoveChangeHistory().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -192,10 +193,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { 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); + jsonWriter.writeArrayField("resourceMoveChangeHistory", this.resourceMoveChangeHistory, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -223,16 +224,16 @@ public static WebhookPartnerDestinationInfo fromJson(JsonReader jsonReader) thro 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 if ("resourceMoveChangeHistory".equals(fieldName)) { + List resourceMoveChangeHistory + = reader.readArray(reader1 -> ResourceMoveChangeHistory.fromJson(reader1)); + deserializedWebhookPartnerDestinationInfo.resourceMoveChangeHistory = resourceMoveChangeHistory; } else { reader.skipChildren(); } 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 ee197f98d8f29..0952f5f82149b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.models; @@ -121,18 +121,6 @@ public PartnerClientAuthentication clientAuthentication() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/package-info.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/package-info.java index f8cdcfd395743..190c6a8f95c0a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/package-info.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for EventGridManagementClient. + * Package containing the data models for EventGrid. * Azure EventGrid Management Client. */ package com.azure.resourcemanager.eventgrid.models; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/package-info.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/package-info.java index 1fe1b03320228..cdfee2917d739 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/package-info.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for EventGridManagementClient. + * Package containing the classes for EventGrid. * Azure EventGrid Management Client. */ package com.azure.resourcemanager.eventgrid; 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 f7a83ae8941a4..28fc10b4adccd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.eventgrid { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.eventgrid.fluent.models to com.azure.core; opens com.azure.resourcemanager.eventgrid.models to com.azure.core; + opens com.azure.resourcemanager.eventgrid.implementation.models to com.azure.core; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/azure-resourcemanager-eventgrid_metadata.json b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/azure-resourcemanager-eventgrid_metadata.json new file mode 100644 index 0000000000000..d19ca92cd5e69 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/resources/META-INF/azure-resourcemanager-eventgrid_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.EventGrid":"2026-06-15-preview"},"crossLanguagePackageId":"Microsoft.EventGrid","crossLanguageVersion":"f1405d350e78","crossLanguageDefinitions":{"com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient":"Microsoft.EventGrid.CaCertificates","com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient.beginCreateOrUpdate":"Microsoft.EventGrid.CaCertificates.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient.beginDelete":"Microsoft.EventGrid.CaCertificates.delete","com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient.createOrUpdate":"Microsoft.EventGrid.CaCertificates.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient.delete":"Microsoft.EventGrid.CaCertificates.delete","com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient.get":"Microsoft.EventGrid.CaCertificates.get","com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient.getWithResponse":"Microsoft.EventGrid.CaCertificates.get","com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient.listByNamespace":"Microsoft.EventGrid.CaCertificates.listByNamespace","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient":"Microsoft.EventGrid.Channels","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.beginDelete":"Microsoft.EventGrid.Channels.delete","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.createOrUpdate":"Microsoft.EventGrid.Channels.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.createOrUpdateWithResponse":"Microsoft.EventGrid.Channels.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.delete":"Microsoft.EventGrid.Channels.delete","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.get":"Microsoft.EventGrid.Channels.get","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.getFullUrl":"Microsoft.EventGrid.Channels.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.getFullUrlWithResponse":"Microsoft.EventGrid.Channels.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.getWithResponse":"Microsoft.EventGrid.Channels.get","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.listByPartnerNamespace":"Microsoft.EventGrid.Channels.listByPartnerNamespace","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.update":"Microsoft.EventGrid.Channels.update","com.azure.resourcemanager.eventgrid.fluent.ChannelsClient.updateWithResponse":"Microsoft.EventGrid.Channels.update","com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient":"Microsoft.EventGrid.ClientGroups","com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient.beginCreateOrUpdate":"Microsoft.EventGrid.ClientGroups.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient.beginDelete":"Microsoft.EventGrid.ClientGroups.delete","com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient.createOrUpdate":"Microsoft.EventGrid.ClientGroups.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient.delete":"Microsoft.EventGrid.ClientGroups.delete","com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient.get":"Microsoft.EventGrid.ClientGroups.get","com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient.getWithResponse":"Microsoft.EventGrid.ClientGroups.get","com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient.listByNamespace":"Microsoft.EventGrid.ClientGroups.listByNamespace","com.azure.resourcemanager.eventgrid.fluent.ClientsClient":"Microsoft.EventGrid.Clients","com.azure.resourcemanager.eventgrid.fluent.ClientsClient.beginCreateOrUpdate":"Microsoft.EventGrid.Clients.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.ClientsClient.beginDelete":"Microsoft.EventGrid.Clients.delete","com.azure.resourcemanager.eventgrid.fluent.ClientsClient.createOrUpdate":"Microsoft.EventGrid.Clients.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.ClientsClient.delete":"Microsoft.EventGrid.Clients.delete","com.azure.resourcemanager.eventgrid.fluent.ClientsClient.get":"Microsoft.EventGrid.Clients.get","com.azure.resourcemanager.eventgrid.fluent.ClientsClient.getWithResponse":"Microsoft.EventGrid.Clients.get","com.azure.resourcemanager.eventgrid.fluent.ClientsClient.listByNamespace":"Microsoft.EventGrid.Clients.listByNamespace","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient":"Microsoft.EventGrid.DomainEventSubscriptions","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.beginCreateOrUpdate":"Microsoft.EventGrid.DomainEventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.beginDelete":"Microsoft.EventGrid.DomainEventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.beginUpdate":"Microsoft.EventGrid.DomainEventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.createOrUpdate":"Microsoft.EventGrid.DomainEventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.delete":"Microsoft.EventGrid.DomainEventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.get":"Microsoft.EventGrid.DomainEventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.getDeliveryAttributes":"Microsoft.EventGrid.DomainEventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.getDeliveryAttributesWithResponse":"Microsoft.EventGrid.DomainEventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.getFullUrl":"Microsoft.EventGrid.DomainEventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.getFullUrlWithResponse":"Microsoft.EventGrid.DomainEventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.getWithResponse":"Microsoft.EventGrid.DomainEventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.list":"Microsoft.EventGrid.DomainEventSubscriptions.list","com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient.update":"Microsoft.EventGrid.DomainEventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient":"Microsoft.EventGrid","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.beginCreateOrUpdate":"Microsoft.EventGrid.EventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.beginDelete":"Microsoft.EventGrid.EventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.beginUpdate":"Microsoft.EventGrid.EventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.createOrUpdate":"Microsoft.EventGrid.EventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.delete":"Microsoft.EventGrid.EventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.get":"Microsoft.EventGrid.EventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.getDeliveryAttributes":"Microsoft.EventGrid.EventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.getDeliveryAttributesWithResponse":"Microsoft.EventGrid.EventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.getFullUrl":"Microsoft.EventGrid.EventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.getFullUrlWithResponse":"Microsoft.EventGrid.EventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.getWithResponse":"Microsoft.EventGrid.EventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.list":"Microsoft.EventGrid.EventSubscriptions.list","com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient.update":"Microsoft.EventGrid.EventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient":"Microsoft.EventGrid.DomainTopics","com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient.beginCreateOrUpdate":"Microsoft.EventGrid.DomainTopics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient.beginDelete":"Microsoft.EventGrid.DomainTopics.delete","com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient.createOrUpdate":"Microsoft.EventGrid.DomainTopics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient.delete":"Microsoft.EventGrid.DomainTopics.delete","com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient.get":"Microsoft.EventGrid.DomainTopics.get","com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient.getWithResponse":"Microsoft.EventGrid.DomainTopics.get","com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient.listByDomain":"Microsoft.EventGrid.DomainTopics.listByDomain","com.azure.resourcemanager.eventgrid.fluent.DomainsClient":"Microsoft.EventGrid.Domains","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.beginCreateOrUpdate":"Microsoft.EventGrid.Domains.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.beginDelete":"Microsoft.EventGrid.Domains.delete","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.beginUpdate":"Microsoft.EventGrid.Domains.update","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.createOrUpdate":"Microsoft.EventGrid.Domains.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.delete":"Microsoft.EventGrid.Domains.delete","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.getByResourceGroup":"Microsoft.EventGrid.Domains.get","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.Domains.get","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.list":"Microsoft.EventGrid.Domains.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.listByResourceGroup":"Microsoft.EventGrid.Domains.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.listSharedAccessKeys":"Microsoft.EventGrid.Domains.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.listSharedAccessKeysWithResponse":"Microsoft.EventGrid.Domains.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.regenerateKey":"Microsoft.EventGrid.Domains.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.regenerateKeyWithResponse":"Microsoft.EventGrid.Domains.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.DomainsClient.update":"Microsoft.EventGrid.Domains.update","com.azure.resourcemanager.eventgrid.fluent.EventGridManagementClient":"Microsoft.EventGrid","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient":"Microsoft.EventGrid.EventSubscriptions","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.beginCreateOrUpdate":"Microsoft.EventGrid.EventSubscriptionOperationGroup.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.beginDelete":"Microsoft.EventGrid.EventSubscriptionOperationGroup.delete","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.beginUpdate":"Microsoft.EventGrid.EventSubscriptionOperationGroup.update","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.createOrUpdate":"Microsoft.EventGrid.EventSubscriptionOperationGroup.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.delete":"Microsoft.EventGrid.EventSubscriptionOperationGroup.delete","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.get":"Microsoft.EventGrid.EventSubscriptionOperationGroup.get","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.getDeliveryAttributes":"Microsoft.EventGrid.EventSubscriptionOperationGroup.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.getDeliveryAttributesWithResponse":"Microsoft.EventGrid.EventSubscriptionOperationGroup.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.getFullUrl":"Microsoft.EventGrid.EventSubscriptionOperationGroup.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.getFullUrlWithResponse":"Microsoft.EventGrid.EventSubscriptionOperationGroup.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.getWithResponse":"Microsoft.EventGrid.EventSubscriptionOperationGroup.get","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.list":"Microsoft.EventGrid.EventSubscriptionOperationGroup.listGlobalBySubscription","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listByDomainTopic":"Microsoft.EventGrid.EventSubscriptions.listByDomainTopic","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listByResource":"Microsoft.EventGrid.EventSubscriptionOperationGroup.listByResource","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listByResourceGroup":"Microsoft.EventGrid.EventSubscriptions.listGlobalByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listGlobalByResourceGroupForTopicType":"Microsoft.EventGrid.EventSubscriptionsOperationGroup.listGlobalByResourceGroupForTopicType","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listGlobalBySubscriptionForTopicType":"Microsoft.EventGrid.EventSubscriptionsOperationGroup.listGlobalBySubscriptionForTopicType","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listRegionalByResourceGroup":"Microsoft.EventGrid.EventSubscriptionsOperationGroup.listRegionalByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listRegionalByResourceGroupForTopicType":"Microsoft.EventGrid.EventSubscriptionsOperationGroup.listRegionalByResourceGroupForTopicType","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listRegionalBySubscription":"Microsoft.EventGrid.EventSubscriptionsOperationGroup.listRegionalBySubscription","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.listRegionalBySubscriptionForTopicType":"Microsoft.EventGrid.EventSubscriptionsOperationGroup.listRegionalBySubscriptionForTopicType","com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient.update":"Microsoft.EventGrid.EventSubscriptionOperationGroup.update","com.azure.resourcemanager.eventgrid.fluent.ExtensionTopicsClient":"Microsoft.EventGrid.ExtensionTopics","com.azure.resourcemanager.eventgrid.fluent.ExtensionTopicsClient.get":"Microsoft.EventGrid.ExtensionTopics.get","com.azure.resourcemanager.eventgrid.fluent.ExtensionTopicsClient.getWithResponse":"Microsoft.EventGrid.ExtensionTopics.get","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient":"Microsoft.EventGrid","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.beginCreateOrUpdate":"Microsoft.EventGrid.Subscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.beginDelete":"Microsoft.EventGrid.Subscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.beginUpdate":"Microsoft.EventGrid.Subscriptions.update","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.createOrUpdate":"Microsoft.EventGrid.Subscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.delete":"Microsoft.EventGrid.Subscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.get":"Microsoft.EventGrid.Subscriptions.get","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.getDeliveryAttributes":"Microsoft.EventGrid.Subscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.getDeliveryAttributesWithResponse":"Microsoft.EventGrid.Subscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.getFullUrl":"Microsoft.EventGrid.Subscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.getFullUrlWithResponse":"Microsoft.EventGrid.Subscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.getWithResponse":"Microsoft.EventGrid.Subscriptions.get","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.listByNamespaceTopic":"Microsoft.EventGrid.Subscriptions.listByNamespaceTopic","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient.update":"Microsoft.EventGrid.Subscriptions.update","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient":"Microsoft.EventGrid.NamespaceTopics","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.beginCreateOrUpdate":"Microsoft.EventGrid.NamespaceTopics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.beginDelete":"Microsoft.EventGrid.NamespaceTopics.delete","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.beginRegenerateKey":"Microsoft.EventGrid.NamespaceTopics.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.beginUpdate":"Microsoft.EventGrid.NamespaceTopics.update","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.createOrUpdate":"Microsoft.EventGrid.NamespaceTopics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.delete":"Microsoft.EventGrid.NamespaceTopics.delete","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.get":"Microsoft.EventGrid.NamespaceTopics.get","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.getWithResponse":"Microsoft.EventGrid.NamespaceTopics.get","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.listByNamespace":"Microsoft.EventGrid.NamespaceTopics.listByNamespace","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.listSharedAccessKeys":"Microsoft.EventGrid.NamespaceTopics.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.listSharedAccessKeysWithResponse":"Microsoft.EventGrid.NamespaceTopics.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.regenerateKey":"Microsoft.EventGrid.NamespaceTopics.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient.update":"Microsoft.EventGrid.NamespaceTopics.update","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient":"Microsoft.EventGrid.Namespaces","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.beginCreateOrUpdate":"Microsoft.EventGrid.Namespaces.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.beginDelete":"Microsoft.EventGrid.Namespaces.delete","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.beginRegenerateKey":"Microsoft.EventGrid.Namespaces.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.beginUpdate":"Microsoft.EventGrid.Namespaces.update","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.beginValidateCustomDomainOwnership":"Microsoft.EventGrid.Namespaces.validateCustomDomainOwnership","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.createOrUpdate":"Microsoft.EventGrid.Namespaces.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.delete":"Microsoft.EventGrid.Namespaces.delete","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.getByResourceGroup":"Microsoft.EventGrid.Namespaces.get","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.Namespaces.get","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.list":"Microsoft.EventGrid.Namespaces.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.listByResourceGroup":"Microsoft.EventGrid.Namespaces.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.listSharedAccessKeys":"Microsoft.EventGrid.Namespaces.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.listSharedAccessKeysWithResponse":"Microsoft.EventGrid.Namespaces.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.regenerateKey":"Microsoft.EventGrid.Namespaces.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.update":"Microsoft.EventGrid.Namespaces.update","com.azure.resourcemanager.eventgrid.fluent.NamespacesClient.validateCustomDomainOwnership":"Microsoft.EventGrid.Namespaces.validateCustomDomainOwnership","com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurations","com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient.beginReconcile":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurations.reconcile","com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient.get":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurations.get","com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient.getWithResponse":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurations.get","com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient.list":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurations.list","com.azure.resourcemanager.eventgrid.fluent.NetworkSecurityPerimeterConfigurationsClient.reconcile":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurations.reconcile","com.azure.resourcemanager.eventgrid.fluent.OperationsClient":"Microsoft.EventGrid.Operations","com.azure.resourcemanager.eventgrid.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient":"Microsoft.EventGrid.PartnerConfigurations","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.authorizePartner":"Microsoft.EventGrid.PartnerConfigurations.authorizePartner","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.authorizePartnerWithResponse":"Microsoft.EventGrid.PartnerConfigurations.authorizePartner","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.beginCreateOrUpdate":"Microsoft.EventGrid.PartnerConfigurations.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.beginDelete":"Microsoft.EventGrid.PartnerConfigurations.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.beginUpdate":"Microsoft.EventGrid.PartnerConfigurations.update","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.createOrUpdate":"Microsoft.EventGrid.PartnerConfigurations.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.delete":"Microsoft.EventGrid.PartnerConfigurations.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.getByResourceGroup":"Microsoft.EventGrid.PartnerConfigurations.get","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.PartnerConfigurations.get","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.list":"Microsoft.EventGrid.PartnerConfigurations.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.listByResourceGroup":"Microsoft.EventGrid.PartnerConfigurations.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.unauthorizePartner":"Microsoft.EventGrid.PartnerConfigurations.unauthorizePartner","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.unauthorizePartnerWithResponse":"Microsoft.EventGrid.PartnerConfigurations.unauthorizePartner","com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient.update":"Microsoft.EventGrid.PartnerConfigurations.update","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient":"Microsoft.EventGrid.PartnerDestinations","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.activate":"Microsoft.EventGrid.PartnerDestinations.activate","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.activateWithResponse":"Microsoft.EventGrid.PartnerDestinations.activate","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.beginCreateOrUpdate":"Microsoft.EventGrid.PartnerDestinations.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.beginDelete":"Microsoft.EventGrid.PartnerDestinations.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.beginUpdate":"Microsoft.EventGrid.PartnerDestinations.update","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.createOrUpdate":"Microsoft.EventGrid.PartnerDestinations.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.delete":"Microsoft.EventGrid.PartnerDestinations.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.getByResourceGroup":"Microsoft.EventGrid.PartnerDestinations.get","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.PartnerDestinations.get","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.list":"Microsoft.EventGrid.PartnerDestinations.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.listByResourceGroup":"Microsoft.EventGrid.PartnerDestinations.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient.update":"Microsoft.EventGrid.PartnerDestinations.update","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient":"Microsoft.EventGrid.PartnerNamespaces","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.beginCreateOrUpdate":"Microsoft.EventGrid.PartnerNamespaces.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.beginDelete":"Microsoft.EventGrid.PartnerNamespaces.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.beginUpdate":"Microsoft.EventGrid.PartnerNamespaces.update","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.createOrUpdate":"Microsoft.EventGrid.PartnerNamespaces.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.delete":"Microsoft.EventGrid.PartnerNamespaces.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.getByResourceGroup":"Microsoft.EventGrid.PartnerNamespaces.get","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.PartnerNamespaces.get","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.list":"Microsoft.EventGrid.PartnerNamespaces.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.listByResourceGroup":"Microsoft.EventGrid.PartnerNamespaces.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.listSharedAccessKeys":"Microsoft.EventGrid.PartnerNamespaces.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.listSharedAccessKeysWithResponse":"Microsoft.EventGrid.PartnerNamespaces.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.regenerateKey":"Microsoft.EventGrid.PartnerNamespaces.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.regenerateKeyWithResponse":"Microsoft.EventGrid.PartnerNamespaces.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient.update":"Microsoft.EventGrid.PartnerNamespaces.update","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient":"Microsoft.EventGrid.PartnerRegistrations","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.beginCreateOrUpdate":"Microsoft.EventGrid.PartnerRegistrations.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.beginDelete":"Microsoft.EventGrid.PartnerRegistrations.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.beginUpdate":"Microsoft.EventGrid.PartnerRegistrations.update","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.createOrUpdate":"Microsoft.EventGrid.PartnerRegistrations.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.delete":"Microsoft.EventGrid.PartnerRegistrations.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.getByResourceGroup":"Microsoft.EventGrid.PartnerRegistrations.get","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.PartnerRegistrations.get","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.list":"Microsoft.EventGrid.PartnerRegistrations.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.listByResourceGroup":"Microsoft.EventGrid.PartnerRegistrations.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient.update":"Microsoft.EventGrid.PartnerRegistrations.update","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient":"Microsoft.EventGrid.PartnerTopicEventSubscriptions","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.beginCreateOrUpdate":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.beginDelete":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.beginUpdate":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.createOrUpdate":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.delete":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.get":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.getDeliveryAttributes":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.getDeliveryAttributesWithResponse":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.getFullUrl":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.getFullUrlWithResponse":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.getWithResponse":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.listByPartnerTopic":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.listByPartnerTopic","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient.update":"Microsoft.EventGrid.PartnerTopicEventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient":"Microsoft.EventGrid.PartnerTopics","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.activate":"Microsoft.EventGrid.PartnerTopics.activate","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.activateWithResponse":"Microsoft.EventGrid.PartnerTopics.activate","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.beginDelete":"Microsoft.EventGrid.PartnerTopics.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.createOrUpdate":"Microsoft.EventGrid.PartnerTopics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.createOrUpdateWithResponse":"Microsoft.EventGrid.PartnerTopics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.deactivate":"Microsoft.EventGrid.PartnerTopics.deactivate","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.deactivateWithResponse":"Microsoft.EventGrid.PartnerTopics.deactivate","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.delete":"Microsoft.EventGrid.PartnerTopics.delete","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.getByResourceGroup":"Microsoft.EventGrid.PartnerTopics.get","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.PartnerTopics.get","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.list":"Microsoft.EventGrid.PartnerTopics.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.listByResourceGroup":"Microsoft.EventGrid.PartnerTopics.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.update":"Microsoft.EventGrid.PartnerTopics.update","com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient.updateWithResponse":"Microsoft.EventGrid.PartnerTopics.update","com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient":"Microsoft.EventGrid.PermissionBindings","com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient.beginCreateOrUpdate":"Microsoft.EventGrid.PermissionBindings.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient.beginDelete":"Microsoft.EventGrid.PermissionBindings.delete","com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient.createOrUpdate":"Microsoft.EventGrid.PermissionBindings.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient.delete":"Microsoft.EventGrid.PermissionBindings.delete","com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient.get":"Microsoft.EventGrid.PermissionBindings.get","com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient.getWithResponse":"Microsoft.EventGrid.PermissionBindings.get","com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient.listByNamespace":"Microsoft.EventGrid.PermissionBindings.listByNamespace","com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient":"Microsoft.EventGrid.PrivateEndpointConnections","com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.EventGrid.PrivateEndpointConnections.delete","com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient.beginUpdate":"Microsoft.EventGrid.PrivateEndpointConnections.update","com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.EventGrid.PrivateEndpointConnections.delete","com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.EventGrid.PrivateEndpointConnections.get","com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.EventGrid.PrivateEndpointConnections.get","com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient.listByResource":"Microsoft.EventGrid.PrivateEndpointConnections.listByResource","com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient.update":"Microsoft.EventGrid.PrivateEndpointConnections.update","com.azure.resourcemanager.eventgrid.fluent.PrivateLinkResourcesClient":"Microsoft.EventGrid.PrivateLinkResources","com.azure.resourcemanager.eventgrid.fluent.PrivateLinkResourcesClient.get":"Microsoft.EventGrid.PrivateLinkResources.get","com.azure.resourcemanager.eventgrid.fluent.PrivateLinkResourcesClient.getWithResponse":"Microsoft.EventGrid.PrivateLinkResources.get","com.azure.resourcemanager.eventgrid.fluent.PrivateLinkResourcesClient.listByResource":"Microsoft.EventGrid.PrivateLinkResources.listByResource","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient":"Microsoft.EventGrid.SystemTopicEventSubscriptions","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.beginCreateOrUpdate":"Microsoft.EventGrid.SystemTopicEventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.beginDelete":"Microsoft.EventGrid.SystemTopicEventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.beginUpdate":"Microsoft.EventGrid.SystemTopicEventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.createOrUpdate":"Microsoft.EventGrid.SystemTopicEventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.delete":"Microsoft.EventGrid.SystemTopicEventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.get":"Microsoft.EventGrid.SystemTopicEventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.getDeliveryAttributes":"Microsoft.EventGrid.SystemTopicEventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.getDeliveryAttributesWithResponse":"Microsoft.EventGrid.SystemTopicEventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.getFullUrl":"Microsoft.EventGrid.SystemTopicEventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.getFullUrlWithResponse":"Microsoft.EventGrid.SystemTopicEventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.getWithResponse":"Microsoft.EventGrid.SystemTopicEventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.listBySystemTopic":"Microsoft.EventGrid.SystemTopicEventSubscriptions.listBySystemTopic","com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient.update":"Microsoft.EventGrid.SystemTopicEventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient":"Microsoft.EventGrid.SystemTopics","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.beginCreateOrUpdate":"Microsoft.EventGrid.SystemTopics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.beginDelete":"Microsoft.EventGrid.SystemTopics.delete","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.beginUpdate":"Microsoft.EventGrid.SystemTopics.update","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.createOrUpdate":"Microsoft.EventGrid.SystemTopics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.delete":"Microsoft.EventGrid.SystemTopics.delete","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.getByResourceGroup":"Microsoft.EventGrid.SystemTopics.get","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.SystemTopics.get","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.list":"Microsoft.EventGrid.SystemTopics.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.listByResourceGroup":"Microsoft.EventGrid.SystemTopics.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient.update":"Microsoft.EventGrid.SystemTopics.update","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient":"Microsoft.EventGrid.TopicEventSubscriptions","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.beginCreateOrUpdate":"Microsoft.EventGrid.TopicEventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.beginDelete":"Microsoft.EventGrid.TopicEventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.beginUpdate":"Microsoft.EventGrid.TopicEventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.createOrUpdate":"Microsoft.EventGrid.TopicEventSubscriptions.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.delete":"Microsoft.EventGrid.TopicEventSubscriptions.delete","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.get":"Microsoft.EventGrid.TopicEventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.getDeliveryAttributes":"Microsoft.EventGrid.TopicEventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.getDeliveryAttributesWithResponse":"Microsoft.EventGrid.TopicEventSubscriptions.getDeliveryAttributes","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.getFullUrl":"Microsoft.EventGrid.TopicEventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.getFullUrlWithResponse":"Microsoft.EventGrid.TopicEventSubscriptions.getFullUrl","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.getWithResponse":"Microsoft.EventGrid.TopicEventSubscriptions.get","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.list":"Microsoft.EventGrid.TopicEventSubscriptions.list","com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient.update":"Microsoft.EventGrid.TopicEventSubscriptions.update","com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient":"Microsoft.EventGrid.TopicSpaces","com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient.beginCreateOrUpdate":"Microsoft.EventGrid.TopicSpaces.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient.beginDelete":"Microsoft.EventGrid.TopicSpaces.delete","com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient.createOrUpdate":"Microsoft.EventGrid.TopicSpaces.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient.delete":"Microsoft.EventGrid.TopicSpaces.delete","com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient.get":"Microsoft.EventGrid.TopicSpaces.get","com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient.getWithResponse":"Microsoft.EventGrid.TopicSpaces.get","com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient.listByNamespace":"Microsoft.EventGrid.TopicSpaces.listByNamespace","com.azure.resourcemanager.eventgrid.fluent.TopicTypesClient":"Microsoft.EventGrid","com.azure.resourcemanager.eventgrid.fluent.TopicTypesClient.get":"Microsoft.EventGrid.TopicTypeInfos.get","com.azure.resourcemanager.eventgrid.fluent.TopicTypesClient.getWithResponse":"Microsoft.EventGrid.TopicTypeInfos.get","com.azure.resourcemanager.eventgrid.fluent.TopicTypesClient.list":"Microsoft.EventGrid.TopicTypeInfos.list","com.azure.resourcemanager.eventgrid.fluent.TopicTypesClient.listEventTypes":"Microsoft.EventGrid.TopicTypeInfos.listEventTypes","com.azure.resourcemanager.eventgrid.fluent.TopicsClient":"Microsoft.EventGrid.Topics","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.beginCreateOrUpdate":"Microsoft.EventGrid.Topics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.beginDelete":"Microsoft.EventGrid.Topics.delete","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.beginRegenerateKey":"Microsoft.EventGrid.Topics.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.beginUpdate":"Microsoft.EventGrid.Topics.update","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.createOrUpdate":"Microsoft.EventGrid.Topics.createOrUpdate","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.delete":"Microsoft.EventGrid.Topics.delete","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.getByResourceGroup":"Microsoft.EventGrid.Topics.get","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.getByResourceGroupWithResponse":"Microsoft.EventGrid.Topics.get","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.list":"Microsoft.EventGrid.Topics.listBySubscription","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.listByResourceGroup":"Microsoft.EventGrid.Topics.listByResourceGroup","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.listEventTypes":"Microsoft.EventGrid.TopicsOperationGroup.listEventTypes","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.listSharedAccessKeys":"Microsoft.EventGrid.Topics.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.listSharedAccessKeysWithResponse":"Microsoft.EventGrid.Topics.listSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.regenerateKey":"Microsoft.EventGrid.Topics.regenerateKey","com.azure.resourcemanager.eventgrid.fluent.TopicsClient.update":"Microsoft.EventGrid.Topics.update","com.azure.resourcemanager.eventgrid.fluent.VerifiedPartnersClient":"Microsoft.EventGrid.VerifiedPartners","com.azure.resourcemanager.eventgrid.fluent.VerifiedPartnersClient.get":"Microsoft.EventGrid.VerifiedPartners.get","com.azure.resourcemanager.eventgrid.fluent.VerifiedPartnersClient.getWithResponse":"Microsoft.EventGrid.VerifiedPartners.get","com.azure.resourcemanager.eventgrid.fluent.VerifiedPartnersClient.list":"Microsoft.EventGrid.VerifiedPartners.list","com.azure.resourcemanager.eventgrid.fluent.models.AzureADPartnerClientAuthenticationProperties":"Microsoft.EventGrid.AzureADPartnerClientAuthenticationProperties","com.azure.resourcemanager.eventgrid.fluent.models.AzureFunctionEventSubscriptionDestinationProperties":"Microsoft.EventGrid.AzureFunctionEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner":"Microsoft.EventGrid.CaCertificate","com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateProperties":"Microsoft.EventGrid.CaCertificateProperties","com.azure.resourcemanager.eventgrid.fluent.models.ChannelInner":"Microsoft.EventGrid.Channel","com.azure.resourcemanager.eventgrid.fluent.models.ChannelProperties":"Microsoft.EventGrid.ChannelProperties","com.azure.resourcemanager.eventgrid.fluent.models.ChannelUpdateParametersProperties":"Microsoft.EventGrid.ChannelUpdateParametersProperties","com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner":"Microsoft.EventGrid.ClientGroup","com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupProperties":"Microsoft.EventGrid.ClientGroupProperties","com.azure.resourcemanager.eventgrid.fluent.models.ClientInner":"Microsoft.EventGrid.Client","com.azure.resourcemanager.eventgrid.fluent.models.ClientProperties":"Microsoft.EventGrid.ClientProperties","com.azure.resourcemanager.eventgrid.fluent.models.CustomDomainOwnershipValidationResultInner":"Microsoft.EventGrid.CustomDomainOwnershipValidationResult","com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner":"Microsoft.EventGrid.DeliveryAttributeListResult","com.azure.resourcemanager.eventgrid.fluent.models.DomainInner":"Microsoft.EventGrid.Domain","com.azure.resourcemanager.eventgrid.fluent.models.DomainProperties":"Microsoft.EventGrid.DomainProperties","com.azure.resourcemanager.eventgrid.fluent.models.DomainSharedAccessKeysInner":"Microsoft.EventGrid.DomainSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.models.DomainTopicInner":"Microsoft.EventGrid.DomainTopic","com.azure.resourcemanager.eventgrid.fluent.models.DomainTopicProperties":"Microsoft.EventGrid.DomainTopicProperties","com.azure.resourcemanager.eventgrid.fluent.models.DomainUpdateParameterProperties":"Microsoft.EventGrid.DomainUpdateParameterProperties","com.azure.resourcemanager.eventgrid.fluent.models.DynamicDeliveryAttributeMappingProperties":"Microsoft.EventGrid.DynamicDeliveryAttributeMappingProperties","com.azure.resourcemanager.eventgrid.fluent.models.EventHubEventSubscriptionDestinationProperties":"Microsoft.EventGrid.EventHubEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner":"Microsoft.EventGrid.EventSubscriptionFullUrl","com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner":"Microsoft.EventGrid.EventSubscription","com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionProperties":"Microsoft.EventGrid.EventSubscriptionProperties","com.azure.resourcemanager.eventgrid.fluent.models.EventTypeInner":"Microsoft.EventGrid.EventType","com.azure.resourcemanager.eventgrid.fluent.models.EventTypeProperties":"Microsoft.EventGrid.EventTypeProperties","com.azure.resourcemanager.eventgrid.fluent.models.ExtensionTopicInner":"Microsoft.EventGrid.ExtensionTopic","com.azure.resourcemanager.eventgrid.fluent.models.ExtensionTopicProperties":"Microsoft.EventGrid.ExtensionTopicProperties","com.azure.resourcemanager.eventgrid.fluent.models.HybridConnectionEventSubscriptionDestinationProperties":"Microsoft.EventGrid.HybridConnectionEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.JsonInputSchemaMappingProperties":"Microsoft.EventGrid.JsonInputSchemaMappingProperties","com.azure.resourcemanager.eventgrid.fluent.models.MonitorAlertEventSubscriptionDestinationProperties":"Microsoft.EventGrid.MonitorAlertEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner":"Microsoft.EventGrid.Namespace","com.azure.resourcemanager.eventgrid.fluent.models.NamespaceProperties":"Microsoft.EventGrid.NamespaceProperties","com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner":"Microsoft.EventGrid.NamespaceSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicEventSubscriptionDestinationProperties":"Microsoft.EventGrid.NamespaceTopicEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner":"Microsoft.EventGrid.NamespaceTopic","com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicProperties":"Microsoft.EventGrid.NamespaceTopicProperties","com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicUpdateParameterProperties":"Microsoft.EventGrid.NamespaceTopicUpdateParameterProperties","com.azure.resourcemanager.eventgrid.fluent.models.NamespaceUpdateParameterProperties":"Microsoft.EventGrid.NamespaceUpdateParameterProperties","com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationInner":"Microsoft.EventGrid.NetworkSecurityPerimeterConfiguration","com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationIssuesProperties":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurationIssuesProperties","com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterConfigurationProperties":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurationProperties","com.azure.resourcemanager.eventgrid.fluent.models.NetworkSecurityPerimeterProfileAccessRuleProperties":"Microsoft.EventGrid.NetworkSecurityPerimeterProfileAccessRuleProperties","com.azure.resourcemanager.eventgrid.fluent.models.OperationInner":"Microsoft.EventGrid.Operation","com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationInner":"Microsoft.EventGrid.PartnerConfiguration","com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationProperties":"Microsoft.EventGrid.PartnerConfigurationProperties","com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationUpdateParameterProperties":"Microsoft.EventGrid.PartnerConfigurationUpdateParameterProperties","com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner":"Microsoft.EventGrid.PartnerDestination","com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationProperties":"Microsoft.EventGrid.PartnerDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.PartnerEventSubscriptionDestinationProperties":"Microsoft.EventGrid.PartnerEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceInner":"Microsoft.EventGrid.PartnerNamespace","com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceProperties":"Microsoft.EventGrid.PartnerNamespaceProperties","com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceSharedAccessKeysInner":"Microsoft.EventGrid.PartnerNamespaceSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.models.PartnerNamespaceUpdateParameterProperties":"Microsoft.EventGrid.PartnerNamespaceUpdateParameterProperties","com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationInner":"Microsoft.EventGrid.PartnerRegistration","com.azure.resourcemanager.eventgrid.fluent.models.PartnerRegistrationProperties":"Microsoft.EventGrid.PartnerRegistrationProperties","com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicInner":"Microsoft.EventGrid.PartnerTopic","com.azure.resourcemanager.eventgrid.fluent.models.PartnerTopicProperties":"Microsoft.EventGrid.PartnerTopicProperties","com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner":"Microsoft.EventGrid.PermissionBinding","com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingProperties":"Microsoft.EventGrid.PermissionBindingProperties","com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner":"Microsoft.EventGrid.PrivateEndpointConnection","com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionProperties":"Microsoft.EventGrid.PrivateEndpointConnectionProperties","com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceInner":"Microsoft.EventGrid.PrivateLinkResource","com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceProperties":"Microsoft.EventGrid.PrivateLinkResourceProperties","com.azure.resourcemanager.eventgrid.fluent.models.ServiceBusQueueEventSubscriptionDestinationProperties":"Microsoft.EventGrid.ServiceBusQueueEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.ServiceBusTopicEventSubscriptionDestinationProperties":"Microsoft.EventGrid.ServiceBusTopicEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.StaticDeliveryAttributeMappingProperties":"Microsoft.EventGrid.StaticDeliveryAttributeMappingProperties","com.azure.resourcemanager.eventgrid.fluent.models.StorageBlobDeadLetterDestinationProperties":"Microsoft.EventGrid.StorageBlobDeadLetterDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.StorageQueueEventSubscriptionDestinationProperties":"Microsoft.EventGrid.StorageQueueEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionFullUrlInner":"Microsoft.EventGrid.SubscriptionFullUrl","com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner":"Microsoft.EventGrid.Subscription","com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionProperties":"Microsoft.EventGrid.SubscriptionProperties","com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionUpdateParametersProperties":"Microsoft.EventGrid.SubscriptionUpdateParametersProperties","com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicInner":"Microsoft.EventGrid.SystemTopic","com.azure.resourcemanager.eventgrid.fluent.models.SystemTopicProperties":"Microsoft.EventGrid.SystemTopicProperties","com.azure.resourcemanager.eventgrid.fluent.models.TopicInner":"Microsoft.EventGrid.Topic","com.azure.resourcemanager.eventgrid.fluent.models.TopicProperties":"Microsoft.EventGrid.TopicProperties","com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner":"Microsoft.EventGrid.TopicSharedAccessKeys","com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner":"Microsoft.EventGrid.TopicSpace","com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceProperties":"Microsoft.EventGrid.TopicSpaceProperties","com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeInfoInner":"Microsoft.EventGrid.TopicTypeInfo","com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeProperties":"Microsoft.EventGrid.TopicTypeProperties","com.azure.resourcemanager.eventgrid.fluent.models.TopicUpdateParameterProperties":"Microsoft.EventGrid.TopicUpdateParameterProperties","com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerInner":"Microsoft.EventGrid.VerifiedPartner","com.azure.resourcemanager.eventgrid.fluent.models.VerifiedPartnerProperties":"Microsoft.EventGrid.VerifiedPartnerProperties","com.azure.resourcemanager.eventgrid.fluent.models.WebhookEventSubscriptionDestinationProperties":"Microsoft.EventGrid.WebHookEventSubscriptionDestinationProperties","com.azure.resourcemanager.eventgrid.fluent.models.WebhookPartnerDestinationProperties":"Microsoft.EventGrid.WebhookPartnerDestinationProperties","com.azure.resourcemanager.eventgrid.implementation.EventGridManagementClientBuilder":"Microsoft.EventGrid","com.azure.resourcemanager.eventgrid.implementation.models.CaCertificatesListResult":"Microsoft.EventGrid.CaCertificatesListResult","com.azure.resourcemanager.eventgrid.implementation.models.ChannelsListResult":"Microsoft.EventGrid.ChannelsListResult","com.azure.resourcemanager.eventgrid.implementation.models.ClientGroupsListResult":"Microsoft.EventGrid.ClientGroupsListResult","com.azure.resourcemanager.eventgrid.implementation.models.ClientsListResult":"Microsoft.EventGrid.ClientsListResult","com.azure.resourcemanager.eventgrid.implementation.models.DomainTopicsListResult":"Microsoft.EventGrid.DomainTopicsListResult","com.azure.resourcemanager.eventgrid.implementation.models.DomainsListResult":"Microsoft.EventGrid.DomainsListResult","com.azure.resourcemanager.eventgrid.implementation.models.EventSubscriptionsListResult":"Microsoft.EventGrid.EventSubscriptionsListResult","com.azure.resourcemanager.eventgrid.implementation.models.EventTypesListResult":"Microsoft.EventGrid.EventTypesListResult","com.azure.resourcemanager.eventgrid.implementation.models.NamespaceTopicsListResult":"Microsoft.EventGrid.NamespaceTopicsListResult","com.azure.resourcemanager.eventgrid.implementation.models.NamespacesListResult":"Microsoft.EventGrid.NamespacesListResult","com.azure.resourcemanager.eventgrid.implementation.models.NetworkSecurityPerimeterConfigurationList":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurationList","com.azure.resourcemanager.eventgrid.implementation.models.OperationsListResult":"Microsoft.EventGrid.OperationsListResult","com.azure.resourcemanager.eventgrid.implementation.models.PartnerConfigurationsListResult":"Microsoft.EventGrid.PartnerConfigurationsListResult","com.azure.resourcemanager.eventgrid.implementation.models.PartnerDestinationsListResult":"Microsoft.EventGrid.PartnerDestinationsListResult","com.azure.resourcemanager.eventgrid.implementation.models.PartnerNamespacesListResult":"Microsoft.EventGrid.PartnerNamespacesListResult","com.azure.resourcemanager.eventgrid.implementation.models.PartnerRegistrationsListResult":"Microsoft.EventGrid.PartnerRegistrationsListResult","com.azure.resourcemanager.eventgrid.implementation.models.PartnerTopicsListResult":"Microsoft.EventGrid.PartnerTopicsListResult","com.azure.resourcemanager.eventgrid.implementation.models.PermissionBindingsListResult":"Microsoft.EventGrid.PermissionBindingsListResult","com.azure.resourcemanager.eventgrid.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.EventGrid.PrivateEndpointConnectionListResult","com.azure.resourcemanager.eventgrid.implementation.models.PrivateLinkResourcesListResult":"Microsoft.EventGrid.PrivateLinkResourcesListResult","com.azure.resourcemanager.eventgrid.implementation.models.SubscriptionsListResult":"Microsoft.EventGrid.SubscriptionsListResult","com.azure.resourcemanager.eventgrid.implementation.models.SystemTopicsListResult":"Microsoft.EventGrid.SystemTopicsListResult","com.azure.resourcemanager.eventgrid.implementation.models.TopicSpacesListResult":"Microsoft.EventGrid.TopicSpacesListResult","com.azure.resourcemanager.eventgrid.implementation.models.TopicTypesListResult":"Microsoft.EventGrid.TopicTypesListResult","com.azure.resourcemanager.eventgrid.implementation.models.TopicsListResult":"Microsoft.EventGrid.TopicsListResult","com.azure.resourcemanager.eventgrid.implementation.models.VerifiedPartnersListResult":"Microsoft.EventGrid.VerifiedPartnersListResult","com.azure.resourcemanager.eventgrid.models.AdvancedFilter":"Microsoft.EventGrid.AdvancedFilter","com.azure.resourcemanager.eventgrid.models.AdvancedFilterOperatorType":"Microsoft.EventGrid.AdvancedFilterOperatorType","com.azure.resourcemanager.eventgrid.models.AlternativeAuthenticationNameSource":"Microsoft.EventGrid.AlternativeAuthenticationNameSource","com.azure.resourcemanager.eventgrid.models.AutoScaleConfiguration":"Microsoft.EventGrid.AutoScaleConfiguration","com.azure.resourcemanager.eventgrid.models.AzureADPartnerClientAuthentication":"Microsoft.EventGrid.AzureADPartnerClientAuthentication","com.azure.resourcemanager.eventgrid.models.AzureFunctionEventSubscriptionDestination":"Microsoft.EventGrid.AzureFunctionEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.BoolEqualsAdvancedFilter":"Microsoft.EventGrid.BoolEqualsAdvancedFilter","com.azure.resourcemanager.eventgrid.models.BoolEqualsFilter":"Microsoft.EventGrid.BoolEqualsFilter","com.azure.resourcemanager.eventgrid.models.CaCertificateProvisioningState":"Microsoft.EventGrid.CaCertificateProvisioningState","com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState":"Microsoft.EventGrid.ChannelProvisioningState","com.azure.resourcemanager.eventgrid.models.ChannelType":"Microsoft.EventGrid.ChannelType","com.azure.resourcemanager.eventgrid.models.ChannelUpdateParameters":"Microsoft.EventGrid.ChannelUpdateParameters","com.azure.resourcemanager.eventgrid.models.ClientAuthenticationSettings":"Microsoft.EventGrid.ClientAuthenticationSettings","com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication":"Microsoft.EventGrid.ClientCertificateAuthentication","com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme":"Microsoft.EventGrid.ClientCertificateValidationScheme","com.azure.resourcemanager.eventgrid.models.ClientGroupProvisioningState":"Microsoft.EventGrid.ClientGroupProvisioningState","com.azure.resourcemanager.eventgrid.models.ClientProvisioningState":"Microsoft.EventGrid.ClientProvisioningState","com.azure.resourcemanager.eventgrid.models.ClientState":"Microsoft.EventGrid.ClientState","com.azure.resourcemanager.eventgrid.models.ConfidentialCompute":"Microsoft.EventGrid.ConfidentialCompute","com.azure.resourcemanager.eventgrid.models.ConfidentialComputeMode":"Microsoft.EventGrid.ConfidentialComputeMode","com.azure.resourcemanager.eventgrid.models.ConnectionState":"Microsoft.EventGrid.ConnectionState","com.azure.resourcemanager.eventgrid.models.CustomDomainConfiguration":"Microsoft.EventGrid.CustomDomainConfiguration","com.azure.resourcemanager.eventgrid.models.CustomDomainIdentity":"Microsoft.EventGrid.CustomDomainIdentity","com.azure.resourcemanager.eventgrid.models.CustomDomainIdentityType":"Microsoft.EventGrid.CustomDomainIdentityType","com.azure.resourcemanager.eventgrid.models.CustomDomainValidationState":"Microsoft.EventGrid.CustomDomainValidationState","com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentity":"Microsoft.EventGrid.CustomJwtAuthenticationManagedIdentity","com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentityType":"Microsoft.EventGrid.CustomJwtAuthenticationManagedIdentityType","com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationSettings":"Microsoft.EventGrid.CustomJwtAuthenticationSettings","com.azure.resourcemanager.eventgrid.models.CustomWebhookAuthenticationManagedIdentity":"Microsoft.EventGrid.CustomWebhookAuthenticationManagedIdentity","com.azure.resourcemanager.eventgrid.models.CustomWebhookAuthenticationManagedIdentityType":"Microsoft.EventGrid.CustomWebhookAuthenticationManagedIdentityType","com.azure.resourcemanager.eventgrid.models.CustomerManagedKeyEncryption":"Microsoft.EventGrid.CustomerManagedKeyEncryption","com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary":"Microsoft.EventGrid.DataResidencyBoundary","com.azure.resourcemanager.eventgrid.models.DeadLetterDestination":"Microsoft.EventGrid.DeadLetterDestination","com.azure.resourcemanager.eventgrid.models.DeadLetterEndPointType":"Microsoft.EventGrid.DeadLetterEndPointType","com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity":"Microsoft.EventGrid.DeadLetterWithResourceIdentity","com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping":"Microsoft.EventGrid.DeliveryAttributeMapping","com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMappingType":"Microsoft.EventGrid.DeliveryAttributeMappingType","com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration":"Microsoft.EventGrid.DeliveryConfiguration","com.azure.resourcemanager.eventgrid.models.DeliveryMode":"Microsoft.EventGrid.DeliveryMode","com.azure.resourcemanager.eventgrid.models.DeliverySchema":"Microsoft.EventGrid.DeliverySchema","com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity":"Microsoft.EventGrid.DeliveryWithResourceIdentity","com.azure.resourcemanager.eventgrid.models.DomainProvisioningState":"Microsoft.EventGrid.DomainProvisioningState","com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest":"Microsoft.EventGrid.DomainRegenerateKeyRequest","com.azure.resourcemanager.eventgrid.models.DomainTopicProvisioningState":"Microsoft.EventGrid.DomainTopicProvisioningState","com.azure.resourcemanager.eventgrid.models.DomainUpdateParameters":"Microsoft.EventGrid.DomainUpdateParameters","com.azure.resourcemanager.eventgrid.models.DynamicDeliveryAttributeMapping":"Microsoft.EventGrid.DynamicDeliveryAttributeMapping","com.azure.resourcemanager.eventgrid.models.DynamicRoutingEnrichment":"Microsoft.EventGrid.DynamicRoutingEnrichment","com.azure.resourcemanager.eventgrid.models.EncodedIssuerCertificateInfo":"Microsoft.EventGrid.EncodedIssuerCertificateInfo","com.azure.resourcemanager.eventgrid.models.EndpointType":"Microsoft.EventGrid.EndpointType","com.azure.resourcemanager.eventgrid.models.EventDefinitionKind":"Microsoft.EventGrid.EventDefinitionKind","com.azure.resourcemanager.eventgrid.models.EventDeliverySchema":"Microsoft.EventGrid.EventDeliverySchema","com.azure.resourcemanager.eventgrid.models.EventHubEventSubscriptionDestination":"Microsoft.EventGrid.EventHubEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.EventInputSchema":"Microsoft.EventGrid.EventInputSchema","com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination":"Microsoft.EventGrid.EventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter":"Microsoft.EventGrid.EventSubscriptionFilter","com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentity":"Microsoft.EventGrid.EventSubscriptionIdentity","com.azure.resourcemanager.eventgrid.models.EventSubscriptionIdentityType":"Microsoft.EventGrid.EventSubscriptionIdentityType","com.azure.resourcemanager.eventgrid.models.EventSubscriptionProvisioningState":"Microsoft.EventGrid.EventSubscriptionProvisioningState","com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters":"Microsoft.EventGrid.EventSubscriptionUpdateParameters","com.azure.resourcemanager.eventgrid.models.EventTypeInfo":"Microsoft.EventGrid.EventTypeInfo","com.azure.resourcemanager.eventgrid.models.ExtendedLocation":"Microsoft.EventGrid.ExtendedLocation","com.azure.resourcemanager.eventgrid.models.FederatedIdentityCredentialInfo":"Microsoft.EventGrid.FederatedIdentityCredentialInfo","com.azure.resourcemanager.eventgrid.models.Filter":"Microsoft.EventGrid.Filter","com.azure.resourcemanager.eventgrid.models.FilterOperatorType":"Microsoft.EventGrid.FilterOperatorType","com.azure.resourcemanager.eventgrid.models.FiltersConfiguration":"Microsoft.EventGrid.FiltersConfiguration","com.azure.resourcemanager.eventgrid.models.HybridConnectionEventSubscriptionDestination":"Microsoft.EventGrid.HybridConnectionEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.IdentityInfo":"Microsoft.EventGrid.IdentityInfo","com.azure.resourcemanager.eventgrid.models.IdentityType":"Microsoft.EventGrid.IdentityType","com.azure.resourcemanager.eventgrid.models.InboundIpRule":"Microsoft.EventGrid.InboundIpRule","com.azure.resourcemanager.eventgrid.models.InlineEventProperties":"Microsoft.EventGrid.InlineEventProperties","com.azure.resourcemanager.eventgrid.models.InputSchema":"Microsoft.EventGrid.InputSchema","com.azure.resourcemanager.eventgrid.models.InputSchemaMapping":"Microsoft.EventGrid.InputSchemaMapping","com.azure.resourcemanager.eventgrid.models.InputSchemaMappingType":"Microsoft.EventGrid.InputSchemaMappingType","com.azure.resourcemanager.eventgrid.models.IpActionType":"Microsoft.EventGrid.IpActionType","com.azure.resourcemanager.eventgrid.models.IpAddressType":"Microsoft.EventGrid.IpAddressType","com.azure.resourcemanager.eventgrid.models.IsNotNullAdvancedFilter":"Microsoft.EventGrid.IsNotNullAdvancedFilter","com.azure.resourcemanager.eventgrid.models.IsNotNullFilter":"Microsoft.EventGrid.IsNotNullFilter","com.azure.resourcemanager.eventgrid.models.IsNullOrUndefinedAdvancedFilter":"Microsoft.EventGrid.IsNullOrUndefinedAdvancedFilter","com.azure.resourcemanager.eventgrid.models.IsNullOrUndefinedFilter":"Microsoft.EventGrid.IsNullOrUndefinedFilter","com.azure.resourcemanager.eventgrid.models.IssuerCertificateInfo":"Microsoft.EventGrid.IssuerCertificateInfo","com.azure.resourcemanager.eventgrid.models.JsonField":"Microsoft.EventGrid.JsonField","com.azure.resourcemanager.eventgrid.models.JsonFieldWithDefault":"Microsoft.EventGrid.JsonFieldWithDefault","com.azure.resourcemanager.eventgrid.models.JsonInputSchemaMapping":"Microsoft.EventGrid.JsonInputSchemaMapping","com.azure.resourcemanager.eventgrid.models.KeyEncryption":"Microsoft.EventGrid.KeyEncryption","com.azure.resourcemanager.eventgrid.models.KeyEncryptionIdentityType":"Microsoft.EventGrid.KeyEncryptionIdentityType","com.azure.resourcemanager.eventgrid.models.KeyEncryptionKeyIdentity":"Microsoft.EventGrid.KeyEncryptionKeyIdentity","com.azure.resourcemanager.eventgrid.models.KeyEncryptionKeyStatus":"Microsoft.EventGrid.KeyEncryptionKeyStatus","com.azure.resourcemanager.eventgrid.models.MonitorAlertEventSubscriptionDestination":"Microsoft.EventGrid.MonitorAlertEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.MonitorAlertSeverity":"Microsoft.EventGrid.MonitorAlertSeverity","com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState":"Microsoft.EventGrid.NamespaceProvisioningState","com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest":"Microsoft.EventGrid.NamespaceRegenerateKeyRequest","com.azure.resourcemanager.eventgrid.models.NamespaceSku":"Microsoft.EventGrid.NamespaceSku","com.azure.resourcemanager.eventgrid.models.NamespaceTopicEventSubscriptionDestination":"Microsoft.EventGrid.NamespaceTopicEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.NamespaceTopicProvisioningState":"Microsoft.EventGrid.NamespaceTopicProvisioningState","com.azure.resourcemanager.eventgrid.models.NamespaceTopicUpdateParameters":"Microsoft.EventGrid.NamespaceTopicUpdateParameters","com.azure.resourcemanager.eventgrid.models.NamespaceUpdateParameters":"Microsoft.EventGrid.NamespaceUpdateParameters","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterAssociationAccessMode":"Microsoft.EventGrid.NetworkSecurityPerimeterAssociationAccessMode","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigProvisioningState","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurationIssueSeverity","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurationIssueType","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurationIssues","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile":"Microsoft.EventGrid.NetworkSecurityPerimeterConfigurationProfile","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo":"Microsoft.EventGrid.NetworkSecurityPerimeterInfo","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule":"Microsoft.EventGrid.NetworkSecurityPerimeterProfileAccessRule","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection":"Microsoft.EventGrid.NetworkSecurityPerimeterProfileAccessRuleDirection","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterResourceType":"Microsoft.EventGrid.NetworkSecurityPerimeterResourceType","com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription":"Microsoft.EventGrid.NetworkSecurityPerimeterSubscription","com.azure.resourcemanager.eventgrid.models.NumberGreaterThanAdvancedFilter":"Microsoft.EventGrid.NumberGreaterThanAdvancedFilter","com.azure.resourcemanager.eventgrid.models.NumberGreaterThanFilter":"Microsoft.EventGrid.NumberGreaterThanFilter","com.azure.resourcemanager.eventgrid.models.NumberGreaterThanOrEqualsAdvancedFilter":"Microsoft.EventGrid.NumberGreaterThanOrEqualsAdvancedFilter","com.azure.resourcemanager.eventgrid.models.NumberGreaterThanOrEqualsFilter":"Microsoft.EventGrid.NumberGreaterThanOrEqualsFilter","com.azure.resourcemanager.eventgrid.models.NumberInAdvancedFilter":"Microsoft.EventGrid.NumberInAdvancedFilter","com.azure.resourcemanager.eventgrid.models.NumberInFilter":"Microsoft.EventGrid.NumberInFilter","com.azure.resourcemanager.eventgrid.models.NumberInRangeAdvancedFilter":"Microsoft.EventGrid.NumberInRangeAdvancedFilter","com.azure.resourcemanager.eventgrid.models.NumberInRangeFilter":"Microsoft.EventGrid.NumberInRangeFilter","com.azure.resourcemanager.eventgrid.models.NumberLessThanAdvancedFilter":"Microsoft.EventGrid.NumberLessThanAdvancedFilter","com.azure.resourcemanager.eventgrid.models.NumberLessThanFilter":"Microsoft.EventGrid.NumberLessThanFilter","com.azure.resourcemanager.eventgrid.models.NumberLessThanOrEqualsAdvancedFilter":"Microsoft.EventGrid.NumberLessThanOrEqualsAdvancedFilter","com.azure.resourcemanager.eventgrid.models.NumberLessThanOrEqualsFilter":"Microsoft.EventGrid.NumberLessThanOrEqualsFilter","com.azure.resourcemanager.eventgrid.models.NumberNotInAdvancedFilter":"Microsoft.EventGrid.NumberNotInAdvancedFilter","com.azure.resourcemanager.eventgrid.models.NumberNotInFilter":"Microsoft.EventGrid.NumberNotInFilter","com.azure.resourcemanager.eventgrid.models.NumberNotInRangeAdvancedFilter":"Microsoft.EventGrid.NumberNotInRangeAdvancedFilter","com.azure.resourcemanager.eventgrid.models.NumberNotInRangeFilter":"Microsoft.EventGrid.NumberNotInRangeFilter","com.azure.resourcemanager.eventgrid.models.OperationInfo":"Microsoft.EventGrid.OperationInfo","com.azure.resourcemanager.eventgrid.models.Partner":"Microsoft.EventGrid.Partner","com.azure.resourcemanager.eventgrid.models.PartnerAuthorization":"Microsoft.EventGrid.PartnerAuthorization","com.azure.resourcemanager.eventgrid.models.PartnerClientAuthentication":"Microsoft.EventGrid.PartnerClientAuthentication","com.azure.resourcemanager.eventgrid.models.PartnerClientAuthenticationType":"Microsoft.EventGrid.PartnerClientAuthenticationType","com.azure.resourcemanager.eventgrid.models.PartnerConfigurationProvisioningState":"Microsoft.EventGrid.PartnerConfigurationProvisioningState","com.azure.resourcemanager.eventgrid.models.PartnerConfigurationUpdateParameters":"Microsoft.EventGrid.PartnerConfigurationUpdateParameters","com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState":"Microsoft.EventGrid.PartnerDestinationActivationState","com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo":"Microsoft.EventGrid.PartnerDestinationInfo","com.azure.resourcemanager.eventgrid.models.PartnerDestinationProvisioningState":"Microsoft.EventGrid.PartnerDestinationProvisioningState","com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters":"Microsoft.EventGrid.PartnerDestinationUpdateParameters","com.azure.resourcemanager.eventgrid.models.PartnerDetails":"Microsoft.EventGrid.PartnerDetails","com.azure.resourcemanager.eventgrid.models.PartnerEndpointType":"Microsoft.EventGrid.PartnerEndpointType","com.azure.resourcemanager.eventgrid.models.PartnerEventSubscriptionDestination":"Microsoft.EventGrid.PartnerEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.PartnerNamespaceProvisioningState":"Microsoft.EventGrid.PartnerNamespaceProvisioningState","com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyRequest":"Microsoft.EventGrid.PartnerNamespaceRegenerateKeyRequest","com.azure.resourcemanager.eventgrid.models.PartnerNamespaceUpdateParameters":"Microsoft.EventGrid.PartnerNamespaceUpdateParameters","com.azure.resourcemanager.eventgrid.models.PartnerRegistrationProvisioningState":"Microsoft.EventGrid.PartnerRegistrationProvisioningState","com.azure.resourcemanager.eventgrid.models.PartnerRegistrationUpdateParameters":"Microsoft.EventGrid.PartnerRegistrationUpdateParameters","com.azure.resourcemanager.eventgrid.models.PartnerTopicActivationState":"Microsoft.EventGrid.PartnerTopicActivationState","com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo":"Microsoft.EventGrid.PartnerTopicInfo","com.azure.resourcemanager.eventgrid.models.PartnerTopicProvisioningState":"Microsoft.EventGrid.PartnerTopicProvisioningState","com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode":"Microsoft.EventGrid.PartnerTopicRoutingMode","com.azure.resourcemanager.eventgrid.models.PartnerTopicUpdateParameters":"Microsoft.EventGrid.PartnerTopicUpdateParameters","com.azure.resourcemanager.eventgrid.models.PartnerUpdateDestinationInfo":"Microsoft.EventGrid.PartnerUpdateDestinationInfo","com.azure.resourcemanager.eventgrid.models.PartnerUpdateTopicInfo":"Microsoft.EventGrid.PartnerUpdateTopicInfo","com.azure.resourcemanager.eventgrid.models.PermissionBindingProvisioningState":"Microsoft.EventGrid.PermissionBindingProvisioningState","com.azure.resourcemanager.eventgrid.models.PermissionType":"Microsoft.EventGrid.PermissionType","com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus":"Microsoft.EventGrid.PersistedConnectionStatus","com.azure.resourcemanager.eventgrid.models.PlatformCapabilities":"Microsoft.EventGrid.PlatformCapabilities","com.azure.resourcemanager.eventgrid.models.PrivateEndpoint":"Microsoft.EventGrid.PrivateEndpoint","com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType":"Microsoft.EventGrid.PrivateEndpointConnectionsParentType","com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess":"Microsoft.EventGrid.PublicNetworkAccess","com.azure.resourcemanager.eventgrid.models.PublisherType":"Microsoft.EventGrid.PublisherType","com.azure.resourcemanager.eventgrid.models.PushInfo":"Microsoft.EventGrid.PushInfo","com.azure.resourcemanager.eventgrid.models.QueueInfo":"Microsoft.EventGrid.QueueInfo","com.azure.resourcemanager.eventgrid.models.ReadinessState":"Microsoft.EventGrid.ReadinessState","com.azure.resourcemanager.eventgrid.models.ResourceAssociation":"Microsoft.EventGrid.ResourceAssociation","com.azure.resourcemanager.eventgrid.models.ResourceKind":"Microsoft.EventGrid.ResourceKind","com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory":"Microsoft.EventGrid.ResourceMoveChangeHistory","com.azure.resourcemanager.eventgrid.models.ResourceProvisioningState":"Microsoft.EventGrid.ResourceProvisioningState","com.azure.resourcemanager.eventgrid.models.ResourceRegionType":"Microsoft.EventGrid.ResourceRegionType","com.azure.resourcemanager.eventgrid.models.ResourceSku":"Microsoft.EventGrid.ResourceSku","com.azure.resourcemanager.eventgrid.models.RetryPolicy":"Microsoft.EventGrid.RetryPolicy","com.azure.resourcemanager.eventgrid.models.RoutingEnrichments":"Microsoft.EventGrid.RoutingEnrichments","com.azure.resourcemanager.eventgrid.models.RoutingIdentityInfo":"Microsoft.EventGrid.RoutingIdentityInfo","com.azure.resourcemanager.eventgrid.models.RoutingIdentityType":"Microsoft.EventGrid.RoutingIdentityType","com.azure.resourcemanager.eventgrid.models.ServiceBusQueueEventSubscriptionDestination":"Microsoft.EventGrid.ServiceBusQueueEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.ServiceBusTopicEventSubscriptionDestination":"Microsoft.EventGrid.ServiceBusTopicEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.Sku":"Microsoft.EventGrid.Sku","com.azure.resourcemanager.eventgrid.models.SkuName":"Microsoft.EventGrid.SkuName","com.azure.resourcemanager.eventgrid.models.StaticDeliveryAttributeMapping":"Microsoft.EventGrid.StaticDeliveryAttributeMapping","com.azure.resourcemanager.eventgrid.models.StaticRoutingEnrichment":"Microsoft.EventGrid.StaticRoutingEnrichment","com.azure.resourcemanager.eventgrid.models.StaticRoutingEnrichmentType":"Microsoft.EventGrid.StaticRoutingEnrichmentType","com.azure.resourcemanager.eventgrid.models.StaticStringRoutingEnrichment":"Microsoft.EventGrid.StaticStringRoutingEnrichment","com.azure.resourcemanager.eventgrid.models.StorageBlobDeadLetterDestination":"Microsoft.EventGrid.StorageBlobDeadLetterDestination","com.azure.resourcemanager.eventgrid.models.StorageQueueEventSubscriptionDestination":"Microsoft.EventGrid.StorageQueueEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.StringBeginsWithAdvancedFilter":"Microsoft.EventGrid.StringBeginsWithAdvancedFilter","com.azure.resourcemanager.eventgrid.models.StringBeginsWithFilter":"Microsoft.EventGrid.StringBeginsWithFilter","com.azure.resourcemanager.eventgrid.models.StringContainsAdvancedFilter":"Microsoft.EventGrid.StringContainsAdvancedFilter","com.azure.resourcemanager.eventgrid.models.StringContainsFilter":"Microsoft.EventGrid.StringContainsFilter","com.azure.resourcemanager.eventgrid.models.StringEndsWithAdvancedFilter":"Microsoft.EventGrid.StringEndsWithAdvancedFilter","com.azure.resourcemanager.eventgrid.models.StringEndsWithFilter":"Microsoft.EventGrid.StringEndsWithFilter","com.azure.resourcemanager.eventgrid.models.StringInAdvancedFilter":"Microsoft.EventGrid.StringInAdvancedFilter","com.azure.resourcemanager.eventgrid.models.StringInFilter":"Microsoft.EventGrid.StringInFilter","com.azure.resourcemanager.eventgrid.models.StringNotBeginsWithAdvancedFilter":"Microsoft.EventGrid.StringNotBeginsWithAdvancedFilter","com.azure.resourcemanager.eventgrid.models.StringNotBeginsWithFilter":"Microsoft.EventGrid.StringNotBeginsWithFilter","com.azure.resourcemanager.eventgrid.models.StringNotContainsAdvancedFilter":"Microsoft.EventGrid.StringNotContainsAdvancedFilter","com.azure.resourcemanager.eventgrid.models.StringNotContainsFilter":"Microsoft.EventGrid.StringNotContainsFilter","com.azure.resourcemanager.eventgrid.models.StringNotEndsWithAdvancedFilter":"Microsoft.EventGrid.StringNotEndsWithAdvancedFilter","com.azure.resourcemanager.eventgrid.models.StringNotEndsWithFilter":"Microsoft.EventGrid.StringNotEndsWithFilter","com.azure.resourcemanager.eventgrid.models.StringNotInAdvancedFilter":"Microsoft.EventGrid.StringNotInAdvancedFilter","com.azure.resourcemanager.eventgrid.models.StringNotInFilter":"Microsoft.EventGrid.StringNotInFilter","com.azure.resourcemanager.eventgrid.models.SubscriptionProvisioningState":"Microsoft.EventGrid.SubscriptionProvisioningState","com.azure.resourcemanager.eventgrid.models.SubscriptionUpdateParameters":"Microsoft.EventGrid.SubscriptionUpdateParameters","com.azure.resourcemanager.eventgrid.models.SystemTopicUpdateParameters":"Microsoft.EventGrid.SystemTopicUpdateParameters","com.azure.resourcemanager.eventgrid.models.TlsVersion":"Microsoft.EventGrid.TlsVersion","com.azure.resourcemanager.eventgrid.models.TopicProvisioningState":"Microsoft.EventGrid.TopicProvisioningState","com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest":"Microsoft.EventGrid.TopicRegenerateKeyRequest","com.azure.resourcemanager.eventgrid.models.TopicSpaceProvisioningState":"Microsoft.EventGrid.TopicSpaceProvisioningState","com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration":"Microsoft.EventGrid.TopicSpacesConfiguration","com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState":"Microsoft.EventGrid.TopicSpacesConfigurationState","com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission":"Microsoft.EventGrid.TopicTypeAdditionalEnforcedPermission","com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState":"Microsoft.EventGrid.TopicTypeProvisioningState","com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope":"Microsoft.EventGrid.TopicTypeSourceScope","com.azure.resourcemanager.eventgrid.models.TopicUpdateParameters":"Microsoft.EventGrid.TopicUpdateParameters","com.azure.resourcemanager.eventgrid.models.TopicsConfiguration":"Microsoft.EventGrid.TopicsConfiguration","com.azure.resourcemanager.eventgrid.models.UpdateAutoScaleConfiguration":"Microsoft.EventGrid.UpdateAutoScaleConfiguration","com.azure.resourcemanager.eventgrid.models.UpdateTopicSpacesConfigurationInfo":"Microsoft.EventGrid.UpdateTopicSpacesConfigurationInfo","com.azure.resourcemanager.eventgrid.models.UpdateTopicsConfigurationInfo":"Microsoft.EventGrid.UpdateTopicsConfigurationInfo","com.azure.resourcemanager.eventgrid.models.UserIdentityProperties":"Microsoft.EventGrid.UserIdentityProperties","com.azure.resourcemanager.eventgrid.models.VerifiedPartnerProvisioningState":"Microsoft.EventGrid.VerifiedPartnerProvisioningState","com.azure.resourcemanager.eventgrid.models.WebhookAuthenticationSettings":"Microsoft.EventGrid.WebhookAuthenticationSettings","com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination":"Microsoft.EventGrid.WebHookEventSubscriptionDestination","com.azure.resourcemanager.eventgrid.models.WebhookPartnerDestinationInfo":"Microsoft.EventGrid.WebhookPartnerDestinationInfo","com.azure.resourcemanager.eventgrid.models.WebhookUpdatePartnerDestinationInfo":"Microsoft.EventGrid.WebhookUpdatePartnerDestinationInfo"},"generatedFiles":["src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/CaCertificatesClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientGroupsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicEventSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespacesClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PermissionBindingsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicSpacesClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureADPartnerClientAuthenticationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureFunctionEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CustomDomainOwnershipValidationResultInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/MonitorAlertEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceSharedAccessKeysInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicUpdateParameterProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceUpdateParameterProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationIssuesProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NetworkSecurityPerimeterProfileAccessRuleProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerRegistrationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerTopicProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PermissionBindingProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionFullUrlInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicUpdateParameterProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookPartnerDestinationProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/eventgrid/fluent/package-info.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/CustomDomainOwnershipValidationResultImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DeliveryAttributeListResultImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainSharedAccessKeysImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionFullUrlImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventTypeImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceSharedAccessKeysImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceSharedAccessKeysImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionFullUrlImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSharedAccessKeysImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/CaCertificatesListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/ChannelsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/ClientGroupsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/ClientsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/DomainTopicsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/DomainsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/EventSubscriptionsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/EventTypesListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/NamespaceTopicsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/NamespacesListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/NetworkSecurityPerimeterConfigurationList.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/OperationsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerConfigurationsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerDestinationsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerNamespacesListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerRegistrationsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PartnerTopicsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PermissionBindingsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/PrivateLinkResourcesListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/SubscriptionsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/SystemTopicsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/TopicSpacesListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/TopicTypesListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/TopicsListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/models/VerifiedPartnersListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/implementation/package-info.java","src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/AlternativeAuthenticationNameSource.java","src/main/java/com/azure/resourcemanager/eventgrid/models/AutoScaleConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/AzureADPartnerClientAuthentication.java","src/main/java/com/azure/resourcemanager/eventgrid/models/AzureFunctionEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificate.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificateProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificates.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Client.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthenticationSettings.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateAuthentication.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateValidationScheme.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroups.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ClientProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ClientState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Clients.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialCompute.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ConfidentialComputeMode.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainIdentityType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainOwnershipValidationResult.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomDomainValidationState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationManagedIdentity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationManagedIdentityType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomJwtAuthenticationSettings.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomWebhookAuthenticationManagedIdentityType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/CustomerManagedKeyEncryption.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterEndPointType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeListResult.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryMode.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeliverySchema.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainRegenerateKeyRequest.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainSharedAccessKeys.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopic.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicEventSubscriptions.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopics.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java","src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicRoutingEnrichment.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EncodedIssuerCertificateInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventHubEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventInputSchema.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFullUrl.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypeInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopic.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java","src/main/java/com/azure/resourcemanager/eventgrid/models/FederatedIdentityCredentialInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Filter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/FilterOperatorType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/FiltersConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java","src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java","src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java","src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IpAddressType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/IssuerCertificateInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/JsonField.java","src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java","src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java","src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryption.java","src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionIdentityType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyIdentity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/KeyEncryptionKeyStatus.java","src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/MonitorAlertSeverity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Namespace.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceRegenerateKeyRequest.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSharedAccessKeys.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSku.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopic.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptions.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopics.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Namespaces.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterAssociationAccessMode.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssueSeverity.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssueType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationIssues.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurationProfile.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterConfigurations.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterProfileAccessRule.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterProfileAccessRuleDirection.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterResourceType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NetworkSecurityPerimeterSubscription.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Operation.java","src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthentication.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthenticationType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationActivationState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDetails.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEndpointType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceSharedAccessKeys.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicActivationState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicEventSubscriptions.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicRoutingMode.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopics.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateDestinationInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateTopicInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBinding.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindings.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PlatformCapabilities.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PublisherType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/PushInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/QueueInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceAssociation.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceKind.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceMoveChangeHistory.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceRegionType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceSku.java","src/main/java/com/azure/resourcemanager/eventgrid/models/RetryPolicy.java","src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingEnrichments.java","src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Sku.java","src/main/java/com/azure/resourcemanager/eventgrid/models/SkuName.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichment.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichmentType.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StaticStringRoutingEnrichment.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringInFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInFilter.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Subscription.java","src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionFullUrl.java","src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java","src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java","src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TlsVersion.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicRegenerateKeyRequest.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSharedAccessKeys.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpace.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaceProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaces.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfigurationState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeAdditionalEnforcedPermission.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeSourceScope.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypes.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java","src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java","src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateAutoScaleConfiguration.java","src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicSpacesConfigurationInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicsConfigurationInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java","src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java","src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java","src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookAuthenticationSettings.java","src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java","src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookPartnerDestinationInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookUpdatePartnerDestinationInfo.java","src/main/java/com/azure/resourcemanager/eventgrid/models/package-info.java","src/main/java/com/azure/resourcemanager/eventgrid/package-info.java","src/main/java/module-info.java"]} \ 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 9d7110fa48ab9..68be7530986cb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class CaCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * CaCertificates_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 26a6d1d59920f..bd7bbfdfc97f7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class CaCertificatesDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * CaCertificates_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 106784f07a203..ecef66e8f266b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class CaCertificatesGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * CaCertificates_Get.json + * x-ms-original-file: 2026-06-15-preview/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 63c5c885955af..547189ff765dd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class CaCertificatesListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * CaCertificates_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/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 58c821da90a79..a407b5e6eacf1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class ChannelsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Channels_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 b5fd084a4f816..f2b4857e8e042 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ChannelsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Delete. - * json + * x-ms-original-file: 2026-06-15-preview/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 279470879c3e9..49e678b372540 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ChannelsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Channels_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/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 9755f986185e4..4ee5882bff911 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ChannelsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Get. - * json + * x-ms-original-file: 2026-06-15-preview/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 768ad502b29a6..c8eef71821474 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ChannelsListByPartnerNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Channels_ListByPartnerNamespace.json + * x-ms-original-file: 2026-06-15-preview/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 bc659d2956db6..c6184aff80629 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,9 +12,7 @@ */ public final class ChannelsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Channels_Update. - * json + * x-ms-original-file: 2026-06-15-preview/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 7cee7df6051da..21bbfd774d8b5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ClientGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * ClientGroups_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 58d6cbc03c39f..6836f2c2efbe3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ClientGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * ClientGroups_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 565371a3e1407..a128847bc05f0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ClientGroupsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ClientGroups_Get - * .json + * x-ms-original-file: 2026-06-15-preview/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 906acd3181419..c25748a5e6425 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ClientGroupsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * ClientGroups_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/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 add60e6907a9a..2655f6ef34163 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -18,9 +18,7 @@ */ public final class ClientsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Clients_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 919fb4000d4af..5aad8deda167b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ClientsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Delete. - * json + * x-ms-original-file: 2026-06-15-preview/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 99bffe75e7273..fbe1ea96358ad 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,8 +9,7 @@ */ public final class ClientsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Clients_Get.json + * x-ms-original-file: 2026-06-15-preview/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 30f99f82c043f..ba2caef4c93d7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ClientsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Clients_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/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 caa4f25303038..740f6f4e5ebb7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class DomainEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 00c1028ef9718..df9d9eda008c8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 d037cc2267370..d4ad3b364b220 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/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 3bb69680d8741..b9716069c2fb2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/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 47c36d217afa7..2287376bb99f0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/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 abbd9a1fb5532..46ca7aae13cde 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_List.json + * x-ms-original-file: 2026-06-15-preview/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 2b3a73e0da4b5..5d45a80f4a331 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,9 +14,7 @@ */ public final class DomainEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/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 c04292442bc62..eec8fdbfcc000 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 7c57178ba70e7..6ba5c569be70a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 e3524d8ac95df..e804a2cc280e1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/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 3cd1df518e032..9776c5e4d64ae 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/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 fd7e6eb5a74a4..d944f0f209767 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/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 414ddd47bd837..7380c7d3cccdb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_List.json + * x-ms-original-file: 2026-06-15-preview/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 1814a490422f2..d5786fdfb170c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,9 +14,7 @@ */ public final class DomainTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/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 96704bd54ef85..f2c16f50a7213 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 dd08f6e8b20e8..76ea3ce8860ef 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopics_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 4bab18165868b..5f18b3909d61c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/DomainTopics_Get - * .json + * x-ms-original-file: 2026-06-15-preview/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 947982296eaf3..2fd8ac18e0096 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainTopicsListByDomainSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * DomainTopics_ListByDomain.json + * x-ms-original-file: 2026-06-15-preview/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 e7fd81a407b6c..9faa70e6e1410 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,9 +16,7 @@ */ public final class DomainsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 607c98fa5d983..55e079a1c9206 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Delete. - * json + * x-ms-original-file: 2026-06-15-preview/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 4ba330ba5255e..a01a3786faafe 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,8 +9,7 @@ */ public final class DomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Get.json + * x-ms-original-file: 2026-06-15-preview/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 c7a89b4879a8a..ce1abe4daa20f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 9187e0728890e..851134b564d89 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 2af5bf506f9ef..09e793043d852 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class DomainsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/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 4921af40b4ed1..170d505295c12 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class DomainsRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Domains_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/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 b060b4eb5141b..f51b78dd825d7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,9 +17,7 @@ */ public final class DomainsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Domains_Update. - * json + * x-ms-original-file: 2026-06-15-preview/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 5c30d540bb049..1bc0bf7d40f67 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -19,9 +19,7 @@ */ public final class EventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination. @@ -43,9 +41,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForSubscription.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForSubscription. @@ -64,8 +60,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination. @@ -90,9 +85,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForResource.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResource. @@ -113,9 +106,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic. @@ -137,9 +128,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResourceGroup. @@ -159,9 +148,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination. @@ -187,8 +174,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestina /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination. @@ -216,8 +202,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDes /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination. @@ -243,8 +228,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDe /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json + * 2026-06-15-preview/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination. @@ -270,8 +254,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectio /* * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json + * 2026-06-15-preview/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 6e9e879dec23d..830284c15d718 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_DeleteForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_DeleteForCustomTopic.json */ /** * Sample code: EventSubscriptions_DeleteForCustomTopic. @@ -27,9 +25,7 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_DeleteForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_DeleteForResourceGroup.json */ /** * Sample code: EventSubscriptions_DeleteForResourceGroup. @@ -44,9 +40,7 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_DeleteForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_DeleteForSubscription.json */ /** * Sample code: EventSubscriptions_DeleteForSubscription. @@ -61,9 +55,7 @@ public final class EventSubscriptionsDeleteSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_DeleteForResource.json + * x-ms-original-file: 2026-06-15-preview/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 81e632efb47cb..5cf300329c309 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/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 55246087d3ff3..246359602f6ea 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetFullUrlForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetFullUrlForResource.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResource. @@ -27,9 +25,7 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetFullUrlForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetFullUrlForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResourceGroup. @@ -44,9 +40,7 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetFullUrlForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetFullUrlForSubscription.json */ /** * Sample code: EventSubscriptions_GetFullUrlForSubscription. @@ -61,9 +55,7 @@ public final class EventSubscriptionsGetFullUrlSamples { } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetFullUrlForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/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 5744eabc5870e..8a8515e9d23ad 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_HybridConnectionDestination. @@ -27,9 +25,7 @@ public static void eventSubscriptionsGetForCustomTopicHybridConnectionDestinatio } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination. @@ -45,9 +41,7 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusTopicDestination } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetForResourceGroup. @@ -62,9 +56,7 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusTopicDestination } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_EventHubDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_EventHubDestination. @@ -80,9 +72,7 @@ public static void eventSubscriptionsGetForCustomTopicEventHubDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForSubscription.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForSubscription.json */ /** * Sample code: EventSubscriptions_GetForSubscription. @@ -97,9 +87,7 @@ public static void eventSubscriptionsGetForCustomTopicEventHubDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_WebhookDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_WebhookDestination. @@ -115,9 +103,7 @@ public static void eventSubscriptionsGetForCustomTopicWebhookDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_AzureFunctionDestination. @@ -133,9 +119,7 @@ public static void eventSubscriptionsGetForCustomTopicAzureFunctionDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic. @@ -151,9 +135,7 @@ public static void eventSubscriptionsGetForCustomTopicAzureFunctionDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_StorageQueueDestination. @@ -169,9 +151,7 @@ public static void eventSubscriptionsGetForCustomTopicStorageQueueDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_GetForResource.json */ /** * Sample code: EventSubscriptions_GetForResource. @@ -186,9 +166,7 @@ public static void eventSubscriptionsGetForResource(com.azure.resourcemanager.ev } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: 2026-06-15-preview/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 a28fd8053e36d..0cf392f1b48ec 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListByDomainTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListByDomainTopic.json + * x-ms-original-file: 2026-06-15-preview/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 ae1ebb64cdc71..9c2598349d341 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListGlobalByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 a00a923d35962..6bc46965e9266 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListByResource.json + * x-ms-original-file: 2026-06-15-preview/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 0865e56cb89f0..838d61ad99647 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListGlobalByResourceGroupForTopicType.json + * x-ms-original-file: 2026-06-15-preview/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 306ee3552cefb..96e7353d2db91 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListGlobalBySubscriptionForTopicType.json + * x-ms-original-file: 2026-06-15-preview/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 24588edbc2b56..15d08f0ff7a15 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListRegionalByResourceGroupForTopicType.json + * x-ms-original-file: 2026-06-15-preview/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 2699cd8d76d79..9fbb3d570984a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListRegionalByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListRegionalByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 b766fc16b3bf1..60f0e5a6a4e49 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListRegionalBySubscriptionForTopicType.json + * x-ms-original-file: 2026-06-15-preview/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 e4c2b7f3b9f5f..5b7080fe01b34 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListRegionalBySubscriptionSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListRegionalBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 63141dda9235c..bfc23b858474c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class EventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_ListGlobalBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 a9489b0c8b962..c8e4667a8874e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,9 +21,7 @@ */ public final class EventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_EventHubDestination. @@ -48,9 +46,7 @@ public static void eventSubscriptionsUpdateForCustomTopicEventHubDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination. @@ -77,9 +73,7 @@ public static void eventSubscriptionsUpdateForCustomTopicAzureFunctionDestinatio } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_WebhookDestination. @@ -103,9 +97,7 @@ public static void eventSubscriptionsUpdateForCustomTopicWebhookDestination( } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination. @@ -134,9 +126,7 @@ public static void eventSubscriptionsUpdateForCustomTopicStorageQueueDestination } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination. @@ -161,9 +151,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination. @@ -188,9 +176,7 @@ public static void eventSubscriptionsUpdateForCustomTopicHybridConnectionDestina } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination. @@ -217,9 +203,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForCustomTopic.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic. @@ -243,9 +227,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForResource.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForResource.json */ /** * Sample code: EventSubscriptions_UpdateForResource. @@ -269,9 +251,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/EventSubscriptions_UpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_UpdateForResourceGroup. @@ -295,9 +275,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * EventSubscriptions_UpdateForSubscription.json + * x-ms-original-file: 2026-06-15-preview/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 40f213098924c..849285fe1d616 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class ExtensionTopicsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * ExtensionTopics_Get.json + * x-ms-original-file: 2026-06-15-preview/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 afb8dc0859456..afb9cc0742ef7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,9 +15,7 @@ */ public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 60ef933505f70..dc9deeb690e84 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 b9e54f11a1a15..0c7ff02fda3a4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/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 5e08560ea3652..1dcffdf574eb7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/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 d6d6e2161be91..2ee551625f0f1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/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 e5ec0864daeab..3da2d036a8d27 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json + * x-ms-original-file: 2026-06-15-preview/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 7b652fb9e89d9..8a76165c9e28a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,9 +16,7 @@ */ public final class NamespaceTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/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 595997636ad39..085abecb31dc4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,9 +12,7 @@ */ public final class NamespaceTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 dbcdbad55c4c6..cd93eecb6c8ff 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 8b5dde66406c0..44f3481290450 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_Get.json + * x-ms-original-file: 2026-06-15-preview/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 6463ceed6d6c3..a7bd912684e0d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/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 2a6df0406a04a..c41b334fb8b32 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespaceTopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/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 2c3622d8bf537..00b163a69762b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class NamespaceTopicsRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/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 5555883754e2c..a7662ef813092 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class NamespaceTopicsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NamespaceTopics_Update.json + * x-ms-original-file: 2026-06-15-preview/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 2400db8d8b93e..3a392f0f0fc1f 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; +import com.azure.resourcemanager.eventgrid.models.IpAddressType; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState; import java.util.HashMap; @@ -14,9 +15,7 @@ */ public final class NamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_CreateOrUpdate.json */ /** * Sample code: Namespaces_CreateOrUpdate. @@ -33,6 +32,7 @@ public static void namespacesCreateOrUpdate(com.azure.resourcemanager.eventgrid. .withState(TopicSpacesConfigurationState.ENABLED) .withRouteTopicResourceId( "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampleTopic1")) + .withIpAddressType(IpAddressType.DUAL_STACK) .create(); } 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 a9e38c693d1ac..03068564d8887 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespacesDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 27a55f45f18b7..93a6cecd2a032 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Namespaces_Get. - * json + * x-ms-original-file: 2026-06-15-preview/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 d6cc14ecf9066..f96b2eeb36776 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 87fe8c38a46b9..57ff231ac99c0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespacesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 928f0c01e4ec0..b03234d405fe2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/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 0e565ff969b2b..ab0d87382ee26 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class NamespacesRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/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 31331051318fb..5e83e66e94fb4 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; +import com.azure.resourcemanager.eventgrid.models.IpAddressType; import com.azure.resourcemanager.eventgrid.models.Namespace; import java.util.HashMap; import java.util.Map; @@ -13,9 +14,7 @@ */ public final class NamespacesUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_Update.json + * x-ms-original-file: 2026-06-15-preview/Namespaces_Update.json */ /** * Sample code: Namespaces_Update. @@ -26,7 +25,7 @@ public static void namespacesUpdate(com.azure.resourcemanager.eventgrid.EventGri Namespace resource = manager.namespaces() .getByResourceGroupWithResponse("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("tag1", "value1Updated")).apply(); + resource.update().withTags(mapOf("tag1", "value1Updated")).withIpAddressType(IpAddressType.DUAL_STACK).apply(); } // Use "Map.of" if available 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 f889a72300b02..72007cf451635 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class NamespacesValidateCustomDomainOwnershipSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Namespaces_ValidateCustomDomainOwnership.json + * x-ms-original-file: 2026-06-15-preview/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 4ab017e2a473d..19b9c57d1774d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_Get.json + * x-ms-original-file: 2026-06-15-preview/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 18bac231e9800..137ab7d40fb54 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_List.json + * x-ms-original-file: 2026-06-15-preview/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 3c90622249259..c37f3b8b16735 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * NetworkSecurityPerimeterConfigurations_Reconcile.json + * x-ms-original-file: 2026-06-15-preview/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 23217e4f2ce51..6df39e268f105 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Operations_List. - * json + * x-ms-original-file: 2026-06-15-preview/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 54051afe207f3..c7e81966c1c9b 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 @@ -1,21 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; import com.azure.resourcemanager.eventgrid.models.Partner; import java.time.OffsetDateTime; -import java.util.UUID; /** * Samples for PartnerConfigurations AuthorizePartner. */ public final class PartnerConfigurationsAuthorizePartnerSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_AuthorizePartner.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_AuthorizePartner.json */ /** * Sample code: PartnerConfigurations_AuthorizePartner. @@ -26,8 +23,7 @@ public final class PartnerConfigurationsAuthorizePartnerSamples { partnerConfigurationsAuthorizePartner(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.partnerConfigurations() .authorizePartnerWithResponse("examplerg", - new Partner() - .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) + new Partner().withPartnerRegistrationImmutableId("941892bc-f5d0-4d1c-8fb5-477570fc2b71") .withPartnerName("Contoso.Finance") .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), com.azure.core.util.Context.NONE); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java index e4b039afba1c5..782f7c88c2a28 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,16 +9,13 @@ import com.azure.resourcemanager.eventgrid.models.PartnerAuthorization; import java.time.OffsetDateTime; import java.util.Arrays; -import java.util.UUID; /** * Samples for PartnerConfigurations CreateOrUpdate. */ public final class PartnerConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_CreateOrUpdate.json */ /** * Sample code: PartnerConfigurations_CreateOrUpdate. @@ -29,20 +26,15 @@ public final class PartnerConfigurationsCreateOrUpdateSamples { partnerConfigurationsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.partnerConfigurations() .createOrUpdate("examplerg", - new PartnerConfigurationInner() - .withPartnerAuthorization(new PartnerAuthorization().withDefaultMaximumExpirationTimeInDays(10) - .withAuthorizedPartnersList(Arrays.asList( - new Partner() - .withPartnerRegistrationImmutableId( - UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) - .withPartnerName("Contoso.Finance") - .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), - new Partner() - .withPartnerRegistrationImmutableId( - UUID.fromString("5362bdb6-ce3e-4d0d-9a5b-3eb92c8aab38")) - .withPartnerName("fabrikam.HR") - .withAuthorizationExpirationTimeInUtc( - OffsetDateTime.parse("2022-02-20T01:00:00.142Z"))))), + new PartnerConfigurationInner().withPartnerAuthorization(new PartnerAuthorization() + .withDefaultMaximumExpirationTimeInDays(10) + .withAuthorizedPartnersList(Arrays.asList( + new Partner().withPartnerRegistrationImmutableId("941892bc-f5d0-4d1c-8fb5-477570fc2b71") + .withPartnerName("Contoso.Finance") + .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), + new Partner().withPartnerRegistrationImmutableId("5362bdb6-ce3e-4d0d-9a5b-3eb92c8aab38") + .withPartnerName("fabrikam.HR") + .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-02-20T01:00:00.142Z"))))), com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java index 39e04568cf8d2..f1fadc9e68c3a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 cc6fe0c959587..0630a08b70a50 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerConfigurationsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_Get.json + * x-ms-original-file: 2026-06-15-preview/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 9d6ae451471db..bd6caa94c8759 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerConfigurationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 6badb654aa184..01c9f872947b1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerConfigurationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 c3305b827125e..8cbb1dc2c4497 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 @@ -1,21 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; import com.azure.resourcemanager.eventgrid.models.Partner; import java.time.OffsetDateTime; -import java.util.UUID; /** * Samples for PartnerConfigurations UnauthorizePartner. */ public final class PartnerConfigurationsUnauthorizePartnerSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_UnauthorizePartner.json + * x-ms-original-file: 2026-06-15-preview/PartnerConfigurations_UnauthorizePartner.json */ /** * Sample code: PartnerConfigurations_UnauthorizePartner. @@ -26,8 +23,7 @@ public final class PartnerConfigurationsUnauthorizePartnerSamples { partnerConfigurationsUnauthorizePartner(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.partnerConfigurations() .unauthorizePartnerWithResponse("examplerg", - new Partner() - .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) + new Partner().withPartnerRegistrationImmutableId("941892bc-f5d0-4d1c-8fb5-477570fc2b71") .withPartnerName("Contoso.Finance") .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), com.azure.core.util.Context.NONE); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java index 96c19be8842cf..e885751b1560c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class PartnerConfigurationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerConfigurations_Update.json + * x-ms-original-file: 2026-06-15-preview/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 c91eeb0d5652a..85c39931b3305 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerDestinationsActivateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_Activate.json + * x-ms-original-file: 2026-06-15-preview/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 e461e9fac4623..94b4908cfa479 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 @@ -1,20 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; import java.time.OffsetDateTime; -import java.util.UUID; /** * Samples for PartnerDestinations CreateOrUpdate. */ public final class PartnerDestinationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerDestinations_CreateOrUpdate.json */ /** * Sample code: PartnerDestinations_CreateOrUpdate. @@ -26,7 +23,7 @@ public static void partnerDestinationsCreateOrUpdate(com.azure.resourcemanager.e .define("examplePartnerDestinationName1") .withRegion("westus2") .withExistingResourceGroup("examplerg") - .withPartnerRegistrationImmutableId(UUID.fromString("0bd70ee2-7d95-447e-ab1f-c4f320019404")) + .withPartnerRegistrationImmutableId("0bd70ee2-7d95-447e-ab1f-c4f320019404") .withEndpointServiceContext("This is an example") .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-14T19:33:43.430Z")) .withEndpointBaseUrl("https://www.example/endpoint") 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 a271cfa6ee62e..580f8daed49e6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerDestinationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 d259ca05c3f43..4c5ed45b99337 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerDestinationsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_Get.json + * x-ms-original-file: 2026-06-15-preview/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 77d09e25ce6c3..c72f7998c6eae 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerDestinationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 aaa8751bda886..994c9764a67a7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerDestinationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 c54d8291a9c3a..fb262646a8575 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class PartnerDestinationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerDestinations_Update.json + * x-ms-original-file: 2026-06-15-preview/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 d9939d56bb052..b8911c33c76fe 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,9 +12,7 @@ */ public final class PartnerNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 309e3d5954810..aed50112ea48e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerNamespacesDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 02bfee469a7a2..f1633f43653c8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerNamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_Get.json + * x-ms-original-file: 2026-06-15-preview/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 7cadcab1d79c1..fd544a8078329 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerNamespacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 f7d61e3628257..39da116fc975b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerNamespacesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 7a9ab9a7840f7..da83616a3d6fd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerNamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/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 faf526deea1f3..0a1fec1405fca 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class PartnerNamespacesRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/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 7087cab04bf20..7db0ce873e076 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class PartnerNamespacesUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerNamespaces_Update.json + * x-ms-original-file: 2026-06-15-preview/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 de110f30502b9..729de04c899d0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,9 +12,7 @@ */ public final class PartnerRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 0adc06d7d50c7..568fe9cab1950 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerRegistrationsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 c82f0f93f8ad2..31ea352e2c551 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerRegistrationsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_Get.json + * x-ms-original-file: 2026-06-15-preview/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 f7ab83227e5e7..87b717062fb9c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerRegistrationsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 b0aefaae1b8d1..4427ade30b244 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerRegistrationsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 71cfbb13725f5..d8cc4ca113f3e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class PartnerRegistrationsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerRegistrations_Update.json + * x-ms-original-file: 2026-06-15-preview/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 05ef7603b27e5..89c3de7ff4d0d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 19cd286f1f6d1..51e59ac9f0611 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 e51bd4ac18dd9..c391c5216fda1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/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 4faf37efa34cd..695c8a41b8c70 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/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 7aacfceaa6ec6..269bfabaebbfe 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/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 e91c5f39cda38..1f5f4caf38398 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_ListByPartnerTopic.json + * x-ms-original-file: 2026-06-15-preview/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 4e25139ca33df..028159de16690 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,9 +14,7 @@ */ public final class PartnerTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/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 9c2c9bbc89b48..26ded3e7e3212 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicsActivateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Activate.json + * x-ms-original-file: 2026-06-15-preview/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 2e60606c92cb3..f31650b9245de 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 @@ -1,20 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; import java.time.OffsetDateTime; -import java.util.UUID; /** * Samples for PartnerTopics CreateOrUpdate. */ public final class PartnerTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/PartnerTopics_CreateOrUpdate.json */ /** * Sample code: PartnerTopics_CreateOrUpdate. @@ -26,7 +23,7 @@ public static void partnerTopicsCreateOrUpdate(com.azure.resourcemanager.eventgr .define("examplePartnerTopicName1") .withRegion("westus2") .withExistingResourceGroup("examplerg") - .withPartnerRegistrationImmutableId(UUID.fromString("6f541064-031d-4cc8-9ec3-a3b4fc0f7185")) + .withPartnerRegistrationImmutableId("6f541064-031d-4cc8-9ec3-a3b4fc0f7185") .withSource("ContosoCorp.Accounts.User1") .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-23T23:06:13.109Z")) .withPartnerTopicFriendlyDescription("Example description") 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 02d266b3c0a1c..a397d57c1cf52 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicsDeactivateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Deactivate.json + * x-ms-original-file: 2026-06-15-preview/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 34bd381d676e6..a01f3b259ac87 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 f030b373d79eb..6befe51f8746e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Get.json + * x-ms-original-file: 2026-06-15-preview/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 12e74cc458501..40d52dcf713ef 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 686089baf3d1d..ba1b1cb05aab9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PartnerTopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 cf6a4fabc1c45..b7c82ce989c71 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class PartnerTopicsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PartnerTopics_Update.json + * x-ms-original-file: 2026-06-15-preview/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 a0704c57c5078..12ac0657365e9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class PermissionBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PermissionBindings_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 16f67d273e768..88e44d0df5c87 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PermissionBindingsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PermissionBindings_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 ffdd3b7d18e43..62acf5bd7aa26 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PermissionBindingsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PermissionBindings_Get.json + * x-ms-original-file: 2026-06-15-preview/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 a769d9ec8cf61..a610ec90e5aa4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PermissionBindingsListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PermissionBindings_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/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 52812fe1fc7b4..48deb922c2edb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateEndpointConnections_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 8585285087477..2e17d1bc565d1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateEndpointConnections_Get.json + * x-ms-original-file: 2026-06-15-preview/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 03408866167b5..6b440bc8bfe66 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class PrivateEndpointConnectionsListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateEndpointConnections_ListByResource.json + * x-ms-original-file: 2026-06-15-preview/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 4beaa9295519b..3857d4c2aa564 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,9 +14,7 @@ */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateEndpointConnections_Update.json + * x-ms-original-file: 2026-06-15-preview/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 aa54de5f7ff66..02da67587e1b0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateLinkResources_Get.json + * x-ms-original-file: 2026-06-15-preview/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 885150ad74fe9..8cad2e0c79478 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class PrivateLinkResourcesListByResourceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * PrivateLinkResources_ListByResource.json + * x-ms-original-file: 2026-06-15-preview/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 34b71e1cdda77..9b47f2851b15b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 c3fe2df5f9ff8..b94ce2bb6ffeb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 56ac3bc3bd09b..582d02e9a13eb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/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 8a8919f544b76..7dcfa4db70989 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/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 500ad7b6e044c..413a42769042d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/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 4d5952f073e28..5b6cc92e52ac4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_ListBySystemTopic.json + * x-ms-original-file: 2026-06-15-preview/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 71f60c1be6bf6..76d9ebeed1e0c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,9 +14,7 @@ */ public final class SystemTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/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 ba41b4ac38fec..4b73e91dc1b69 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 @@ -1,9 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; +import com.azure.resourcemanager.eventgrid.models.ConfidentialCompute; +import com.azure.resourcemanager.eventgrid.models.ConfidentialComputeMode; +import com.azure.resourcemanager.eventgrid.models.CustomerManagedKeyEncryption; +import com.azure.resourcemanager.eventgrid.models.IdentityInfo; +import com.azure.resourcemanager.eventgrid.models.IdentityType; +import com.azure.resourcemanager.eventgrid.models.KeyEncryption; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionIdentityType; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionKeyIdentity; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; +import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -12,9 +23,7 @@ */ public final class SystemTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/SystemTopics_CreateOrUpdate.json */ /** * Sample code: SystemTopics_CreateOrUpdate. @@ -24,12 +33,24 @@ public final class SystemTopicsCreateOrUpdateSamples { public static void systemTopicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager.systemTopics() .define("exampleSystemTopic1") - .withRegion("westus2") + .withRegion("centraluseuap") .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id", + new UserIdentityProperties()))) .withSource( "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") .withTopicType("microsoft.storage.storageaccounts") + .withEncryption(new KeyEncryption().withCustomerManagedKeyEncryption( + Arrays.asList(new CustomerManagedKeyEncryption().withKeyEncryptionKeyUrl("fakeTokenPlaceholder") + .withKeyEncryptionKeyIdentity(new KeyEncryptionKeyIdentity() + .withType(KeyEncryptionIdentityType.USER_ASSIGNED) + .withUserAssignedIdentityResourceId( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id"))))) + .withPlatformCapabilities(new PlatformCapabilities() + .withConfidentialCompute(new ConfidentialCompute().withMode(ConfidentialComputeMode.ENABLED))) .create(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java index e3a5189023bde..ca9aabd7364e6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 1b5ab974f91e4..80c51df2c6f29 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/SystemTopics_Get - * .json + * x-ms-original-file: 2026-06-15-preview/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 03a9e150bd566..113cd20436560 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 758b87abd770e..f781e3adcfc20 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class SystemTopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 03b34268f993a..cbc77a37a795b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class SystemTopicsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * SystemTopics_Update.json + * x-ms-original-file: 2026-06-15-preview/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 c0ba5a4e6d1ad..83ccac7d3f1d2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,9 +13,7 @@ */ public final class TopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 ceb7c685bf5a7..7ddf6515015c8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 e692c6d39816c..feae1491e2ddc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: 2026-06-15-preview/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 35b2ea1a2131a..bda32d54d40aa 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: 2026-06-15-preview/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 2aab000db3545..d522f6a0657da 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_Get.json + * x-ms-original-file: 2026-06-15-preview/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 d2d6513e3d19a..2914b39a92949 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicEventSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_List.json + * x-ms-original-file: 2026-06-15-preview/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 3fe9648720bab..005eca45263db 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,9 +14,7 @@ */ public final class TopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicEventSubscriptions_Update.json + * x-ms-original-file: 2026-06-15-preview/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 a73f120a9d3f3..a70e9868ca8f5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class TopicSpacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicSpaces_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/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 6c6acf7602e56..fa875fd63ddfe 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicSpacesDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicSpaces_Delete.json + * x-ms-original-file: 2026-06-15-preview/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 09de293198897..4fe9288856b5d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicSpacesGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicSpaces_Get. - * json + * x-ms-original-file: 2026-06-15-preview/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 33b67b1d9d6e9..6ceccc2232a4c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicSpacesListByNamespaceSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicSpaces_ListByNamespace.json + * x-ms-original-file: 2026-06-15-preview/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 dcc67d4e87b3c..4e99e4e7465a5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicTypesGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_Get. - * json + * x-ms-original-file: 2026-06-15-preview/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 61e1064e32449..0710db693c580 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicTypesListEventTypesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * TopicTypes_ListEventTypes.json + * x-ms-original-file: 2026-06-15-preview/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 e0d9fd2318b04..130bd24a56e06 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicTypesListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/TopicTypes_List. - * json + * x-ms-original-file: 2026-06-15-preview/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 81f32629daad1..bcaed772e1da5 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 @@ -1,15 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; +import com.azure.resourcemanager.eventgrid.models.ConfidentialCompute; +import com.azure.resourcemanager.eventgrid.models.ConfidentialComputeMode; +import com.azure.resourcemanager.eventgrid.models.CustomerManagedKeyEncryption; import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; -import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.IdentityInfo; +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.KeyEncryption; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionIdentityType; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionKeyIdentity; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; import com.azure.resourcemanager.eventgrid.models.ResourceKind; +import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -19,9 +26,7 @@ */ public final class TopicsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_CreateOrUpdate.json + * x-ms-original-file: 2026-06-15-preview/Topics_CreateOrUpdate.json */ /** * Sample code: Topics_CreateOrUpdate. @@ -34,17 +39,23 @@ public static void topicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.Even .withRegion("westus2") .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("12.18.30.15").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("12.18.176.1").withAction(IpActionType.ALLOW))) + .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id", + new UserIdentityProperties()))) + .withEncryption(new KeyEncryption().withCustomerManagedKeyEncryption( + Arrays.asList(new CustomerManagedKeyEncryption().withKeyEncryptionKeyUrl("fakeTokenPlaceholder") + .withKeyEncryptionKeyIdentity(new KeyEncryptionKeyIdentity() + .withType(KeyEncryptionIdentityType.USER_ASSIGNED) + .withUserAssignedIdentityResourceId( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id"))))) + .withPlatformCapabilities(new PlatformCapabilities() + .withConfidentialCompute(new ConfidentialCompute().withMode(ConfidentialComputeMode.ENABLED))) .create(); } /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_CreateOrUpdateForAzureArc.json + * x-ms-original-file: 2026-06-15-preview/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 88a1148215889..3b4483b533fac 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicsDeleteSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Delete. - * json + * x-ms-original-file: 2026-06-15-preview/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 92b05648bbea5..bbf7acb5cb85d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,8 +9,7 @@ */ public final class TopicsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Get.json + * x-ms-original-file: 2026-06-15-preview/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 47ac7b4f74bbc..bd112693e265f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_ListByResourceGroup.json + * x-ms-original-file: 2026-06-15-preview/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 575acd0997d72..b57f70f80967c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicsListEventTypesSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_ListEventTypes.json + * x-ms-original-file: 2026-06-15-preview/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 3f1bb37159f8c..b8a77d0410fff 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicsListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_ListBySubscription.json + * x-ms-original-file: 2026-06-15-preview/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 825ad71bf60d0..0d1e378c0b530 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class TopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_ListSharedAccessKeys.json + * x-ms-original-file: 2026-06-15-preview/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 47b74ec10d3e1..19e0ea2734ee2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,9 +11,7 @@ */ public final class TopicsRegenerateKeySamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * Topics_RegenerateKey.json + * x-ms-original-file: 2026-06-15-preview/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 33998b868a6c2..db6a1fe739d20 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,9 +17,7 @@ */ public final class TopicsUpdateSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/Topics_Update. - * json + * x-ms-original-file: 2026-06-15-preview/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 a836b560b4d32..a480c482937e2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class VerifiedPartnersGetSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * VerifiedPartners_Get.json + * x-ms-original-file: 2026-06-15-preview/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 efbfbf1dbe029..b0e04b1662fb7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -9,9 +9,7 @@ */ public final class VerifiedPartnersListSamples { /* - * x-ms-original-file: - * specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2025-04-01-preview/examples/ - * VerifiedPartners_List.json + * x-ms-original-file: 2026-06-15-preview/VerifiedPartners_List.json */ /** * Sample code: VerifiedPartners_List. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AutoScaleConfigurationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AutoScaleConfigurationTests.java new file mode 100644 index 0000000000000..717ce07b1f809 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/AutoScaleConfigurationTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.eventgrid.models.AutoScaleConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class AutoScaleConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AutoScaleConfiguration model = BinaryData + .fromString( + "{\"enableAutoScale\":true,\"minimumThroughputUnits\":1658882660,\"maximumThroughputUnits\":335937226}") + .toObject(AutoScaleConfiguration.class); + Assertions.assertTrue(model.enableAutoScale()); + Assertions.assertEquals(1658882660, model.minimumThroughputUnits()); + Assertions.assertEquals(335937226, model.maximumThroughputUnits()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AutoScaleConfiguration model = new AutoScaleConfiguration().withEnableAutoScale(true) + .withMinimumThroughputUnits(1658882660) + .withMaximumThroughputUnits(335937226); + model = BinaryData.fromObject(model).toObject(AutoScaleConfiguration.class); + Assertions.assertTrue(model.enableAutoScale()); + Assertions.assertEquals(1658882660, model.minimumThroughputUnits()); + Assertions.assertEquals(335937226, model.maximumThroughputUnits()); + } +} 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 index 12c8f55f5e39d..778655412382f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,19 +12,19 @@ public final class AzureADPartnerClientAuthenticationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureADPartnerClientAuthenticationProperties model = BinaryData.fromString( - "{\"azureActiveDirectoryTenantId\":\"mfcnrjajqmatxj\",\"azureActiveDirectoryApplicationIdOrUri\":\"elnzqgxxgfbbmt\"}") + "{\"azureActiveDirectoryTenantId\":\"iertgccymvaolp\",\"azureActiveDirectoryApplicationIdOrUri\":\"lqlfm\"}") .toObject(AzureADPartnerClientAuthenticationProperties.class); - Assertions.assertEquals("mfcnrjajqmatxj", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("elnzqgxxgfbbmt", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("iertgccymvaolp", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("lqlfm", model.azureActiveDirectoryApplicationIdOrUri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureADPartnerClientAuthenticationProperties model - = new AzureADPartnerClientAuthenticationProperties().withAzureActiveDirectoryTenantId("mfcnrjajqmatxj") - .withAzureActiveDirectoryApplicationIdOrUri("elnzqgxxgfbbmt"); + = new AzureADPartnerClientAuthenticationProperties().withAzureActiveDirectoryTenantId("iertgccymvaolp") + .withAzureActiveDirectoryApplicationIdOrUri("lqlfm"); model = BinaryData.fromObject(model).toObject(AzureADPartnerClientAuthenticationProperties.class); - Assertions.assertEquals("mfcnrjajqmatxj", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("elnzqgxxgfbbmt", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("iertgccymvaolp", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("lqlfm", 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 index 510407d07379b..44a6857cb1df1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,19 +12,19 @@ public final class AzureADPartnerClientAuthenticationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureADPartnerClientAuthentication model = BinaryData.fromString( - "{\"clientAuthenticationType\":\"AzureAD\",\"properties\":{\"azureActiveDirectoryTenantId\":\"agynoi\",\"azureActiveDirectoryApplicationIdOrUri\":\"n\"}}") + "{\"clientAuthenticationType\":\"AzureAD\",\"properties\":{\"azureActiveDirectoryTenantId\":\"uhavhql\",\"azureActiveDirectoryApplicationIdOrUri\":\"humaqolbgyc\"}}") .toObject(AzureADPartnerClientAuthentication.class); - Assertions.assertEquals("agynoi", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("n", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("uhavhql", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("humaqolbgyc", model.azureActiveDirectoryApplicationIdOrUri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureADPartnerClientAuthentication model - = new AzureADPartnerClientAuthentication().withAzureActiveDirectoryTenantId("agynoi") - .withAzureActiveDirectoryApplicationIdOrUri("n"); + = new AzureADPartnerClientAuthentication().withAzureActiveDirectoryTenantId("uhavhql") + .withAzureActiveDirectoryApplicationIdOrUri("humaqolbgyc"); model = BinaryData.fromObject(model).toObject(AzureADPartnerClientAuthentication.class); - Assertions.assertEquals("agynoi", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("n", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("uhavhql", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("humaqolbgyc", 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 index 8f0340946eaa1..33c43399f5073 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,26 +14,26 @@ public final class AzureFunctionEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFunctionEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"y\",\"maxEventsPerBatch\":1557390880,\"preferredBatchSizeInKilobytes\":266145265,\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"zzdcykeys\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"wfopazdazg\"}]}") + "{\"resourceId\":\"mjbnk\",\"maxEventsPerBatch\":1476296254,\"preferredBatchSizeInKilobytes\":915753980,\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"svxeizzgwklnsr\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"feycxcktp\"}]}") .toObject(AzureFunctionEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("y", model.resourceId()); - Assertions.assertEquals(1557390880, model.maxEventsPerBatch()); - Assertions.assertEquals(266145265, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("zzdcykeys", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("mjbnk", model.resourceId()); + Assertions.assertEquals(1476296254, model.maxEventsPerBatch()); + Assertions.assertEquals(915753980, model.preferredBatchSizeInKilobytes()); + Assertions.assertEquals("svxeizzgwklnsr", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureFunctionEventSubscriptionDestinationProperties model - = new AzureFunctionEventSubscriptionDestinationProperties().withResourceId("y") - .withMaxEventsPerBatch(1557390880) - .withPreferredBatchSizeInKilobytes(266145265) - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("zzdcykeys"), - new DeliveryAttributeMapping().withName("wfopazdazg"))); + = new AzureFunctionEventSubscriptionDestinationProperties().withResourceId("mjbnk") + .withMaxEventsPerBatch(1476296254) + .withPreferredBatchSizeInKilobytes(915753980) + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("svxeizzgwklnsr"), + new DeliveryAttributeMapping().withName("feycxcktp"))); model = BinaryData.fromObject(model).toObject(AzureFunctionEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("y", model.resourceId()); - Assertions.assertEquals(1557390880, model.maxEventsPerBatch()); - Assertions.assertEquals(266145265, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("zzdcykeys", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("mjbnk", model.resourceId()); + Assertions.assertEquals(1476296254, model.maxEventsPerBatch()); + Assertions.assertEquals(915753980, model.preferredBatchSizeInKilobytes()); + Assertions.assertEquals("svxeizzgwklnsr", 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 index 7cb7b529f37d3..c6f7334e9318d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,27 +14,25 @@ public final class AzureFunctionEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFunctionEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"AzureFunction\",\"properties\":{\"resourceId\":\"gpewq\",\"maxEventsPerBatch\":217043670,\"preferredBatchSizeInKilobytes\":1023657842,\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ozglq\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"kn\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"clctzey\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"mndcov\"}]}}") + "{\"endpointType\":\"AzureFunction\",\"properties\":{\"resourceId\":\"xkyxvxevblbj\",\"maxEventsPerBatch\":995606751,\"preferredBatchSizeInKilobytes\":1422208394,\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"euaulxu\"}]}}") .toObject(AzureFunctionEventSubscriptionDestination.class); - Assertions.assertEquals("gpewq", model.resourceId()); - Assertions.assertEquals(217043670, model.maxEventsPerBatch()); - Assertions.assertEquals(1023657842, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("ozglq", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("xkyxvxevblbj", model.resourceId()); + Assertions.assertEquals(995606751, model.maxEventsPerBatch()); + Assertions.assertEquals(1422208394, model.preferredBatchSizeInKilobytes()); + Assertions.assertEquals("euaulxu", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureFunctionEventSubscriptionDestination model - = new AzureFunctionEventSubscriptionDestination().withResourceId("gpewq") - .withMaxEventsPerBatch(217043670) - .withPreferredBatchSizeInKilobytes(1023657842) - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("ozglq"), - new DeliveryAttributeMapping().withName("kn"), new DeliveryAttributeMapping().withName("clctzey"), - new DeliveryAttributeMapping().withName("mndcov"))); + = new AzureFunctionEventSubscriptionDestination().withResourceId("xkyxvxevblbj") + .withMaxEventsPerBatch(995606751) + .withPreferredBatchSizeInKilobytes(1422208394) + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("euaulxu"))); model = BinaryData.fromObject(model).toObject(AzureFunctionEventSubscriptionDestination.class); - Assertions.assertEquals("gpewq", model.resourceId()); - Assertions.assertEquals(217043670, model.maxEventsPerBatch()); - Assertions.assertEquals(1023657842, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("ozglq", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("xkyxvxevblbj", model.resourceId()); + Assertions.assertEquals(995606751, model.maxEventsPerBatch()); + Assertions.assertEquals(1422208394, model.preferredBatchSizeInKilobytes()); + Assertions.assertEquals("euaulxu", 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 index 6984cd0338cc7..50eae59cd28d2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.caCertificates().delete("lpolwzrghsrle", "nkfscjfn", "jwvuag", com.azure.core.util.Context.NONE); + manager.caCertificates() + .delete("yfukzxuizhyhnepk", "etiarxqiubxdukec", "xdazv", 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 index efa0c1385feef..7810bff479bac 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -25,92 +25,110 @@ 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\"}") + "{\"properties\":{\"channelType\":\"PartnerDestination\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"ighxpk\",\"resourceGroupName\":\"zb\",\"name\":\"uebbaumnyqup\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"scwsv\":{\"description\":\"bckhsmtxpsi\",\"displayName\":\"tfhvpesapskrdqmh\",\"documentationUrl\":\"dhtldwkyz\",\"dataSchemaUrl\":\"utknc\"},\"vnotyfjfcnj\":{\"description\":\"otogtwrupqs\",\"displayName\":\"nmic\",\"documentationUrl\":\"vce\",\"dataSchemaUrl\":\"eil\"},\"rpabg\":{\"description\":\"cn\",\"displayName\":\"hbttkphyw\",\"documentationUrl\":\"vjtoqnermclfp\",\"dataSchemaUrl\":\"hoxus\"}}},\"source\":\"psbjta\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"gxywpmue\",\"resourceGroupName\":\"jzwf\",\"name\":\"q\",\"endpointServiceContext\":\"ids\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"obglaocqxtcc\",\"resourceGroupName\":\"yudxytlmoy\",\"changedTimeUtc\":\"2021-06-06T16:13:27Z\"},{\"azureSubscriptionId\":\"fudwpznt\",\"resourceGroupName\":\"dzhlrq\",\"changedTimeUtc\":\"2021-03-06T10:40:17Z\"},{\"azureSubscriptionId\":\"kfrlhrxsbky\",\"resourceGroupName\":\"ycanuzbpzkafku\",\"changedTimeUtc\":\"2021-04-24T14:26:07Z\"}]},\"messageForActivation\":\"nwbmeh\",\"provisioningState\":\"IdleDueToMirroredPartnerDestinationDeletion\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-10-17T19:30:49Z\"},\"id\":\"rts\",\"name\":\"hspkdeemao\",\"type\":\"mx\"}") .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(ChannelType.PARTNER_DESTINATION, model.channelType()); + Assertions.assertEquals("ighxpk", model.partnerTopicInfo().azureSubscriptionId()); + Assertions.assertEquals("zb", model.partnerTopicInfo().resourceGroupName()); + Assertions.assertEquals("uebbaumnyqup", 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", + Assertions.assertEquals("bckhsmtxpsi", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("scwsv").description()); + Assertions.assertEquals("tfhvpesapskrdqmh", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("scwsv").displayName()); + Assertions.assertEquals("dhtldwkyz", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("scwsv").documentationUrl()); + Assertions.assertEquals("utknc", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("scwsv").dataSchemaUrl()); + Assertions.assertEquals("psbjta", model.partnerTopicInfo().source()); + Assertions.assertEquals("gxywpmue", model.partnerDestinationInfo().azureSubscriptionId()); + Assertions.assertEquals("jzwf", model.partnerDestinationInfo().resourceGroupName()); + Assertions.assertEquals("q", model.partnerDestinationInfo().name()); + Assertions.assertEquals("ids", model.partnerDestinationInfo().endpointServiceContext()); + Assertions.assertEquals("obglaocqxtcc", model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("lusarh", + Assertions.assertEquals("yudxytlmoy", model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T00:37:18Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T16:13:27Z"), 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()); + Assertions.assertEquals("nwbmeh", model.messageForActivation()); + Assertions.assertEquals(ChannelProvisioningState.IDLE_DUE_TO_MIRRORED_PARTNER_DESTINATION_DELETION, + model.provisioningState()); + Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, model.readinessState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T19:30:49Z"), 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") + ChannelInner model = new ChannelInner().withChannelType(ChannelType.PARTNER_DESTINATION) + .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("ighxpk") + .withResourceGroupName("zb") + .withName("uebbaumnyqup") .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")); + .withInlineEventTypes(mapOf("scwsv", + new InlineEventProperties().withDescription("bckhsmtxpsi") + .withDisplayName("tfhvpesapskrdqmh") + .withDocumentationUrl("dhtldwkyz") + .withDataSchemaUrl("utknc"), + "vnotyfjfcnj", + new InlineEventProperties().withDescription("otogtwrupqs") + .withDisplayName("nmic") + .withDocumentationUrl("vce") + .withDataSchemaUrl("eil"), + "rpabg", + new InlineEventProperties().withDescription("cn") + .withDisplayName("hbttkphyw") + .withDocumentationUrl("vjtoqnermclfp") + .withDataSchemaUrl("hoxus")))) + .withSource("psbjta")) + .withPartnerDestinationInfo(new PartnerDestinationInfo().withAzureSubscriptionId("gxywpmue") + .withResourceGroupName("jzwf") + .withName("q") + .withEndpointServiceContext("ids") + .withResourceMoveChangeHistory(Arrays.asList( + new ResourceMoveChangeHistory().withAzureSubscriptionId("obglaocqxtcc") + .withResourceGroupName("yudxytlmoy") + .withChangedTimeUtc(OffsetDateTime.parse("2021-06-06T16:13:27Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("fudwpznt") + .withResourceGroupName("dzhlrq") + .withChangedTimeUtc(OffsetDateTime.parse("2021-03-06T10:40:17Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("kfrlhrxsbky") + .withResourceGroupName("ycanuzbpzkafku") + .withChangedTimeUtc(OffsetDateTime.parse("2021-04-24T14:26:07Z"))))) + .withMessageForActivation("nwbmeh") + .withProvisioningState(ChannelProvisioningState.IDLE_DUE_TO_MIRRORED_PARTNER_DESTINATION_DELETION) + .withReadinessState(ReadinessState.NEVER_ACTIVATED) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-10-17T19:30:49Z")); 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(ChannelType.PARTNER_DESTINATION, model.channelType()); + Assertions.assertEquals("ighxpk", model.partnerTopicInfo().azureSubscriptionId()); + Assertions.assertEquals("zb", model.partnerTopicInfo().resourceGroupName()); + Assertions.assertEquals("uebbaumnyqup", 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", + Assertions.assertEquals("bckhsmtxpsi", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("scwsv").description()); + Assertions.assertEquals("tfhvpesapskrdqmh", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("scwsv").displayName()); + Assertions.assertEquals("dhtldwkyz", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("scwsv").documentationUrl()); + Assertions.assertEquals("utknc", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("scwsv").dataSchemaUrl()); + Assertions.assertEquals("psbjta", model.partnerTopicInfo().source()); + Assertions.assertEquals("gxywpmue", model.partnerDestinationInfo().azureSubscriptionId()); + Assertions.assertEquals("jzwf", model.partnerDestinationInfo().resourceGroupName()); + Assertions.assertEquals("q", model.partnerDestinationInfo().name()); + Assertions.assertEquals("ids", model.partnerDestinationInfo().endpointServiceContext()); + Assertions.assertEquals("obglaocqxtcc", model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("lusarh", + Assertions.assertEquals("yudxytlmoy", model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T00:37:18Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T16:13:27Z"), 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()); + Assertions.assertEquals("nwbmeh", model.messageForActivation()); + Assertions.assertEquals(ChannelProvisioningState.IDLE_DUE_TO_MIRRORED_PARTNER_DESTINATION_DELETION, + model.provisioningState()); + Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, model.readinessState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T19:30:49Z"), model.expirationTimeIfNotActivatedUtc()); } // Use "Map.of" if available 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 index e9bebd91e49ed..16f07d9da7277 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -25,106 +25,103 @@ 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\"}") + "{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"melmqkrha\",\"resourceGroupName\":\"ljuahaquhcdh\",\"name\":\"ualaexqpvfadmw\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"owzxcu\":{\"description\":\"pv\",\"displayName\":\"mzlfmisgwb\",\"documentationUrl\":\"beldawkzbaliourq\",\"dataSchemaUrl\":\"kauhashsfwxo\"},\"x\":{\"description\":\"cjooxdjebwpucwwf\",\"displayName\":\"vbvmeu\",\"documentationUrl\":\"ivyhzceuojgjrwju\",\"dataSchemaUrl\":\"otwmcdyt\"}}},\"source\":\"txnrjaw\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"gxhnisk\",\"resourceGroupName\":\"bkpyc\",\"name\":\"lwn\",\"endpointServiceContext\":\"hjdauwhvylwz\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"xujznbmpowu\",\"resourceGroupName\":\"rzqlveu\",\"changedTimeUtc\":\"2021-02-19T06:27:55Z\"},{\"azureSubscriptionId\":\"j\",\"resourceGroupName\":\"hfxobbcswsrtj\",\"changedTimeUtc\":\"2021-04-01T12:50:08Z\"},{\"azureSubscriptionId\":\"rbpbewtghfgblcg\",\"resourceGroupName\":\"zvlvqhjkbegib\",\"changedTimeUtc\":\"2021-07-17T08:56:43Z\"}]},\"messageForActivation\":\"iebwwaloayqcgwrt\",\"provisioningState\":\"Canceled\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-05-25T01:21:12Z\"}") .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("melmqkrha", model.partnerTopicInfo().azureSubscriptionId()); + Assertions.assertEquals("ljuahaquhcdh", model.partnerTopicInfo().resourceGroupName()); + Assertions.assertEquals("ualaexqpvfadmw", 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", + Assertions.assertEquals("pv", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("owzxcu").description()); + Assertions.assertEquals("mzlfmisgwb", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("owzxcu").displayName()); + Assertions.assertEquals("beldawkzbaliourq", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("owzxcu").documentationUrl()); + Assertions.assertEquals("kauhashsfwxo", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("owzxcu").dataSchemaUrl()); + Assertions.assertEquals("txnrjaw", model.partnerTopicInfo().source()); + Assertions.assertEquals("gxhnisk", model.partnerDestinationInfo().azureSubscriptionId()); + Assertions.assertEquals("bkpyc", model.partnerDestinationInfo().resourceGroupName()); + Assertions.assertEquals("lwn", model.partnerDestinationInfo().name()); + Assertions.assertEquals("hjdauwhvylwz", model.partnerDestinationInfo().endpointServiceContext()); + Assertions.assertEquals("xujznbmpowu", model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("vpjhulsuuv", + Assertions.assertEquals("rzqlveu", model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T09:33:18Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T06:27:55Z"), 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()); + Assertions.assertEquals("iebwwaloayqcgwrt", model.messageForActivation()); + Assertions.assertEquals(ChannelProvisioningState.CANCELED, model.provisioningState()); + Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, model.readinessState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T01:21:12Z"), 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") + .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("melmqkrha") + .withResourceGroupName("ljuahaquhcdh") + .withName("ualaexqpvfadmw") .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") + .withInlineEventTypes(mapOf("owzxcu", + new InlineEventProperties().withDescription("pv") + .withDisplayName("mzlfmisgwb") + .withDocumentationUrl("beldawkzbaliourq") + .withDataSchemaUrl("kauhashsfwxo"), + "x", + new InlineEventProperties().withDescription("cjooxdjebwpucwwf") + .withDisplayName("vbvmeu") + .withDocumentationUrl("ivyhzceuojgjrwju") + .withDataSchemaUrl("otwmcdyt")))) + .withSource("txnrjaw")) + .withPartnerDestinationInfo(new PartnerDestinationInfo().withAzureSubscriptionId("gxhnisk") + .withResourceGroupName("bkpyc") + .withName("lwn") + .withEndpointServiceContext("hjdauwhvylwz") .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")); + new ResourceMoveChangeHistory().withAzureSubscriptionId("xujznbmpowu") + .withResourceGroupName("rzqlveu") + .withChangedTimeUtc(OffsetDateTime.parse("2021-02-19T06:27:55Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("j") + .withResourceGroupName("hfxobbcswsrtj") + .withChangedTimeUtc(OffsetDateTime.parse("2021-04-01T12:50:08Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("rbpbewtghfgblcg") + .withResourceGroupName("zvlvqhjkbegib") + .withChangedTimeUtc(OffsetDateTime.parse("2021-07-17T08:56:43Z"))))) + .withMessageForActivation("iebwwaloayqcgwrt") + .withProvisioningState(ChannelProvisioningState.CANCELED) + .withReadinessState(ReadinessState.NEVER_ACTIVATED) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-05-25T01:21:12Z")); 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("melmqkrha", model.partnerTopicInfo().azureSubscriptionId()); + Assertions.assertEquals("ljuahaquhcdh", model.partnerTopicInfo().resourceGroupName()); + Assertions.assertEquals("ualaexqpvfadmw", 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", + Assertions.assertEquals("pv", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("owzxcu").description()); + Assertions.assertEquals("mzlfmisgwb", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("owzxcu").displayName()); + Assertions.assertEquals("beldawkzbaliourq", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("owzxcu").documentationUrl()); + Assertions.assertEquals("kauhashsfwxo", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("owzxcu").dataSchemaUrl()); + Assertions.assertEquals("txnrjaw", model.partnerTopicInfo().source()); + Assertions.assertEquals("gxhnisk", model.partnerDestinationInfo().azureSubscriptionId()); + Assertions.assertEquals("bkpyc", model.partnerDestinationInfo().resourceGroupName()); + Assertions.assertEquals("lwn", model.partnerDestinationInfo().name()); + Assertions.assertEquals("hjdauwhvylwz", model.partnerDestinationInfo().endpointServiceContext()); + Assertions.assertEquals("xujznbmpowu", model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("vpjhulsuuv", + Assertions.assertEquals("rzqlveu", model.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T09:33:18Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T06:27:55Z"), 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()); + Assertions.assertEquals("iebwwaloayqcgwrt", model.messageForActivation()); + Assertions.assertEquals(ChannelProvisioningState.CANCELED, model.provisioningState()); + Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, model.readinessState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T01:21:12Z"), model.expirationTimeIfNotActivatedUtc()); } // Use "Map.of" if available 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 index 0c754555c298c..7c9773b27b989 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,59 +20,49 @@ 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\"}}}}}") + "{\"expirationTimeIfNotActivatedUtc\":\"2021-07-24T09:20:41Z\",\"partnerDestinationInfo\":{\"endpointType\":\"PartnerUpdateDestinationInfo\"},\"partnerTopicInfo\":{\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"v\":{\"description\":\"ttdumorppxebmnzb\",\"displayName\":\"hjpglkf\",\"documentationUrl\":\"hdneuelfph\",\"dataSchemaUrl\":\"yhtozfikdowwqu\"},\"k\":{\"description\":\"xclvit\",\"displayName\":\"qzonosggbhcohf\",\"documentationUrl\":\"sjnkal\",\"dataSchemaUrl\":\"tiiswacffg\"}}}}}") .toObject(ChannelUpdateParametersProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T18:58:31Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T09:20:41Z"), 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()); + Assertions.assertEquals("ttdumorppxebmnzb", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("v").description()); + Assertions.assertEquals("hjpglkf", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("v").displayName()); + Assertions.assertEquals("hdneuelfph", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("v").documentationUrl()); + Assertions.assertEquals("yhtozfikdowwqu", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("v").dataSchemaUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ChannelUpdateParametersProperties model = new ChannelUpdateParametersProperties() - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-08T18:58:31Z")) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-07-24T09:20:41Z")) .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"))))); + .withInlineEventTypes(mapOf("v", + new InlineEventProperties().withDescription("ttdumorppxebmnzb") + .withDisplayName("hjpglkf") + .withDocumentationUrl("hdneuelfph") + .withDataSchemaUrl("yhtozfikdowwqu"), + "k", + new InlineEventProperties().withDescription("xclvit") + .withDisplayName("qzonosggbhcohf") + .withDocumentationUrl("sjnkal") + .withDataSchemaUrl("tiiswacffg"))))); model = BinaryData.fromObject(model).toObject(ChannelUpdateParametersProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T18:58:31Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T09:20:41Z"), 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()); + Assertions.assertEquals("ttdumorppxebmnzb", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("v").description()); + Assertions.assertEquals("hjpglkf", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("v").displayName()); + Assertions.assertEquals("hdneuelfph", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("v").documentationUrl()); + Assertions.assertEquals("yhtozfikdowwqu", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("v").dataSchemaUrl()); } // Use "Map.of" if available 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 index 92efc65673852..0b0a5d9578e70 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,49 +20,59 @@ 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\"}}}}}}") + "{\"properties\":{\"expirationTimeIfNotActivatedUtc\":\"2021-08-29T22:47:03Z\",\"partnerDestinationInfo\":{\"endpointType\":\"PartnerUpdateDestinationInfo\"},\"partnerTopicInfo\":{\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"fiwjmygtdssls\":{\"description\":\"nvdfznuda\",\"displayName\":\"vxzbncb\",\"documentationUrl\":\"lpstdbhhxsrzdz\",\"dataSchemaUrl\":\"erscdntne\"},\"tppjflcx\":{\"description\":\"mweriofzpy\",\"displayName\":\"emwabnet\",\"documentationUrl\":\"hszhedplvwiwu\",\"dataSchemaUrl\":\"wmbesldnkw\"},\"xtibqdxbxwakbog\":{\"description\":\"aokonzmnsik\",\"displayName\":\"kqze\",\"documentationUrl\":\"kdltfzxmhhvhg\",\"dataSchemaUrl\":\"eodkwobda\"},\"wlauwzizxbmpg\":{\"description\":\"ndlkzgxhurip\",\"displayName\":\"podxunkb\",\"documentationUrl\":\"xmubyyntwlrbq\",\"dataSchemaUrl\":\"oievseotgqrlltm\"}}}}}}") .toObject(ChannelUpdateParameters.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T18:55:51Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T22:47:03Z"), 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()); + Assertions.assertEquals("nvdfznuda", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("fiwjmygtdssls").description()); + Assertions.assertEquals("vxzbncb", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("fiwjmygtdssls").displayName()); + Assertions.assertEquals("lpstdbhhxsrzdz", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("fiwjmygtdssls").documentationUrl()); + Assertions.assertEquals("erscdntne", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("fiwjmygtdssls").dataSchemaUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ChannelUpdateParameters model = new ChannelUpdateParameters() - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-08-27T18:55:51Z")) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-08-29T22:47:03Z")) .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"))))); + .withInlineEventTypes(mapOf("fiwjmygtdssls", + new InlineEventProperties().withDescription("nvdfznuda") + .withDisplayName("vxzbncb") + .withDocumentationUrl("lpstdbhhxsrzdz") + .withDataSchemaUrl("erscdntne"), + "tppjflcx", + new InlineEventProperties().withDescription("mweriofzpy") + .withDisplayName("emwabnet") + .withDocumentationUrl("hszhedplvwiwu") + .withDataSchemaUrl("wmbesldnkw"), + "xtibqdxbxwakbog", + new InlineEventProperties().withDescription("aokonzmnsik") + .withDisplayName("kqze") + .withDocumentationUrl("kdltfzxmhhvhg") + .withDataSchemaUrl("eodkwobda"), + "wlauwzizxbmpg", + new InlineEventProperties().withDescription("ndlkzgxhurip") + .withDisplayName("podxunkb") + .withDocumentationUrl("xmubyyntwlrbq") + .withDataSchemaUrl("oievseotgqrlltm"))))); model = BinaryData.fromObject(model).toObject(ChannelUpdateParameters.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T18:55:51Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T22:47:03Z"), 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()); + Assertions.assertEquals("nvdfznuda", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("fiwjmygtdssls").description()); + Assertions.assertEquals("vxzbncb", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("fiwjmygtdssls").displayName()); + Assertions.assertEquals("lpstdbhhxsrzdz", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("fiwjmygtdssls").documentationUrl()); + Assertions.assertEquals("erscdntne", + model.partnerTopicInfo().eventTypeInfo().inlineEventTypes().get("fiwjmygtdssls").dataSchemaUrl()); } // Use "Map.of" if available 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 index 969437a7d0be6..1b7c7985248a0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -33,7 +33,7 @@ public final class ChannelsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"channelType\":\"PartnerDestination\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"ixx\",\"resourceGroupName\":\"wzkyf\",\"name\":\"wpiwxeiicrmpep\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"xijvskwsdgkjgyac\":{}}},\"source\":\"asekwefcvoinw\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"rtwy\",\"resourceGroupName\":\"i\",\"name\":\"advatdavuqmcb\",\"endpointServiceContext\":\"sfobjl\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"ezcjumvpsi\",\"resourceGroupName\":\"oyoiglkmiqw\",\"changedTimeUtc\":\"2021-09-20T11:21:37Z\"},{\"azureSubscriptionId\":\"clibbfqpsp\",\"resourceGroupName\":\"adydg\",\"changedTimeUtc\":\"2021-08-08T13:27:57Z\"},{\"azureSubscriptionId\":\"twukex\",\"resourceGroupName\":\"pm\",\"changedTimeUtc\":\"2021-01-15T16:43:14Z\"},{\"azureSubscriptionId\":\"eddqilwgdfpfqfpc\",\"resourceGroupName\":\"tclg\",\"changedTimeUtc\":\"2021-07-26T20:51:13Z\"}]},\"messageForActivation\":\"erfwx\",\"provisioningState\":\"Succeeded\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-11-11T06:37:13Z\"},\"id\":\"ehhcifkwdv\",\"name\":\"tbrekqhsqhtf\",\"type\":\"wpq\"}"; + = "{\"properties\":{\"channelType\":\"PartnerDestination\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"fkwiyjv\",\"resourceGroupName\":\"ko\",\"name\":\"nawnvz\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"wsxvjab\":{},\"qqax\":{},\"yvymcnudndo\":{},\"bhjxwxqweuipmpv\":{}}},\"source\":\"m\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"sqxtltclkrdpq\",\"resourceGroupName\":\"hyrfrakkldgr\",\"name\":\"fcmfcn\",\"endpointServiceContext\":\"ajqmat\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"elnzqgxxgfbbmt\",\"resourceGroupName\":\"qagynoipr\",\"changedTimeUtc\":\"2021-03-29T07:56:21Z\"}]},\"messageForActivation\":\"lin\",\"provisioningState\":\"IdleDueToMirroredPartnerTopicDeletion\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-08-04T09:02:33Z\"},\"id\":\"q\",\"name\":\"ibmq\",\"type\":\"miymqruqguhfupet\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -43,53 +43,59 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Channel response = manager.channels() - .define("g") - .withExistingPartnerNamespace("eb", "vczld") - .withChannelType(ChannelType.PARTNER_DESTINATION) - .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("aaqgzeka") - .withResourceGroupName("lyzgsnor") - .withName("gmnzjotvmrx") + .define("lsmmdqgmi") + .withExistingPartnerNamespace("gjfwyyrlhgenuz", "jgvkvebaqszllr") + .withChannelType(ChannelType.PARTNER_TOPIC) + .withPartnerTopicInfo(new PartnerTopicInfo().withAzureSubscriptionId("qrhnxtminkl") + .withResourceGroupName("xsvtzarhzvqnsqk") + .withName("mbjwzzoslpkyb") .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("vjb", new InlineEventProperties(), "vhdi", new InlineEventProperties(), - "ayfluiyuosnu", new InlineEventProperties(), "dtelvhyibdrqrs", new InlineEventProperties()))) - .withSource("buubpyrowt")) - .withPartnerDestinationInfo(new PartnerDestinationInfo().withAzureSubscriptionId("ztfwfqchvcz") - .withResourceGroupName("j") - .withName("cta") - .withEndpointServiceContext("yvrtp") + .withInlineEventTypes(mapOf("pgajsqjce", new InlineEventProperties()))) + .withSource("bmfuvqarwzxu")) + .withPartnerDestinationInfo(new PartnerDestinationInfo().withAzureSubscriptionId("bluimmbw") + .withResourceGroupName("fgtdmbvx") + .withName("raokqkbudb") + .withEndpointServiceContext("aokbavlyttaaknwf") .withResourceMoveChangeHistory(Arrays.asList( - new ResourceMoveChangeHistory().withAzureSubscriptionId("hzcgkrepdqhqyhwq") - .withResourceGroupName("mvxqab") - .withChangedTimeUtc(OffsetDateTime.parse("2021-09-29T14:28:16Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("eoxinhgre") - .withResourceGroupName("twhlpuzjpce") - .withChangedTimeUtc(OffsetDateTime.parse("2021-05-23T10:15:01Z"))))) - .withMessageForActivation("angp") + new ResourceMoveChangeHistory().withAzureSubscriptionId("sm") + .withResourceGroupName("dujdigatoleksc") + .withChangedTimeUtc(OffsetDateTime.parse("2021-10-26T15:44:30Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("anqimwbzxpdcl") + .withResourceGroupName("ka") + .withChangedTimeUtc(OffsetDateTime.parse("2021-02-07T07:39:07Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("laimouxwk") + .withResourceGroupName("mud") + .withChangedTimeUtc(OffsetDateTime.parse("2021-11-13T03:41:22Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("bicziuswswj") + .withResourceGroupName("b") + .withChangedTimeUtc(OffsetDateTime.parse("2021-01-28T10:21:52Z"))))) + .withMessageForActivation("btqqvyfs") .withProvisioningState(ChannelProvisioningState.UPDATING) - .withReadinessState(ReadinessState.NEVER_ACTIVATED) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-23T09:30:26Z")) + .withReadinessState(ReadinessState.ACTIVATED) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-07-29T08:10:05Z")) .create(); Assertions.assertEquals(ChannelType.PARTNER_DESTINATION, response.channelType()); - Assertions.assertEquals("ixx", response.partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("wzkyf", response.partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("wpiwxeiicrmpep", response.partnerTopicInfo().name()); + Assertions.assertEquals("fkwiyjv", response.partnerTopicInfo().azureSubscriptionId()); + Assertions.assertEquals("ko", response.partnerTopicInfo().resourceGroupName()); + Assertions.assertEquals("nawnvz", response.partnerTopicInfo().name()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("asekwefcvoinw", response.partnerTopicInfo().source()); - Assertions.assertEquals("rtwy", response.partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("i", response.partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("advatdavuqmcb", response.partnerDestinationInfo().name()); - Assertions.assertEquals("sfobjl", response.partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("ezcjumvpsi", + Assertions.assertEquals("m", response.partnerTopicInfo().source()); + Assertions.assertEquals("sqxtltclkrdpq", response.partnerDestinationInfo().azureSubscriptionId()); + Assertions.assertEquals("hyrfrakkldgr", response.partnerDestinationInfo().resourceGroupName()); + Assertions.assertEquals("fcmfcn", response.partnerDestinationInfo().name()); + Assertions.assertEquals("ajqmat", response.partnerDestinationInfo().endpointServiceContext()); + Assertions.assertEquals("elnzqgxxgfbbmt", response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("oyoiglkmiqw", + Assertions.assertEquals("qagynoipr", response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-20T11:21:37Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-29T07:56:21Z"), response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("erfwx", response.messageForActivation()); - Assertions.assertEquals(ChannelProvisioningState.SUCCEEDED, response.provisioningState()); - Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, response.readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-11T06:37:13Z"), + Assertions.assertEquals("lin", response.messageForActivation()); + Assertions.assertEquals(ChannelProvisioningState.IDLE_DUE_TO_MIRRORED_PARTNER_TOPIC_DELETION, + response.provisioningState()); + Assertions.assertEquals(ReadinessState.ACTIVATED, response.readinessState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T09:02:33Z"), response.expirationTimeIfNotActivatedUtc()); } 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 index 88ee4e1601913..ba49c81fc348f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.channels().delete("xwjongzse", "qqrsil", "chskxxka", com.azure.core.util.Context.NONE); + manager.channels().delete("qrs", "pcbbprtugav", "zbcyksiv", 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 index d2ad506dcff44..87ba33070f15b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class ChannelsGetFullUrlWithResponseMockTests { @Test public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"gmwdh\"}"; + String responseStr = "{\"endpointUrl\":\"pysthhz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testGetFullUrlWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EventSubscriptionFullUrl response = manager.channels() - .getFullUrlWithResponse("dvrgliegftcvbi", "ftksd", "gdnk", com.azure.core.util.Context.NONE) + .getFullUrlWithResponse("hokamvfej", "qnttmbq", "abzfivf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gmwdh", response.endpointUrl()); + Assertions.assertEquals("pysthhz", 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 index 0a445cbccef7b..2de3f1c876990 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -25,7 +25,7 @@ public final class ChannelsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"qhnmhk\",\"resourceGroupName\":\"zsdsuxheqdgcrux\",\"name\":\"inymmqgwokmikp\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"xu\":{},\"jipfdvh\":{}}},\"source\":\"dvwz\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"pphthdklmvetatla\",\"resourceGroupName\":\"q\",\"name\":\"xwgiks\",\"endpointServiceContext\":\"vtooxrpo\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"chgjtnhtukfacih\",\"resourceGroupName\":\"fntumeezbxvqx\",\"changedTimeUtc\":\"2021-04-10T01:43:39Z\"},{\"azureSubscriptionId\":\"wcgasgom\",\"resourceGroupName\":\"jzwxuqgovsxpwwz\",\"changedTimeUtc\":\"2021-02-10T04:05:47Z\"},{\"azureSubscriptionId\":\"kkhtgfredmlscgrl\",\"resourceGroupName\":\"cnaovjo\",\"changedTimeUtc\":\"2021-08-16T22:05:56Z\"},{\"azureSubscriptionId\":\"p\",\"resourceGroupName\":\"acomlyotg\",\"changedTimeUtc\":\"2021-01-04T07:08:54Z\"}]},\"messageForActivation\":\"nsrqor\",\"provisioningState\":\"Failed\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-05-12T04:31:01Z\"},\"id\":\"bxeetqujxcxxqn\",\"name\":\"cqjkedwqu\",\"type\":\"cgojmrv\"}"; + = "{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"ld\",\"resourceGroupName\":\"iipsnawwlqkz\",\"name\":\"hhl\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"tkwmuqqo\":{},\"jxeiy\":{},\"lesrwva\":{},\"xhdctrceqnk\":{}}},\"source\":\"upobehdmljz\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"umepjpbibn\",\"resourceGroupName\":\"phepifexleqirc\",\"name\":\"cly\",\"endpointServiceContext\":\"gxvrpjl\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"odacpunettepdjxq\",\"resourceGroupName\":\"koynuiylpckae\",\"changedTimeUtc\":\"2021-12-03T10:02:22Z\"},{\"azureSubscriptionId\":\"vesk\",\"resourceGroupName\":\"egqphrgfnzhctm\",\"changedTimeUtc\":\"2021-01-12T03:38:07Z\"},{\"azureSubscriptionId\":\"hp\",\"resourceGroupName\":\"bcpzarpzeqacdldt\",\"changedTimeUtc\":\"2021-03-10T23:56:30Z\"}]},\"messageForActivation\":\"pefcpcz\",\"provisioningState\":\"Failed\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-05-23T05:18:17Z\"},\"id\":\"izupfkhu\",\"name\":\"tu\",\"type\":\"zx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,29 +35,29 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Channel response = manager.channels() - .getWithResponse("bfe", "hldiuhzzgqlm", "aewzgiudjp", com.azure.core.util.Context.NONE) + .getWithResponse("nqtoqx", "hqxc", "qhtkbt", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(ChannelType.PARTNER_TOPIC, response.channelType()); - Assertions.assertEquals("qhnmhk", response.partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("zsdsuxheqdgcrux", response.partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("inymmqgwokmikp", response.partnerTopicInfo().name()); + Assertions.assertEquals("ld", response.partnerTopicInfo().azureSubscriptionId()); + Assertions.assertEquals("iipsnawwlqkz", response.partnerTopicInfo().resourceGroupName()); + Assertions.assertEquals("hhl", response.partnerTopicInfo().name()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("dvwz", response.partnerTopicInfo().source()); - Assertions.assertEquals("pphthdklmvetatla", response.partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("q", response.partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("xwgiks", response.partnerDestinationInfo().name()); - Assertions.assertEquals("vtooxrpo", response.partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("chgjtnhtukfacih", + Assertions.assertEquals("upobehdmljz", response.partnerTopicInfo().source()); + Assertions.assertEquals("umepjpbibn", response.partnerDestinationInfo().azureSubscriptionId()); + Assertions.assertEquals("phepifexleqirc", response.partnerDestinationInfo().resourceGroupName()); + Assertions.assertEquals("cly", response.partnerDestinationInfo().name()); + Assertions.assertEquals("gxvrpjl", response.partnerDestinationInfo().endpointServiceContext()); + Assertions.assertEquals("odacpunettepdjxq", response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("fntumeezbxvqx", + Assertions.assertEquals("koynuiylpckae", response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T01:43:39Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T10:02:22Z"), response.partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("nsrqor", response.messageForActivation()); + Assertions.assertEquals("pefcpcz", response.messageForActivation()); Assertions.assertEquals(ChannelProvisioningState.FAILED, response.provisioningState()); - Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, response.readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T04:31:01Z"), + Assertions.assertEquals(ReadinessState.ACTIVATED, response.readinessState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T05:18:17Z"), 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 index 5bd9c779cd5fc..6283b71e06603 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -26,7 +26,7 @@ public final class ChannelsListByPartnerNamespaceMockTests { @Test public void testListByPartnerNamespace() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"channelType\":\"PartnerDestination\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"qatiwkkvyanxkvvc\",\"resourceGroupName\":\"msvuvdjkqxetq\",\"name\":\"livrjjxnwx\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"xlehzlxpgfquwzp\":{},\"iibelwcerw\":{}}},\"source\":\"bpjxljtxbusqtb\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"iuisdz\",\"resourceGroupName\":\"bdgzpagsecnad\",\"name\":\"wqrgxfllmqi\",\"endpointServiceContext\":\"ezoell\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"iwvmtumxpymdjfu\",\"resourceGroupName\":\"roqvqpilrgu\",\"changedTimeUtc\":\"2021-01-08T08:31:14Z\"},{\"azureSubscriptionId\":\"lduwzorxsb\",\"resourceGroupName\":\"aqklxy\",\"changedTimeUtc\":\"2021-08-03T15:44:41Z\"}]},\"messageForActivation\":\"vfqepd\",\"provisioningState\":\"Deleting\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-03-25T07:31:22Z\"},\"id\":\"yvpjbowcpjqduqg\",\"name\":\"xe\",\"type\":\"kydfbwljavhuerkj\"}]}"; + = "{\"value\":[{\"properties\":{\"channelType\":\"PartnerDestination\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"kecifhocjxwklo\",\"resourceGroupName\":\"rvtxvcmufunlc\",\"name\":\"xvi\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"jgvrquvpyggl\":{},\"mcrdcue\":{}}},\"source\":\"tiahxmfq\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"rvs\",\"resourceGroupName\":\"qbglcjkaysp\",\"name\":\"zodubtlm\",\"endpointServiceContext\":\"gblioskkfmkm\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"yxgbkkqvjcteoedl\",\"resourceGroupName\":\"lskkzpxvj\",\"changedTimeUtc\":\"2021-11-12T04:28:43Z\"},{\"azureSubscriptionId\":\"vocoj\",\"resourceGroupName\":\"cnabxzf\",\"changedTimeUtc\":\"2021-03-26T13:40:25Z\"}]},\"messageForActivation\":\"ytexvzilmhivzk\",\"provisioningState\":\"Deleting\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-10-12T13:56:16Z\"},\"id\":\"zdajlskzptjxu\",\"name\":\"weucyrth\",\"type\":\"qlehmcgcjeinu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,36 +36,35 @@ public void testListByPartnerNamespace() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.channels() - .listByPartnerNamespace("alx", "d", "absr", 1350471817, com.azure.core.util.Context.NONE); + .listByPartnerNamespace("fogdrtbfcm", "rftsjcwjjxs", "mb", 847051089, com.azure.core.util.Context.NONE); Assertions.assertEquals(ChannelType.PARTNER_DESTINATION, response.iterator().next().channelType()); - Assertions.assertEquals("qatiwkkvyanxkvvc", - response.iterator().next().partnerTopicInfo().azureSubscriptionId()); - Assertions.assertEquals("msvuvdjkqxetq", response.iterator().next().partnerTopicInfo().resourceGroupName()); - Assertions.assertEquals("livrjjxnwx", response.iterator().next().partnerTopicInfo().name()); + Assertions.assertEquals("kecifhocjxwklo", response.iterator().next().partnerTopicInfo().azureSubscriptionId()); + Assertions.assertEquals("rvtxvcmufunlc", response.iterator().next().partnerTopicInfo().resourceGroupName()); + Assertions.assertEquals("xvi", response.iterator().next().partnerTopicInfo().name()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().partnerTopicInfo().eventTypeInfo().kind()); - Assertions.assertEquals("bpjxljtxbusqtb", response.iterator().next().partnerTopicInfo().source()); - Assertions.assertEquals("iuisdz", response.iterator().next().partnerDestinationInfo().azureSubscriptionId()); - Assertions.assertEquals("bdgzpagsecnad", - response.iterator().next().partnerDestinationInfo().resourceGroupName()); - Assertions.assertEquals("wqrgxfllmqi", response.iterator().next().partnerDestinationInfo().name()); - Assertions.assertEquals("ezoell", response.iterator().next().partnerDestinationInfo().endpointServiceContext()); - Assertions.assertEquals("iwvmtumxpymdjfu", + Assertions.assertEquals("tiahxmfq", response.iterator().next().partnerTopicInfo().source()); + Assertions.assertEquals("rvs", response.iterator().next().partnerDestinationInfo().azureSubscriptionId()); + Assertions.assertEquals("qbglcjkaysp", response.iterator().next().partnerDestinationInfo().resourceGroupName()); + Assertions.assertEquals("zodubtlm", response.iterator().next().partnerDestinationInfo().name()); + Assertions.assertEquals("gblioskkfmkm", + response.iterator().next().partnerDestinationInfo().endpointServiceContext()); + Assertions.assertEquals("yxgbkkqvjcteoedl", response.iterator() .next() .partnerDestinationInfo() .resourceMoveChangeHistory() .get(0) .azureSubscriptionId()); - Assertions.assertEquals("roqvqpilrgu", + Assertions.assertEquals("lskkzpxvj", response.iterator().next().partnerDestinationInfo().resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T08:31:14Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-12T04:28:43Z"), response.iterator().next().partnerDestinationInfo().resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("vfqepd", response.iterator().next().messageForActivation()); + Assertions.assertEquals("ytexvzilmhivzk", response.iterator().next().messageForActivation()); Assertions.assertEquals(ChannelProvisioningState.DELETING, response.iterator().next().provisioningState()); - Assertions.assertEquals(ReadinessState.ACTIVATED, response.iterator().next().readinessState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T07:31:22Z"), + Assertions.assertEquals(ReadinessState.NEVER_ACTIVATED, response.iterator().next().readinessState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T13:56:16Z"), 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 index 5f7f532b00886..e2f6a1f14e822 100644 --- 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 @@ -1,106 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.ChannelsListResult; import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; -import com.azure.resourcemanager.eventgrid.models.ChannelsListResult; import com.azure.resourcemanager.eventgrid.models.EventDefinitionKind; -import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; -import com.azure.resourcemanager.eventgrid.models.InlineEventProperties; -import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; -import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; -import com.azure.resourcemanager.eventgrid.models.ResourceMoveChangeHistory; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ChannelsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChannelsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"channelType\":\"PartnerDestination\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"ljavbqid\",\"resourceGroupName\":\"ajzyul\",\"name\":\"u\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"hbzhfepg\":{},\"gqexzlocxs\":{},\"paierh\":{}}},\"source\":\"csglum\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"tjaodxobnb\",\"resourceGroupName\":\"k\",\"name\":\"xo\",\"endpointServiceContext\":\"jionpimexgstxgc\",\"resourceMoveChangeHistory\":[{}]},\"messageForActivation\":\"maajrmvdjwzrlo\",\"provisioningState\":\"IdleDueToMirroredPartnerTopicDeletion\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-11-18T17:40:33Z\"},\"id\":\"coejctbzaqs\",\"name\":\"sycbkbfk\",\"type\":\"ukdkexxppofmxa\"}],\"nextLink\":\"fjpgddtocjjxhvp\"}") + "{\"value\":[{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"dckcbc\",\"resourceGroupName\":\"jrjxgciqibrhosx\",\"name\":\"qrhzoymibmrqyib\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"szdtmhrkwof\":{},\"yvoqa\":{},\"piexpbtgiw\":{}}},\"source\":\"oenwashr\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"kcnqxwbpo\",\"resourceGroupName\":\"lpiujwaa\",\"name\":\"pqiiobyuqe\",\"endpointServiceContext\":\"qlpqwcciuq\",\"resourceMoveChangeHistory\":[{},{},{},{}]},\"messageForActivation\":\"utauv\",\"provisioningState\":\"IdleDueToMirroredPartnerTopicDeletion\",\"readinessState\":\"Activated\",\"expirationTimeIfNotActivatedUtc\":\"2021-02-06T10:01:30Z\"},\"id\":\"mhykojoxafnndl\",\"name\":\"ichkoymkcdyhb\",\"type\":\"kkpwdreqnovvq\"},{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"ywsuwsy\",\"resourceGroupName\":\"ndsytgadg\",\"name\":\"aeaeneqnzarrw\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"fqka\":{},\"e\":{}}},\"source\":\"ipfpubji\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"iftohqkvpu\",\"resourceGroupName\":\"sgplsakn\",\"name\":\"fsynljphuop\",\"endpointServiceContext\":\"dlqiyntorzih\",\"resourceMoveChangeHistory\":[{},{}]},\"messageForActivation\":\"jswsrmslyz\",\"provisioningState\":\"IdleDueToMirroredPartnerDestinationDeletion\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-03-03T03:04:29Z\"},\"id\":\"qqzqioxiysuiizyn\",\"name\":\"edyatrwyhqmibzyh\",\"type\":\"itsmypyyn\"},{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"nzgmwznmabik\",\"resourceGroupName\":\"orgjhxbldt\",\"name\":\"wrlkdmtn\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"llxdyhgs\":{},\"ocogj\":{},\"tdtbnnhadooc\":{},\"kvci\":{}}},\"source\":\"nvpamq\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"queziky\",\"resourceGroupName\":\"gxk\",\"name\":\"la\",\"endpointServiceContext\":\"elwuipi\",\"resourceMoveChangeHistory\":[{},{}]},\"messageForActivation\":\"kzivgvvcnayrh\",\"provisioningState\":\"IdleDueToMirroredPartnerTopicDeletion\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-02-22T18:33:34Z\"},\"id\":\"edndr\",\"name\":\"v\",\"type\":\"tkwqqtchealm\"},{\"properties\":{\"channelType\":\"PartnerTopic\",\"partnerTopicInfo\":{\"azureSubscriptionId\":\"ygdvwv\",\"resourceGroupName\":\"iohgwxrtfud\",\"name\":\"pxgy\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"mnpkukghimdblxg\":{},\"imfnjhfjx\":{},\"mszkkfo\":{},\"rey\":{}}},\"source\":\"zi\"},\"partnerDestinationInfo\":{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"aw\",\"resourceGroupName\":\"a\",\"name\":\"xwczelpcire\",\"endpointServiceContext\":\"feaenwab\",\"resourceMoveChangeHistory\":[{}]},\"messageForActivation\":\"lddxbjhwua\",\"provisioningState\":\"Creating\",\"readinessState\":\"NeverActivated\",\"expirationTimeIfNotActivatedUtc\":\"2021-11-21T08:23:20Z\"},\"id\":\"hyoulpjr\",\"name\":\"xagl\",\"type\":\"vimjwos\"}],\"nextLink\":\"xitc\"}") .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(ChannelType.PARTNER_TOPIC, model.value().get(0).channelType()); + Assertions.assertEquals("dckcbc", model.value().get(0).partnerTopicInfo().azureSubscriptionId()); + Assertions.assertEquals("jrjxgciqibrhosx", model.value().get(0).partnerTopicInfo().resourceGroupName()); + Assertions.assertEquals("qrhzoymibmrqyib", 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("oenwashr", model.value().get(0).partnerTopicInfo().source()); + Assertions.assertEquals("kcnqxwbpo", model.value().get(0).partnerDestinationInfo().azureSubscriptionId()); + Assertions.assertEquals("lpiujwaa", model.value().get(0).partnerDestinationInfo().resourceGroupName()); + Assertions.assertEquals("pqiiobyuqe", model.value().get(0).partnerDestinationInfo().name()); + Assertions.assertEquals("qlpqwcciuq", model.value().get(0).partnerDestinationInfo().endpointServiceContext()); + Assertions.assertEquals("utauv", 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"), + Assertions.assertEquals(OffsetDateTime.parse("2021-02-06T10:01:30Z"), 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; + Assertions.assertEquals("xitc", model.nextLink()); } } 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 index 32bd14c4c2fb8..bcb5a3852d808 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -36,14 +36,15 @@ public void testUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.channels() - .updateWithResponse("sbvr", "aqgvto", "rulfuct", + .updateWithResponse("mtvtvegwqiukvzwy", "wtthaokgksk", "i", new ChannelUpdateParameters() - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-07-18T13:13:11Z")) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-01-03T22:08:36Z")) .withPartnerDestinationInfo(new PartnerUpdateDestinationInfo()) .withPartnerTopicInfo(new PartnerUpdateTopicInfo() .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("lyubqjrostvrjeq", new InlineEventProperties(), "tzzbeq", - new InlineEventProperties(), "ztr", new InlineEventProperties())))), + .withInlineEventTypes(mapOf("peexpgeumilhwuit", new InlineEventProperties(), + "dexyionofninbdb", new InlineEventProperties(), "s", new InlineEventProperties(), "cw", + new InlineEventProperties())))), com.azure.core.util.Context.NONE); } 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 index bc65eac3514ef..cbd77490cf5d3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,19 +14,21 @@ 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\"]}") + "{\"validationScheme\":\"UriMatchesAuthenticationName\",\"allowedThumbprints\":[\"lwuenvrkp\",\"ou\",\"ibreb\"]}") .toObject(ClientCertificateAuthentication.class); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, model.validationScheme()); - Assertions.assertEquals("zrkgqhcjrefovg", model.allowedThumbprints().get(0)); + Assertions.assertEquals(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME, + model.validationScheme()); + Assertions.assertEquals("lwuenvrkp", 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")); + .withValidationScheme(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME) + .withAllowedThumbprints(Arrays.asList("lwuenvrkp", "ou", "ibreb")); model = BinaryData.fromObject(model).toObject(ClientCertificateAuthentication.class); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, model.validationScheme()); - Assertions.assertEquals("zrkgqhcjrefovg", model.allowedThumbprints().get(0)); + Assertions.assertEquals(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME, + model.validationScheme()); + Assertions.assertEquals("lwuenvrkp", 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 index 7998289bb9693..9405da3d0e04e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,17 +12,17 @@ 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\"}") + "{\"properties\":{\"description\":\"hqamvdkf\",\"query\":\"nwcvtbvkayhmtnv\",\"provisioningState\":\"Deleted\"},\"id\":\"tkzwpcnpwzc\",\"name\":\"a\",\"type\":\"sgvvsccyajguq\"}") .toObject(ClientGroupInner.class); - Assertions.assertEquals("eojnxqbzvddn", model.description()); - Assertions.assertEquals("ndei", model.query()); + Assertions.assertEquals("hqamvdkf", model.description()); + Assertions.assertEquals("nwcvtbvkayhmtnv", model.query()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClientGroupInner model = new ClientGroupInner().withDescription("eojnxqbzvddn").withQuery("ndei"); + ClientGroupInner model = new ClientGroupInner().withDescription("hqamvdkf").withQuery("nwcvtbvkayhmtnv"); model = BinaryData.fromObject(model).toObject(ClientGroupInner.class); - Assertions.assertEquals("eojnxqbzvddn", model.description()); - Assertions.assertEquals("ndei", model.query()); + Assertions.assertEquals("hqamvdkf", model.description()); + Assertions.assertEquals("nwcvtbvkayhmtnv", 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 index 4a710aab65089..0504ce7a8ec8b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,18 +11,20 @@ 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()); + ClientGroupProperties model = BinaryData + .fromString( + "{\"description\":\"wygzlvdnkfxusem\",\"query\":\"zrmuhapfcqdps\",\"provisioningState\":\"Failed\"}") + .toObject(ClientGroupProperties.class); + Assertions.assertEquals("wygzlvdnkfxusem", model.description()); + Assertions.assertEquals("zrmuhapfcqdps", model.query()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClientGroupProperties model = new ClientGroupProperties().withDescription("mqc").withQuery("q"); + ClientGroupProperties model + = new ClientGroupProperties().withDescription("wygzlvdnkfxusem").withQuery("zrmuhapfcqdps"); model = BinaryData.fromObject(model).toObject(ClientGroupProperties.class); - Assertions.assertEquals("mqc", model.description()); - Assertions.assertEquals("q", model.query()); + Assertions.assertEquals("wygzlvdnkfxusem", model.description()); + Assertions.assertEquals("zrmuhapfcqdps", 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 index 9c10f0f92a35c..7780fc038200c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class ClientGroupsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"rmexznlwkb\",\"query\":\"kxkhupzerufgj\",\"provisioningState\":\"Succeeded\"},\"id\":\"rmyfcem\",\"name\":\"t\",\"type\":\"gyykyalug\"}"; + = "{\"properties\":{\"description\":\"hzdue\",\"query\":\"hapfjiik\",\"provisioningState\":\"Succeeded\"},\"id\":\"qfli\",\"name\":\"jh\",\"type\":\"cl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClientGroup response = manager.clientGroups() - .define("pstauol") - .withExistingNamespace("caydbjzcqymlcfnz", "mhsurlgwqkpmm") - .withDescription("ubmomsgvvjh") - .withQuery("lrlohewjjmajnkdf") + .define("eypofqpm") + .withExistingNamespace("i", "fmnlikpsims") + .withDescription("qgsdr") + .withQuery("ttjxophgerhsmvgo") .create(); - Assertions.assertEquals("rmexznlwkb", response.description()); - Assertions.assertEquals("kxkhupzerufgj", response.query()); + Assertions.assertEquals("hzdue", response.description()); + Assertions.assertEquals("hapfjiik", 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 index ffd19fe449b0f..375aac9564165 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.clientGroups().delete("gbvoffbkk", "vdxaexqokmyrljia", "zbnobr", com.azure.core.util.Context.NONE); + manager.clientGroups() + .delete("gmsfepxyi", "pqadagrhrdicxdwy", "fowxwyovcxjsgbi", 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 index 565034dc2ec36..7f0ca49c9ef0f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class ClientGroupsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"qtwmlmhjnqtqeahj\",\"query\":\"vragpokddx\",\"provisioningState\":\"Succeeded\"},\"id\":\"kvgu\",\"name\":\"vtptbk\",\"type\":\"wkqyns\"}"; + = "{\"properties\":{\"description\":\"uevhamfo\",\"query\":\"w\",\"provisioningState\":\"Creating\"},\"id\":\"ekxpkzwaqxofqo\",\"name\":\"chiqbplvfid\",\"type\":\"sztekxby\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClientGroup response = manager.clientGroups() - .getWithResponse("yejuwyqwdqigmghg", "nztxlujkh", "jcmrnkfm", com.azure.core.util.Context.NONE) + .getWithResponse("xezppk", "waaeskyfjl", "zeqtoyrplixlajml", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qtwmlmhjnqtqeahj", response.description()); - Assertions.assertEquals("vragpokddx", response.query()); + Assertions.assertEquals("uevhamfo", response.description()); + Assertions.assertEquals("w", 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 index 240ddfb2d46c2..ddf0c4ff6a5e7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class ClientGroupsListByNamespaceMockTests { @Test public void testListByNamespace() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"tmol\",\"query\":\"ywmpinmzvfkneer\",\"provisioningState\":\"Failed\"},\"id\":\"knsjulugd\",\"name\":\"bnhrxlelfjhkeiz\",\"type\":\"pihtdmiwjekpt\"}]}"; + = "{\"value\":[{\"properties\":{\"description\":\"ekbhwlkaa\",\"query\":\"krehbfrnuybfflj\",\"provisioningState\":\"Deleting\"},\"id\":\"reoagsqtaadus\",\"name\":\"e\",\"type\":\"xfavsqwudoh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,9 @@ public void testListByNamespace() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.clientGroups() - .listByNamespace("lpbcjtrpz", "yudivbxnhsqeaeo", "qelwgdhuruzytza", 430723655, - com.azure.core.util.Context.NONE); + .listByNamespace("cu", "dveksbuhoduch", "lscrdpibfdyjduss", 704249006, com.azure.core.util.Context.NONE); - Assertions.assertEquals("tmol", response.iterator().next().description()); - Assertions.assertEquals("ywmpinmzvfkneer", response.iterator().next().query()); + Assertions.assertEquals("ekbhwlkaa", response.iterator().next().description()); + Assertions.assertEquals("krehbfrnuybfflj", 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 index 5298996c0d305..bc59a4111498b 100644 --- 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 @@ -1,38 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.eventgrid.implementation.models.ClientGroupsListResult; 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\"}") + "{\"value\":[{\"properties\":{\"description\":\"vuoy\",\"query\":\"ccelve\",\"provisioningState\":\"Updating\"},\"id\":\"qlmfeoker\",\"name\":\"wkyhkobopgxe\",\"type\":\"k\"},{\"properties\":{\"description\":\"pbqpcrfkbwccsn\",\"query\":\"cdwxlpq\",\"provisioningState\":\"Deleting\"},\"id\":\"nkhtjsyingw\",\"name\":\"qatmtdhtmdvy\",\"type\":\"gikdgsz\"},{\"properties\":{\"description\":\"birryuzhl\",\"query\":\"joqrvqqaatj\",\"provisioningState\":\"Deleted\"},\"id\":\"goupmfiibfg\",\"name\":\"jioolvrwxk\",\"type\":\"tkkgllqwjy\"}],\"nextLink\":\"jayvblmhv\"}") .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()); + Assertions.assertEquals("vuoy", model.value().get(0).description()); + Assertions.assertEquals("ccelve", model.value().get(0).query()); + Assertions.assertEquals("jayvblmhv", 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 index 697d919201abc..21f7b46fa2f88 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -18,33 +18,33 @@ 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\"}") + "{\"properties\":{\"description\":\"hbxvvyhgsopbyrqu\",\"authenticationName\":\"g\",\"clientCertificateAuthentication\":{\"validationScheme\":\"IpMatchesAuthenticationName\",\"allowedThumbprints\":[\"bnhlmc\"]},\"state\":\"Enabled\",\"attributes\":{\"mhrixkwmyijejve\":\"\\\"datagitvg\\\"\",\"pna\":\"\\\"datarh\\\"\",\"rvqahqkghtpwi\":\"\\\"dataxexccbdreaxhcexd\\\"\",\"ycxzbfvoo\":\"\\\"datanhyjsv\\\"\"},\"provisioningState\":\"Canceled\"},\"id\":\"mtg\",\"name\":\"qp\",\"type\":\"y\"}") .toObject(ClientInner.class); - Assertions.assertEquals("xnj", model.description()); - Assertions.assertEquals("seiphe", model.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, + Assertions.assertEquals("hbxvvyhgsopbyrqu", model.description()); + Assertions.assertEquals("g", model.authenticationName()); + Assertions.assertEquals(ClientCertificateValidationScheme.IP_MATCHES_AUTHENTICATION_NAME, model.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("yyien", model.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, model.state()); + Assertions.assertEquals("bnhlmc", model.clientCertificateAuthentication().allowedThumbprints().get(0)); + Assertions.assertEquals(ClientState.ENABLED, model.state()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClientInner model = new ClientInner().withDescription("xnj") - .withAuthenticationName("seiphe") + ClientInner model = new ClientInner().withDescription("hbxvvyhgsopbyrqu") + .withAuthenticationName("g") .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.THUMBPRINT_MATCH) - .withAllowedThumbprints(Arrays.asList("yyien"))) - .withState(ClientState.DISABLED) - .withAttributes(mapOf("azjpqyegualhbxxh", "datatgrhpdjpjumas", "zvdudgwdslfhotwm", "datajj", - "pgacftadehxnlty", "dataynpwlbj")); + .withValidationScheme(ClientCertificateValidationScheme.IP_MATCHES_AUTHENTICATION_NAME) + .withAllowedThumbprints(Arrays.asList("bnhlmc"))) + .withState(ClientState.ENABLED) + .withAttributes(mapOf("mhrixkwmyijejve", "\"datagitvg\"", "pna", "\"datarh\"", "rvqahqkghtpwi", + "\"dataxexccbdreaxhcexd\"", "ycxzbfvoo", "\"datanhyjsv\"")); model = BinaryData.fromObject(model).toObject(ClientInner.class); - Assertions.assertEquals("xnj", model.description()); - Assertions.assertEquals("seiphe", model.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, + Assertions.assertEquals("hbxvvyhgsopbyrqu", model.description()); + Assertions.assertEquals("g", model.authenticationName()); + Assertions.assertEquals(ClientCertificateValidationScheme.IP_MATCHES_AUTHENTICATION_NAME, model.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("yyien", model.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, model.state()); + Assertions.assertEquals("bnhlmc", model.clientCertificateAuthentication().allowedThumbprints().get(0)); + Assertions.assertEquals(ClientState.ENABLED, model.state()); } // Use "Map.of" if available 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 index 749767f3325d2..0588d875d75a1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -18,31 +18,32 @@ 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\"}") + "{\"description\":\"tronzmyhgfi\",\"authenticationName\":\"sxkm\",\"clientCertificateAuthentication\":{\"validationScheme\":\"UriMatchesAuthenticationName\",\"allowedThumbprints\":[\"rjreafxts\",\"umh\",\"glikkxwslolb\"]},\"state\":\"Enabled\",\"attributes\":{\"elfk\":\"\\\"datalmv\\\"\",\"njwmwkpnbsazejj\":\"\\\"datagplcrpwjxeznoigb\\\"\",\"augzxnfaazpxdtn\":\"\\\"dataqkagfhsxt\\\"\"},\"provisioningState\":\"Updating\"}") .toObject(ClientProperties.class); - Assertions.assertEquals("ctbqvudwx", model.description()); - Assertions.assertEquals("dnvowg", model.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, + Assertions.assertEquals("tronzmyhgfi", model.description()); + Assertions.assertEquals("sxkm", model.authenticationName()); + Assertions.assertEquals(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME, model.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("dkcglhsl", model.clientCertificateAuthentication().allowedThumbprints().get(0)); + Assertions.assertEquals("rjreafxts", 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") + ClientProperties model = new ClientProperties().withDescription("tronzmyhgfi") + .withAuthenticationName("sxkm") .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.THUMBPRINT_MATCH) - .withAllowedThumbprints(Arrays.asList("dkcglhsl", "zj", "yggdtjixh"))) + .withValidationScheme(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME) + .withAllowedThumbprints(Arrays.asList("rjreafxts", "umh", "glikkxwslolb"))) .withState(ClientState.ENABLED) - .withAttributes(mapOf("yexfwh", "dataqweykhmenev", "amdecte", "databcibvyvdcsitynn", "qsc", "dataf")); + .withAttributes(mapOf("elfk", "\"datalmv\"", "njwmwkpnbsazejj", "\"datagplcrpwjxeznoigb\"", + "augzxnfaazpxdtn", "\"dataqkagfhsxt\"")); model = BinaryData.fromObject(model).toObject(ClientProperties.class); - Assertions.assertEquals("ctbqvudwx", model.description()); - Assertions.assertEquals("dnvowg", model.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, + Assertions.assertEquals("tronzmyhgfi", model.description()); + Assertions.assertEquals("sxkm", model.authenticationName()); + Assertions.assertEquals(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME, model.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("dkcglhsl", model.clientCertificateAuthentication().allowedThumbprints().get(0)); + Assertions.assertEquals("rjreafxts", model.clientCertificateAuthentication().allowedThumbprints().get(0)); Assertions.assertEquals(ClientState.ENABLED, model.state()); } 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 index cf8c998626f80..d5bef14701f80 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public final class ClientsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"i\",\"authenticationName\":\"cqibzj\",\"clientCertificateAuthentication\":{\"validationScheme\":\"SubjectMatchesAuthenticationName\",\"allowedThumbprints\":[\"iphryvcjwqwo\",\"sratjhdhzyb\",\"pijhfrzgdkk\",\"gv\"]},\"state\":\"Disabled\",\"attributes\":{\"mzhwilzzhni\":\"datausmmor\",\"neyttl\":\"datamriprlk\",\"bkut\":\"datacxiv\",\"ynbpvzlqywauy\":\"dataumltwjflu\"},\"provisioningState\":\"Succeeded\"},\"id\":\"khmocgjs\",\"name\":\"gouarhwvixqq\",\"type\":\"gljkybsj\"}"; + = "{\"properties\":{\"description\":\"olgisu\",\"authenticationName\":\"bteogfg\",\"clientCertificateAuthentication\":{\"validationScheme\":\"SubjectMatchesAuthenticationName\",\"allowedThumbprints\":[\"kw\",\"efksxqceaz\",\"pxgnmqvzvluyqq\",\"ios\"]},\"state\":\"Disabled\",\"attributes\":{\"fxtjdhsoym\":\"\\\"dataaifppuacvfyeowp\\\"\",\"tkfvvdshx\":\"\\\"datapvtyqfttehdpbouj\\\"\",\"nquktrfnslnlrxs\":\"\\\"datadedsuenygnxcgjtf\\\"\"},\"provisioningState\":\"Succeeded\"},\"id\":\"rwntfm\",\"name\":\"bgwjdxwnaz\",\"type\":\"urrdreyzjwhsetww\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,22 +37,22 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Client response = manager.clients() - .define("v") - .withExistingNamespace("bjvbzinzab", "mvoglj") - .withDescription("idnwceha") - .withAuthenticationName("do") + .define("wwdjuxdbdl") + .withExistingNamespace("nxocuul", "ojkpoyh") + .withDescription("dyrcvuqb") + .withAuthenticationName("zlrqhbjnqogdx") .withClientCertificateAuthentication(new ClientCertificateAuthentication() - .withValidationScheme(ClientCertificateValidationScheme.DNS_MATCHES_AUTHENTICATION_NAME) - .withAllowedThumbprints(Arrays.asList("omqo", "pepiaeapfs", "rgdtpeqnacyheqw", "pqqncju"))) + .withValidationScheme(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME) + .withAllowedThumbprints(Arrays.asList("xxtjlflecomi", "xojjl"))) .withState(ClientState.ENABLED) - .withAttributes(mapOf("qiipsejb", "datazfymcwmbupyvqyvl")) + .withAttributes(mapOf("dzzqjmu", "\"datailz\"", "ovribq", "\"dataza\"", "qww", "\"dataotokhtvwtaznk\"")) .create(); - Assertions.assertEquals("i", response.description()); - Assertions.assertEquals("cqibzj", response.authenticationName()); + Assertions.assertEquals("olgisu", response.description()); + Assertions.assertEquals("bteogfg", response.authenticationName()); Assertions.assertEquals(ClientCertificateValidationScheme.SUBJECT_MATCHES_AUTHENTICATION_NAME, response.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("iphryvcjwqwo", response.clientCertificateAuthentication().allowedThumbprints().get(0)); + Assertions.assertEquals("kw", response.clientCertificateAuthentication().allowedThumbprints().get(0)); Assertions.assertEquals(ClientState.DISABLED, response.state()); } 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 index 559cacbc82c3e..934b3df4a351d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.clients().delete("k", "xjxjoe", "lqxr", com.azure.core.util.Context.NONE); + manager.clients().delete("ltcetjdvqyd", "eqq", "wa", 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 index cb1eec888ddcc..f077a10657827 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -23,7 +23,7 @@ public final class ClientsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"wempdcifrhju\",\"authenticationName\":\"sulwzpflusn\",\"clientCertificateAuthentication\":{\"validationScheme\":\"UriMatchesAuthenticationName\",\"allowedThumbprints\":[\"zotfriyrgkoek\",\"zwx\",\"yxhighc\",\"xb\"]},\"state\":\"Disabled\",\"attributes\":{\"vskiczd\":\"datacqydey\",\"qaboohxbms\":\"datarjeizik\",\"d\":\"dataycqsxr\"},\"provisioningState\":\"Deleting\"},\"id\":\"yqaeohpjhgejk\",\"name\":\"vhhdaurgho\",\"type\":\"xaex\"}"; + = "{\"properties\":{\"description\":\"rad\",\"authenticationName\":\"kxknpdg\",\"clientCertificateAuthentication\":{\"validationScheme\":\"SubjectMatchesAuthenticationName\",\"allowedThumbprints\":[\"gswhgsaodkw\"]},\"state\":\"Enabled\",\"attributes\":{\"quvwsxbgn\":\"\\\"dataoctohzh\\\"\"},\"provisioningState\":\"Succeeded\"},\"id\":\"vqchoadhrs\",\"name\":\"qvzvspabdsr\",\"type\":\"fajglzrsubklrxhj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Client response = manager.clients() - .getWithResponse("kd", "qnhttwdowrczfj", "nnuxxrkkmhm", com.azure.core.util.Context.NONE) + .getWithResponse("iedfsbwcei", "bv", "ipbwxgooo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wempdcifrhju", response.description()); - Assertions.assertEquals("sulwzpflusn", response.authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.URI_MATCHES_AUTHENTICATION_NAME, + Assertions.assertEquals("rad", response.description()); + Assertions.assertEquals("kxknpdg", response.authenticationName()); + Assertions.assertEquals(ClientCertificateValidationScheme.SUBJECT_MATCHES_AUTHENTICATION_NAME, response.clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("zotfriyrgkoek", - response.clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, response.state()); + Assertions.assertEquals("gswhgsaodkw", 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 index ed05179736bc0..e5eac473a45f9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -24,7 +24,7 @@ public final class ClientsListByNamespaceMockTests { @Test public void testListByNamespace() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"iraabmdlqjbedpf\",\"authenticationName\":\"lhupmomihzbdnpxp\",\"clientCertificateAuthentication\":{\"validationScheme\":\"DnsMatchesAuthenticationName\",\"allowedThumbprints\":[\"yxelyicghflr\",\"fss\"]},\"state\":\"Disabled\",\"attributes\":{\"hammgmqfmefgv\":\"datafxrk\",\"landkdcdjhunhgh\":\"datacpdwjgquxwey\",\"sotirei\":\"datagawnrrnquo\"},\"provisioningState\":\"Deleted\"},\"id\":\"bfsx\",\"name\":\"tcyilbvz\",\"type\":\"mxcjzlquzexokjx\"}]}"; + = "{\"value\":[{\"properties\":{\"description\":\"rpejp\",\"authenticationName\":\"s\",\"clientCertificateAuthentication\":{\"validationScheme\":\"ThumbprintMatch\",\"allowedThumbprints\":[\"kgsuxunrswgk\",\"jhboyikebhuhks\",\"gwl\",\"kh\"]},\"state\":\"Enabled\",\"attributes\":{\"yfejyvdwtf\":\"\\\"datayzcqypzqzufg\\\"\"},\"provisioningState\":\"Deleted\"},\"id\":\"qayamk\",\"name\":\"cf\",\"type\":\"ybmx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,14 +34,14 @@ public void testListByNamespace() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.clients() - .listByNamespace("dknkobe", "tmbozomtzamicbig", "cdgzseznux", 1600985200, com.azure.core.util.Context.NONE); + .listByNamespace("uwdxvqzxoebwgj", "bibanbau", "wtzvpakloz", 1581874837, com.azure.core.util.Context.NONE); - Assertions.assertEquals("iraabmdlqjbedpf", response.iterator().next().description()); - Assertions.assertEquals("lhupmomihzbdnpxp", response.iterator().next().authenticationName()); - Assertions.assertEquals(ClientCertificateValidationScheme.DNS_MATCHES_AUTHENTICATION_NAME, + Assertions.assertEquals("rpejp", response.iterator().next().description()); + Assertions.assertEquals("s", response.iterator().next().authenticationName()); + Assertions.assertEquals(ClientCertificateValidationScheme.THUMBPRINT_MATCH, response.iterator().next().clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("yxelyicghflr", + Assertions.assertEquals("kgsuxunrswgk", response.iterator().next().clientCertificateAuthentication().allowedThumbprints().get(0)); - Assertions.assertEquals(ClientState.DISABLED, response.iterator().next().state()); + 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 index 4724fb8215925..45f8402ff04d2 100644 --- 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 @@ -1,94 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.ClientsListResult; import com.azure.resourcemanager.eventgrid.models.ClientCertificateValidationScheme; import com.azure.resourcemanager.eventgrid.models.ClientState; -import com.azure.resourcemanager.eventgrid.models.ClientsListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ClientsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"pjhvmdajvnys\",\"authenticationName\":\"nqecanoaeup\",\"clientCertificateAuthentication\":{\"validationScheme\":\"EmailMatchesAuthenticationName\",\"allowedThumbprints\":[\"rpmopjmc\",\"atuokthfuiu\"]},\"state\":\"Disabled\",\"attributes\":{\"ozmyzydagfu\":\"datacpkvxodp\"},\"provisioningState\":\"Failed\"},\"id\":\"zyiuokk\",\"name\":\"whrdxwzywqsmbsu\",\"type\":\"exim\"},{\"properties\":{\"description\":\"ocfs\",\"authenticationName\":\"s\",\"clientCertificateAuthentication\":{\"validationScheme\":\"DnsMatchesAuthenticationName\",\"allowedThumbprints\":[\"tki\",\"uxh\",\"yudxorrqnbp\"]},\"state\":\"Disabled\",\"attributes\":{\"qrvkdv\":\"datai\",\"vvdfwatkpnpul\":\"datasllr\",\"wiqzbqjvsovmyo\":\"dataxxbczwtr\",\"zdobpxjmflbvvnch\":\"dataacspkwl\"},\"provisioningState\":\"Succeeded\"},\"id\":\"iwwzjuqk\",\"name\":\"rsa\",\"type\":\"iwkuofos\"},{\"properties\":{\"description\":\"sauuimj\",\"authenticationName\":\"xieduugidyjrr\",\"clientCertificateAuthentication\":{\"validationScheme\":\"UriMatchesAuthenticationName\",\"allowedThumbprints\":[\"v\",\"xc\",\"onpc\",\"hocohslkev\"]},\"state\":\"Enabled\",\"attributes\":{\"ithlvmezyvshxm\":\"datafbuhfmvfaxkffe\",\"gigr\":\"datasbbzo\"},\"provisioningState\":\"Updating\"},\"id\":\"rvjx\",\"name\":\"jnspydp\",\"type\":\"koen\"},{\"properties\":{\"description\":\"knvudwtiukb\",\"authenticationName\":\"ngkpocipazy\",\"clientCertificateAuthentication\":{\"validationScheme\":\"UriMatchesAuthenticationName\",\"allowedThumbprints\":[\"g\"]},\"state\":\"Enabled\",\"attributes\":{\"zntypmrb\":\"datacgygev\",\"ydnfyhxdeoejz\":\"dataizcdrqjsd\",\"jttgzf\":\"datacwif\"},\"provisioningState\":\"Creating\"},\"id\":\"cbkhajdeyeamdph\",\"name\":\"g\",\"type\":\"lpbuxwgipwhonowk\"}],\"nextLink\":\"hwankixzbinjepu\"}") + "{\"value\":[{\"properties\":{\"description\":\"sj\",\"authenticationName\":\"xqtnq\",\"clientCertificateAuthentication\":{\"validationScheme\":\"SubjectMatchesAuthenticationName\",\"allowedThumbprints\":[\"fffiak\"]},\"state\":\"Enabled\",\"attributes\":{\"edltmmjihyeozp\":\"\\\"datam\\\"\"},\"provisioningState\":\"Succeeded\"},\"id\":\"uyqncygupkvipmd\",\"name\":\"cwxqu\",\"type\":\"evzhfsto\"}],\"nextLink\":\"hojujbypelmcuv\"}") .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, + Assertions.assertEquals("sj", model.value().get(0).description()); + Assertions.assertEquals("xqtnq", model.value().get(0).authenticationName()); + Assertions.assertEquals(ClientCertificateValidationScheme.SUBJECT_MATCHES_AUTHENTICATION_NAME, model.value().get(0).clientCertificateAuthentication().validationScheme()); - Assertions.assertEquals("rpmopjmc", + Assertions.assertEquals("fffiak", 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; + Assertions.assertEquals(ClientState.ENABLED, model.value().get(0).state()); + Assertions.assertEquals("hojujbypelmcuv", model.nextLink()); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ConfidentialComputeTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ConfidentialComputeTests.java new file mode 100644 index 0000000000000..f69c293a965a6 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/ConfidentialComputeTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.eventgrid.models.ConfidentialCompute; +import com.azure.resourcemanager.eventgrid.models.ConfidentialComputeMode; +import org.junit.jupiter.api.Assertions; + +public final class ConfidentialComputeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfidentialCompute model + = BinaryData.fromString("{\"mode\":\"Disabled\"}").toObject(ConfidentialCompute.class); + Assertions.assertEquals(ConfidentialComputeMode.DISABLED, model.mode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfidentialCompute model = new ConfidentialCompute().withMode(ConfidentialComputeMode.DISABLED); + model = BinaryData.fromObject(model).toObject(ConfidentialCompute.class); + Assertions.assertEquals(ConfidentialComputeMode.DISABLED, model.mode()); + } +} 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 index 41ea2b5654a59..254e32ec56eb2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,22 +12,22 @@ 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()); + ConnectionState model + = BinaryData.fromString("{\"status\":\"Rejected\",\"description\":\"dj\",\"actionsRequired\":\"lkhbz\"}") + .toObject(ConnectionState.class); + Assertions.assertEquals(PersistedConnectionStatus.REJECTED, model.status()); + Assertions.assertEquals("dj", model.description()); + Assertions.assertEquals("lkhbz", model.actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectionState model = new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) - .withDescription("xiebwwaloayqcg") - .withActionsRequired("tzjuzgwyzmhtxo"); + ConnectionState model = new ConnectionState().withStatus(PersistedConnectionStatus.REJECTED) + .withDescription("dj") + .withActionsRequired("lkhbz"); model = BinaryData.fromObject(model).toObject(ConnectionState.class); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("xiebwwaloayqcg", model.description()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.actionsRequired()); + Assertions.assertEquals(PersistedConnectionStatus.REJECTED, model.status()); + Assertions.assertEquals("dj", model.description()); + Assertions.assertEquals("lkhbz", 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 index c3cd820ee5169..bc5ea0f50cb2f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,33 +15,33 @@ public final class CustomDomainConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomDomainConfiguration model = BinaryData.fromString( - "{\"fullyQualifiedDomainName\":\"hjglikk\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"qpvuzlmvfelf\"},\"certificateUrl\":\"gplcrpwjxeznoigb\",\"expectedTxtRecordName\":\"jwmwkpnbs\",\"expectedTxtRecordValue\":\"ejjoqkagfhsxtta\"}") + "{\"fullyQualifiedDomainName\":\"odgmaajrmvdjwz\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"whijcoejctbza\"},\"certificateUrl\":\"qsycbkbfkgu\",\"expectedTxtRecordName\":\"kexxppof\",\"expectedTxtRecordValue\":\"axcfjpgddtocjjx\"}") .toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("hjglikk", model.fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.APPROVED, model.validationState()); + Assertions.assertEquals("odgmaajrmvdjwz", model.fullyQualifiedDomainName()); + Assertions.assertEquals(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD, model.validationState()); Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("qpvuzlmvfelf", model.identity().userAssignedIdentity()); - Assertions.assertEquals("gplcrpwjxeznoigb", model.certificateUrl()); - Assertions.assertEquals("jwmwkpnbs", model.expectedTxtRecordName()); - Assertions.assertEquals("ejjoqkagfhsxtta", model.expectedTxtRecordValue()); + Assertions.assertEquals("whijcoejctbza", model.identity().userAssignedIdentity()); + Assertions.assertEquals("qsycbkbfkgu", model.certificateUrl()); + Assertions.assertEquals("kexxppof", model.expectedTxtRecordName()); + Assertions.assertEquals("axcfjpgddtocjjx", model.expectedTxtRecordValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomDomainConfiguration model = new CustomDomainConfiguration().withFullyQualifiedDomainName("hjglikk") - .withValidationState(CustomDomainValidationState.APPROVED) + CustomDomainConfiguration model = new CustomDomainConfiguration().withFullyQualifiedDomainName("odgmaajrmvdjwz") + .withValidationState(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD) .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("qpvuzlmvfelf")) - .withCertificateUrl("gplcrpwjxeznoigb") - .withExpectedTxtRecordName("jwmwkpnbs") - .withExpectedTxtRecordValue("ejjoqkagfhsxtta"); + .withUserAssignedIdentity("whijcoejctbza")) + .withCertificateUrl("qsycbkbfkgu") + .withExpectedTxtRecordName("kexxppof") + .withExpectedTxtRecordValue("axcfjpgddtocjjx"); model = BinaryData.fromObject(model).toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("hjglikk", model.fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.APPROVED, model.validationState()); + Assertions.assertEquals("odgmaajrmvdjwz", model.fullyQualifiedDomainName()); + Assertions.assertEquals(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD, model.validationState()); Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("qpvuzlmvfelf", model.identity().userAssignedIdentity()); - Assertions.assertEquals("gplcrpwjxeznoigb", model.certificateUrl()); - Assertions.assertEquals("jwmwkpnbs", model.expectedTxtRecordName()); - Assertions.assertEquals("ejjoqkagfhsxtta", model.expectedTxtRecordValue()); + Assertions.assertEquals("whijcoejctbza", model.identity().userAssignedIdentity()); + Assertions.assertEquals("qsycbkbfkgu", model.certificateUrl()); + Assertions.assertEquals("kexxppof", model.expectedTxtRecordName()); + Assertions.assertEquals("axcfjpgddtocjjx", 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 index b89729f91483f..9bbc78ce373cc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,19 +12,18 @@ public final class CustomDomainIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CustomDomainIdentity model - = BinaryData.fromString("{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"nfaazpxdtnkdmkq\"}") - .toObject(CustomDomainIdentity.class); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("nfaazpxdtnkdmkq", model.userAssignedIdentity()); + CustomDomainIdentity model = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"o\"}") + .toObject(CustomDomainIdentity.class); + Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals("o", model.userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomDomainIdentity model = new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("nfaazpxdtnkdmkq"); + CustomDomainIdentity model + = new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED).withUserAssignedIdentity("o"); model = BinaryData.fromObject(model).toObject(CustomDomainIdentity.class); - Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("nfaazpxdtnkdmkq", model.userAssignedIdentity()); + Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals("o", 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 index 880af5c6956c6..0ea99e3469e11 100644 --- 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 @@ -1,128 +1,46 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"vfejvqnttmbqda\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"kpysthhzagjf\"},\"certificateUrl\":\"yrl\",\"expectedTxtRecordName\":\"enuzejg\",\"expectedTxtRecordValue\":\"veb\"},{\"fullyQualifiedDomainName\":\"qszllrz\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"mihzpimcqrhn\"},\"certificateUrl\":\"minkl\",\"expectedTxtRecordName\":\"xsvtzarhzvqnsqk\",\"expectedTxtRecordValue\":\"mbjwzzoslpkyb\"},{\"fullyQualifiedDomainName\":\"glwkzpgajsqj\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"uvqarwzxu\"},\"certificateUrl\":\"ebluimmbwx\",\"expectedTxtRecordName\":\"gtdmbvx\",\"expectedTxtRecordValue\":\"raokqkbudb\"},{\"fullyQualifiedDomainName\":\"waokbavlytta\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"ebsmhpdujdigato\"},\"certificateUrl\":\"ksc\",\"expectedTxtRecordName\":\"tnanqimwb\",\"expectedTxtRecordValue\":\"pdcldpka\"}],\"customDomainsForTopicSpacesConfiguration\":[{\"fullyQualifiedDomainName\":\"nlaimouxwksqmudm\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"ziuswsw\"},\"certificateUrl\":\"kbqsjhbtqqvyfscy\",\"expectedTxtRecordName\":\"wbivqvogfuyzwvbh\",\"expectedTxtRecordValue\":\"mb\"},{\"fullyQualifiedDomainName\":\"qecroodl\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"asaxxo\"},\"certificateUrl\":\"mfkwiyjvzuk\",\"expectedTxtRecordName\":\"r\",\"expectedTxtRecordValue\":\"wnvz\"},{\"fullyQualifiedDomainName\":\"lnk\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"abjqqaxuyvymcnud\"},\"certificateUrl\":\"oabhjxwxqweuip\",\"expectedTxtRecordName\":\"vk\",\"expectedTxtRecordValue\":\"itnsqxtltc\"}]}") + "{\"customDomainsForTopicsConfiguration\":[{\"fullyQualifiedDomainName\":\"xepcyvahfn\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"vuujq\"},\"certificateUrl\":\"dokgjl\",\"expectedTxtRecordName\":\"oxgvclt\",\"expectedTxtRecordValue\":\"sncghkjeszz\"},{\"fullyQualifiedDomainName\":\"bijhtxfvgxbf\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"pvecxgodeb\"},\"certificateUrl\":\"kk\",\"expectedTxtRecordName\":\"mpukgriw\",\"expectedTxtRecordValue\":\"zlfbxzpuzycispnq\"},{\"fullyQualifiedDomainName\":\"ahmgkbrp\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"uqqkpik\"},\"certificateUrl\":\"rgvtqag\",\"expectedTxtRecordName\":\"uynhijg\",\"expectedTxtRecordValue\":\"ebf\"},{\"fullyQualifiedDomainName\":\"iarbutrcvpna\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"nmpxttdb\"},\"certificateUrl\":\"bnlankxmyskpb\",\"expectedTxtRecordName\":\"nbtkcxywnytnr\",\"expectedTxtRecordValue\":\"nlqidybyxczf\"}],\"customDomainsForTopicSpacesConfiguration\":[{\"fullyQualifiedDomainName\":\"aaxdbabphlwrq\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"sucocmnyyazttbtw\"},\"certificateUrl\":\"qpuedckzywbiex\",\"expectedTxtRecordName\":\"eyueaxibxujwb\",\"expectedTxtRecordValue\":\"walm\"},{\"fullyQualifiedDomainName\":\"zyoxaepdkzjan\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"bavxbniwdjswzt\"},\"certificateUrl\":\"bpg\",\"expectedTxtRecordName\":\"ytxhp\",\"expectedTxtRecordValue\":\"bzpfzab\"},{\"fullyQualifiedDomainName\":\"lcuhxwtctyqiklb\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"bhvgy\"},\"certificateUrl\":\"uosvmkfssxqukk\",\"expectedTxtRecordName\":\"l\",\"expectedTxtRecordValue\":\"gsxnkjzkdeslpv\"}]}") .toObject(CustomDomainOwnershipValidationResultInner.class); - Assertions.assertEquals("vfejvqnttmbqda", + Assertions.assertEquals("xepcyvahfn", model.customDomainsForTopicsConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, - model.customDomainsForTopicsConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, - model.customDomainsForTopicsConfiguration().get(0).identity().type()); - Assertions.assertEquals("kpysthhzagjf", - model.customDomainsForTopicsConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("yrl", model.customDomainsForTopicsConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("enuzejg", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("veb", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordValue()); - Assertions.assertEquals("nlaimouxwksqmudm", - model.customDomainsForTopicSpacesConfiguration().get(0).fullyQualifiedDomainName()); Assertions.assertEquals(CustomDomainValidationState.APPROVED, - model.customDomainsForTopicSpacesConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, - model.customDomainsForTopicSpacesConfiguration().get(0).identity().type()); - Assertions.assertEquals("ziuswsw", - model.customDomainsForTopicSpacesConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("kbqsjhbtqqvyfscy", - model.customDomainsForTopicSpacesConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("wbivqvogfuyzwvbh", - model.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("mb", 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("vfejvqnttmbqda") - .withValidationState(CustomDomainValidationState.PENDING) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("kpysthhzagjf")) - .withCertificateUrl("yrl") - .withExpectedTxtRecordName("enuzejg") - .withExpectedTxtRecordValue("veb"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("qszllrz") - .withValidationState(CustomDomainValidationState.APPROVED) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("mihzpimcqrhn")) - .withCertificateUrl("minkl") - .withExpectedTxtRecordName("xsvtzarhzvqnsqk") - .withExpectedTxtRecordValue("mbjwzzoslpkyb"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("glwkzpgajsqj") - .withValidationState(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("uvqarwzxu")) - .withCertificateUrl("ebluimmbwx") - .withExpectedTxtRecordName("gtdmbvx") - .withExpectedTxtRecordValue("raokqkbudb"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("waokbavlytta") - .withValidationState(CustomDomainValidationState.APPROVED) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("ebsmhpdujdigato")) - .withCertificateUrl("ksc") - .withExpectedTxtRecordName("tnanqimwb") - .withExpectedTxtRecordValue("pdcldpka"))) - .withCustomDomainsForTopicSpacesConfiguration(Arrays.asList( - new CustomDomainConfiguration().withFullyQualifiedDomainName("nlaimouxwksqmudm") - .withValidationState(CustomDomainValidationState.APPROVED) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("ziuswsw")) - .withCertificateUrl("kbqsjhbtqqvyfscy") - .withExpectedTxtRecordName("wbivqvogfuyzwvbh") - .withExpectedTxtRecordValue("mb"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("qecroodl") - .withValidationState(CustomDomainValidationState.APPROVED) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("asaxxo")) - .withCertificateUrl("mfkwiyjvzuk") - .withExpectedTxtRecordName("r") - .withExpectedTxtRecordValue("wnvz"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("lnk") - .withValidationState(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("abjqqaxuyvymcnud")) - .withCertificateUrl("oabhjxwxqweuip") - .withExpectedTxtRecordName("vk") - .withExpectedTxtRecordValue("itnsqxtltc"))); - model = BinaryData.fromObject(model).toObject(CustomDomainOwnershipValidationResultInner.class); - Assertions.assertEquals("vfejvqnttmbqda", - model.customDomainsForTopicsConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, model.customDomainsForTopicsConfiguration().get(0).validationState()); Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.customDomainsForTopicsConfiguration().get(0).identity().type()); - Assertions.assertEquals("kpysthhzagjf", + Assertions.assertEquals("vuujq", model.customDomainsForTopicsConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("yrl", model.customDomainsForTopicsConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("enuzejg", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("veb", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordValue()); - Assertions.assertEquals("nlaimouxwksqmudm", + Assertions.assertEquals("dokgjl", model.customDomainsForTopicsConfiguration().get(0).certificateUrl()); + Assertions.assertEquals("oxgvclt", model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordName()); + Assertions.assertEquals("sncghkjeszz", + model.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordValue()); + Assertions.assertEquals("aaxdbabphlwrq", model.customDomainsForTopicSpacesConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.APPROVED, + Assertions.assertEquals(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD, model.customDomainsForTopicSpacesConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, + Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, model.customDomainsForTopicSpacesConfiguration().get(0).identity().type()); - Assertions.assertEquals("ziuswsw", + Assertions.assertEquals("sucocmnyyazttbtw", model.customDomainsForTopicSpacesConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("kbqsjhbtqqvyfscy", + Assertions.assertEquals("qpuedckzywbiex", model.customDomainsForTopicSpacesConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("wbivqvogfuyzwvbh", + Assertions.assertEquals("eyueaxibxujwb", model.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("mb", model.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordValue()); + Assertions.assertEquals("walm", + 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 index cc7c0aedb127e..e46e58c1bf581 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,19 +13,19 @@ public final class CustomJwtAuthenticationManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomJwtAuthenticationManagedIdentity model - = BinaryData.fromString("{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"vhixbjxy\"}") + = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"tkftutqxlngx\"}") .toObject(CustomJwtAuthenticationManagedIdentity.class); - Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("vhixbjxy", model.userAssignedIdentity()); + Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals("tkftutqxlngx", model.userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CustomJwtAuthenticationManagedIdentity model = new CustomJwtAuthenticationManagedIdentity() - .withType(CustomJwtAuthenticationManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("vhixbjxy"); + .withType(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED) + .withUserAssignedIdentity("tkftutqxlngx"); model = BinaryData.fromObject(model).toObject(CustomJwtAuthenticationManagedIdentity.class); - Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("vhixbjxy", model.userAssignedIdentity()); + Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals("tkftutqxlngx", model.userAssignedIdentity()); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomWebhookAuthenticationManagedIdentityTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomWebhookAuthenticationManagedIdentityTests.java index eed3c3ee247af..00194f1514468 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomWebhookAuthenticationManagedIdentityTests.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/CustomWebhookAuthenticationManagedIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,19 +13,19 @@ public final class CustomWebhookAuthenticationManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomWebhookAuthenticationManagedIdentity model - = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"ithtywu\"}") + = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"xlzevgbmqjqabcy\"}") .toObject(CustomWebhookAuthenticationManagedIdentity.class); Assertions.assertEquals(CustomWebhookAuthenticationManagedIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("ithtywu", model.userAssignedIdentity()); + Assertions.assertEquals("xlzevgbmqjqabcy", model.userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CustomWebhookAuthenticationManagedIdentity model = new CustomWebhookAuthenticationManagedIdentity() .withType(CustomWebhookAuthenticationManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("ithtywu"); + .withUserAssignedIdentity("xlzevgbmqjqabcy"); model = BinaryData.fromObject(model).toObject(CustomWebhookAuthenticationManagedIdentity.class); Assertions.assertEquals(CustomWebhookAuthenticationManagedIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("ithtywu", model.userAssignedIdentity()); + Assertions.assertEquals("xlzevgbmqjqabcy", 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 index b1193687817e2..ceb34c631805c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; 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 index 3ffb5db04966e..0632c62818c0d 100644 --- 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 @@ -1,29 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\"}]}") + "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"rvzmlovuana\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"cxlpmjerb\"}]}") .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()); + Assertions.assertEquals("rvzmlovuana", 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 index ada0ed9eaad2d..72590e9cb86ac 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,15 +12,15 @@ public final class DeliveryAttributeMappingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeliveryAttributeMapping model - = BinaryData.fromString("{\"type\":\"DeliveryAttributeMapping\",\"name\":\"mncwsobqwcsdb\"}") + = BinaryData.fromString("{\"type\":\"DeliveryAttributeMapping\",\"name\":\"iwrxgkn\"}") .toObject(DeliveryAttributeMapping.class); - Assertions.assertEquals("mncwsobqwcsdb", model.name()); + Assertions.assertEquals("iwrxgkn", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeliveryAttributeMapping model = new DeliveryAttributeMapping().withName("mncwsobqwcsdb"); + DeliveryAttributeMapping model = new DeliveryAttributeMapping().withName("iwrxgkn"); model = BinaryData.fromObject(model).toObject(DeliveryAttributeMapping.class); - Assertions.assertEquals("mncwsobqwcsdb", model.name()); + Assertions.assertEquals("iwrxgkn", model.name()); } } 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 index 2883cc072311b..76859fcb8ae89 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.domainEventSubscriptions() - .delete("iarks", "kpgdqxwabzrwiq", "xhaclcdosqkptjq", com.azure.core.util.Context.NONE); + .delete("lndbeaqbkixv", "lwynpbbfqvzfj", "spugzfeuzjljmph", 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 index d8bf8d527a3f3..588d2a68311ff 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class DomainEventSubscriptionsGetDeliveryAttributesWithResponseMock @Test public void testGetDeliveryAttributesWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"zgeuqxbpiat\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"aujegqdtadra\"}]}"; + = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"wulynkgfcf\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"uws\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xxtclhuulri\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"yokvjgbzsxebr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetDeliveryAttributesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeliveryAttributeListResult response = manager.domainEventSubscriptions() - .getDeliveryAttributesWithResponse("kxp", "jpewpyjlfx", "m", com.azure.core.util.Context.NONE) + .getDeliveryAttributesWithResponse("ktl", "pow", "vvqxua", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zgeuqxbpiat", response.value().get(0).name()); + Assertions.assertEquals("wulynkgfcf", 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 index 54502a4cabe16..01e94a1f1e725 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class DomainEventSubscriptionsGetFullUrlWithResponseMockTests { @Test public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"wgvydjufb\"}"; + String responseStr = "{\"endpointUrl\":\"fwxi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testGetFullUrlWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EventSubscriptionFullUrl response = manager.domainEventSubscriptions() - .getFullUrlWithResponse("kifmmainw", "edxkpbqwuntob", "izazz", com.azure.core.util.Context.NONE) + .getFullUrlWithResponse("lttfyhc", "jwsuoardnag", "tpufpbpgnrholhu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wgvydjufb", response.endpointUrl()); + Assertions.assertEquals("fwxi", 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 index e26139a2da231..2e40a60123e39 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -30,106 +30,84 @@ 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\"}") + "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"fw\"},\"groupIds\":[\"r\",\"ool\",\"ttpkiwkkbnujrywv\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"pncur\",\"actionsRequired\":\"iwii\"},\"provisioningState\":\"Succeeded\"},\"id\":\"wubxc\",\"name\":\"ihwqknfdntwjchr\",\"type\":\"goihx\"}],\"provisioningState\":\"Creating\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"ndz\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"rgnepttwqmsniffc\":{\"description\":\"gg\",\"displayName\":\"sb\",\"documentationUrl\":\"ovvtgseinqfiu\",\"dataSchemaUrl\":\"qknp\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"nrojlpijnkr\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"c\",\"action\":\"Allow\"},{\"ipMask\":\"zzronasx\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"None\",\"principalId\":\"zhonnxkrlgnyhmo\",\"tenantId\":\"xkk\",\"userAssignedIdentities\":{\"hrnsvbu\":{\"principalId\":\"rghxjb\",\"clientId\":\"qxvcxgfrpdsofb\"}}},\"location\":\"dvzyybycnun\",\"tags\":{\"ikyzirtxdy\":\"rtkfawnopq\",\"ejnt\":\"x\"},\"id\":\"sewgioilqukr\",\"name\":\"dxtqmieoxo\",\"type\":\"ggufhyaomtb\"}") .toObject(DomainInner.class); - Assertions.assertEquals("bbovplwzbhvgyugu", model.location()); - Assertions.assertEquals("mkfssxqukkfplgm", model.tags().get("sxnkjzkdeslpvlo")); + Assertions.assertEquals("dvzyybycnun", model.location()); + Assertions.assertEquals("rtkfawnopq", model.tags().get("ikyzirtxdy")); 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(IdentityType.NONE, model.identity().type()); + Assertions.assertEquals("zhonnxkrlgnyhmo", model.identity().principalId()); + Assertions.assertEquals("xkk", model.identity().tenantId()); + Assertions.assertEquals("rghxjb", model.identity().userAssignedIdentities().get("hrnsvbu").principalId()); + Assertions.assertEquals("qxvcxgfrpdsofb", model.identity().userAssignedIdentities().get("hrnsvbu").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("gg", model.eventTypeInfo().inlineEventTypes().get("rgnepttwqmsniffc").description()); + Assertions.assertEquals("sb", model.eventTypeInfo().inlineEventTypes().get("rgnepttwqmsniffc").displayName()); + Assertions.assertEquals("ovvtgseinqfiu", + model.eventTypeInfo().inlineEventTypes().get("rgnepttwqmsniffc").documentationUrl()); + Assertions.assertEquals("qknp", + model.eventTypeInfo().inlineEventTypes().get("rgnepttwqmsniffc").dataSchemaUrl()); Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("unmpxttd", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("c", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertFalse(model.autoCreateTopicWithFirstSubscription()); - Assertions.assertFalse(model.autoDeleteTopicWithLastSubscription()); + Assertions.assertFalse(model.disableLocalAuth()); + Assertions.assertTrue(model.autoCreateTopicWithFirstSubscription()); + Assertions.assertTrue(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")) + DomainInner model = new DomainInner().withLocation("dvzyybycnun") + .withTags(mapOf("ikyzirtxdy", "rtkfawnopq", "ejnt", "x")) .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")))) + .withIdentity(new IdentityInfo().withType(IdentityType.NONE) + .withPrincipalId("zhonnxkrlgnyhmo") + .withTenantId("xkk") + .withUserAssignedIdentities(mapOf("hrnsvbu", + new UserIdentityProperties().withPrincipalId("rghxjb").withClientId("qxvcxgfrpdsofb")))) .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")))) + .withInlineEventTypes(mapOf("rgnepttwqmsniffc", + new InlineEventProperties().withDescription("gg") + .withDisplayName("sb") + .withDocumentationUrl("ovvtgseinqfiu") + .withDataSchemaUrl("qknp")))) .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) + .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("c").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("zzronasx").withAction(IpActionType.ALLOW))) + .withDisableLocalAuth(false) + .withAutoCreateTopicWithFirstSubscription(true) + .withAutoDeleteTopicWithLastSubscription(true) .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("dvzyybycnun", model.location()); + Assertions.assertEquals("rtkfawnopq", model.tags().get("ikyzirtxdy")); 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(IdentityType.NONE, model.identity().type()); + Assertions.assertEquals("zhonnxkrlgnyhmo", model.identity().principalId()); + Assertions.assertEquals("xkk", model.identity().tenantId()); + Assertions.assertEquals("rghxjb", model.identity().userAssignedIdentities().get("hrnsvbu").principalId()); + Assertions.assertEquals("qxvcxgfrpdsofb", model.identity().userAssignedIdentities().get("hrnsvbu").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("gg", model.eventTypeInfo().inlineEventTypes().get("rgnepttwqmsniffc").description()); + Assertions.assertEquals("sb", model.eventTypeInfo().inlineEventTypes().get("rgnepttwqmsniffc").displayName()); + Assertions.assertEquals("ovvtgseinqfiu", + model.eventTypeInfo().inlineEventTypes().get("rgnepttwqmsniffc").documentationUrl()); + Assertions.assertEquals("qknp", + model.eventTypeInfo().inlineEventTypes().get("rgnepttwqmsniffc").dataSchemaUrl()); Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("unmpxttd", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("c", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertFalse(model.autoCreateTopicWithFirstSubscription()); - Assertions.assertFalse(model.autoDeleteTopicWithLastSubscription()); + Assertions.assertFalse(model.disableLocalAuth()); + Assertions.assertTrue(model.autoCreateTopicWithFirstSubscription()); + Assertions.assertTrue(model.autoDeleteTopicWithLastSubscription()); Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); } 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 index 1f10da048d24c..865c7ceceb350 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -25,74 +25,64 @@ 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\"}") + "{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"rvk\"},\"groupIds\":[\"vjzhpjbib\",\"jmfxumvf\",\"luyovwxnbkfezzx\",\"cy\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"irujbz\",\"actionsRequired\":\"mvzzbtdcqvp\"},\"provisioningState\":\"Canceled\"},\"id\":\"jviylwdshfs\",\"name\":\"n\",\"type\":\"bgye\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"sgaojfmwncot\"},\"groupIds\":[\"hirctymoxoftpipi\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"hxacpqjlihhyu\",\"actionsRequired\":\"skasdvlmfwdgzxu\"},\"provisioningState\":\"Canceled\"},\"id\":\"pamrsr\",\"name\":\"uzvx\",\"type\":\"risjnhnytxifqjz\"}],\"provisioningState\":\"Succeeded\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"blwpcesutrgj\",\"inputSchema\":\"CustomEventSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"oimwkslirc\":{\"description\":\"qhih\",\"displayName\":\"qg\",\"documentationUrl\":\"pnfqntcyp\",\"dataSchemaUrl\":\"jv\"},\"kojgcyzts\":{\"description\":\"jxv\",\"displayName\":\"fceacvlhvygd\",\"documentationUrl\":\"t\",\"dataSchemaUrl\":\"rtwnawjslbi\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"nbaeqphchqn\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"huwrykqgaifm\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinRegion\"}") .toObject(DomainProperties.class); Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.EVENT_GRID_SCHEMA, model.inputSchema()); + Assertions.assertEquals(InputSchema.CUSTOM_EVENT_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("qhih", model.eventTypeInfo().inlineEventTypes().get("oimwkslirc").description()); + Assertions.assertEquals("qg", model.eventTypeInfo().inlineEventTypes().get("oimwkslirc").displayName()); + Assertions.assertEquals("pnfqntcyp", + model.eventTypeInfo().inlineEventTypes().get("oimwkslirc").documentationUrl()); + Assertions.assertEquals("jv", model.eventTypeInfo().inlineEventTypes().get("oimwkslirc").dataSchemaUrl()); Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("hsfwxosowzxcug", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("huwrykqgaifm", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertTrue(model.autoCreateTopicWithFirstSubscription()); + Assertions.assertFalse(model.autoCreateTopicWithFirstSubscription()); Assertions.assertTrue(model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); + Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, 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) + .withInputSchema(InputSchema.CUSTOM_EVENT_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")))) + .withInlineEventTypes(mapOf("oimwkslirc", + new InlineEventProperties().withDescription("qhih") + .withDisplayName("qg") + .withDocumentationUrl("pnfqntcyp") + .withDataSchemaUrl("jv"), + "kojgcyzts", + new InlineEventProperties().withDescription("jxv") + .withDisplayName("fceacvlhvygd") + .withDocumentationUrl("t") + .withDataSchemaUrl("rtwnawjslbi")))) .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))) + Arrays.asList(new InboundIpRule().withIpMask("huwrykqgaifm").withAction(IpActionType.ALLOW))) .withDisableLocalAuth(true) - .withAutoCreateTopicWithFirstSubscription(true) + .withAutoCreateTopicWithFirstSubscription(false) .withAutoDeleteTopicWithLastSubscription(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR); + .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION); model = BinaryData.fromObject(model).toObject(DomainProperties.class); Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.EVENT_GRID_SCHEMA, model.inputSchema()); + Assertions.assertEquals(InputSchema.CUSTOM_EVENT_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("qhih", model.eventTypeInfo().inlineEventTypes().get("oimwkslirc").description()); + Assertions.assertEquals("qg", model.eventTypeInfo().inlineEventTypes().get("oimwkslirc").displayName()); + Assertions.assertEquals("pnfqntcyp", + model.eventTypeInfo().inlineEventTypes().get("oimwkslirc").documentationUrl()); + Assertions.assertEquals("jv", model.eventTypeInfo().inlineEventTypes().get("oimwkslirc").dataSchemaUrl()); Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("hsfwxosowzxcug", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("huwrykqgaifm", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertTrue(model.autoCreateTopicWithFirstSubscription()); + Assertions.assertFalse(model.autoCreateTopicWithFirstSubscription()); Assertions.assertTrue(model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); + Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, model.dataResidencyBoundary()); } // Use "Map.of" if available 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 index b5fd668d75435..63a94ba8c1390 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.domainTopicEventSubscriptions() - .delete("oog", "kfnaoaqymhc", "topuowyrn", "kbyhqu", com.azure.core.util.Context.NONE); + .delete("ocl", "l", "oewyhxessmvrkd", "sqeq", 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 index 0ad35a4e6a6d8..938814a404dc0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,8 +20,7 @@ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests { @Test public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"lnthbbnkgzukwdrn\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"jthfceyjnc\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"lfuyfjbpfiddhlr\"}]}"; + String responseStr = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dgtfpeersc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +30,10 @@ public void testGetDeliveryAttributesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeliveryAttributeListResult response = manager.domainTopicEventSubscriptions() - .getDeliveryAttributesWithResponse("wcco", "dxku", "mkczynuhhoqe", "shavljqkx", + .getDeliveryAttributesWithResponse("sckhbmc", "rmoyfxxkwykuq", "ndx", "ykhkg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lnthbbnkgzukwdrn", response.value().get(0).name()); + Assertions.assertEquals("dgtfpeersc", 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 index 6b5d03d9ca9c5..cc535499fdac6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class DomainTopicEventSubscriptionsGetFullUrlWithResponseMockTests { @Test public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"xudnmckap\"}"; + String responseStr = "{\"endpointUrl\":\"lfvhlqcskkqjm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,10 +30,9 @@ public void testGetFullUrlWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EventSubscriptionFullUrl response = manager.domainTopicEventSubscriptions() - .getFullUrlWithResponse("czygxv", "ajpxecxqnwhscoza", "mvgxsmpknpwir", "ljfewxqo", - com.azure.core.util.Context.NONE) + .getFullUrlWithResponse("xrnrnjrcufmbga", "n", "gfdt", "cmspsanmameubkqi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xudnmckap", response.endpointUrl()); + Assertions.assertEquals("lfvhlqcskkqjm", 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 index 6564b9a48ecfc..c3afc825240fd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,13 +11,7 @@ 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\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"qovekqvgqou\",\"name\":\"ifzmpjwyivqi\",\"type\":\"f\"}") .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 index 2e1c754cb3d9c..d041c12aefed9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,12 +11,6 @@ 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); + = BinaryData.fromString("{\"provisioningState\":\"Canceled\"}").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 index d3084e47ec049..06e3c370188bd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.domainTopics().delete("uhznwhvuldbk", "ejjk", "igaw", com.azure.core.util.Context.NONE); + manager.domainTopics().delete("ekdfqnhttwd", "wrczfjjnnuxxrk", "mhmnulwemp", 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 index 570a9ad53e870..6c9a7f22a848d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class DomainTopicsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"pnw\",\"name\":\"ytfvpctfji\",\"type\":\"ffffg\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"xkhupzeruf\",\"name\":\"jblcdrmyfcemftz\",\"type\":\"yykyalu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DomainTopic response = manager.domainTopics() - .getWithResponse("matrnzpducd", "akt", "jktzboimyfpq", com.azure.core.util.Context.NONE) + .getWithResponse("kzfzqxjosho", "totryegpkhxrme", "znlw", 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 index 204b90fb94df5..2b5302ddc0cda 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class DomainTopicsListByDomainMockTests { @Test public void testListByDomain() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\"},\"id\":\"irhhmo\",\"name\":\"usuzgfjzcvaaxo\",\"type\":\"alahf\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"oe\",\"name\":\"vzw\",\"type\":\"xyxhighctxbxmo\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testListByDomain() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.domainTopics() - .listByDomain("azmxjqi", "h", "jjsbcmlzaahzbhur", 605503525, com.azure.core.util.Context.NONE); + .listByDomain("cifrhjulrsulwzpf", "usnaw", "hhgzotf", 1914755995, 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 index 0fd5e121fc523..5a55a93a51644 100644 --- 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 @@ -1,29 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.eventgrid.implementation.models.DomainTopicsListResult; 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\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"huagrttikteusqc\",\"name\":\"kvyklxubyjaffmm\",\"type\":\"bl\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"id\":\"bgq\",\"name\":\"brta\",\"type\":\"metttwgd\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"hhrmooizqsey\",\"name\":\"xiutcx\",\"type\":\"pzhyr\"},{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"e\",\"name\":\"joxslhvnhla\",\"type\":\"rqnkkzjcjbtr\"}],\"nextLink\":\"ehvvib\"}") .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()); + Assertions.assertEquals("ehvvib", 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 index e776e1a6fbc2e..b6dfc8d6c61f6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -23,73 +23,61 @@ 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\"}}}}") + "{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"gdotcubiipuipwo\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.1\",\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinRegion\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"rwfscjfnynszquj\":{\"description\":\"pevf\",\"displayName\":\"b\",\"documentationUrl\":\"rilbywdx\",\"dataSchemaUrl\":\"icc\"},\"xkcgxxlxsffgcvi\":{\"description\":\"dvoqyt\",\"displayName\":\"yo\",\"documentationUrl\":\"blgyavutpthj\",\"dataSchemaUrl\":\"oismsksbpimlqol\"}}}}") .toObject(DomainUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("ytkblmpew", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); + Assertions.assertEquals("gdotcubiipuipwo", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertFalse(model.disableLocalAuth()); - Assertions.assertTrue(model.autoCreateTopicWithFirstSubscription()); + Assertions.assertTrue(model.disableLocalAuth()); + Assertions.assertFalse(model.autoCreateTopicWithFirstSubscription()); Assertions.assertFalse(model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); + Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, 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()); + Assertions.assertEquals("pevf", model.eventTypeInfo().inlineEventTypes().get("rwfscjfnynszquj").description()); + Assertions.assertEquals("b", model.eventTypeInfo().inlineEventTypes().get("rwfscjfnynszquj").displayName()); + Assertions.assertEquals("rilbywdx", + model.eventTypeInfo().inlineEventTypes().get("rwfscjfnynszquj").documentationUrl()); + Assertions.assertEquals("icc", model.eventTypeInfo().inlineEventTypes().get("rwfscjfnynszquj").dataSchemaUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DomainUpdateParameterProperties model - = new DomainUpdateParameterProperties().withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + = new DomainUpdateParameterProperties().withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("ytkblmpew").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("krvrns").withAction(IpActionType.ALLOW))) + Arrays.asList(new InboundIpRule().withIpMask("gdotcubiipuipwo").withAction(IpActionType.ALLOW))) .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withDisableLocalAuth(false) - .withAutoCreateTopicWithFirstSubscription(true) + .withDisableLocalAuth(true) + .withAutoCreateTopicWithFirstSubscription(false) .withAutoDeleteTopicWithLastSubscription(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR) + .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION) .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")))); + .withInlineEventTypes(mapOf("rwfscjfnynszquj", + new InlineEventProperties().withDescription("pevf") + .withDisplayName("b") + .withDocumentationUrl("rilbywdx") + .withDataSchemaUrl("icc"), + "xkcgxxlxsffgcvi", + new InlineEventProperties().withDescription("dvoqyt") + .withDisplayName("yo") + .withDocumentationUrl("blgyavutpthj") + .withDataSchemaUrl("oismsksbpimlqol")))); model = BinaryData.fromObject(model).toObject(DomainUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("ytkblmpew", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); + Assertions.assertEquals("gdotcubiipuipwo", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertFalse(model.disableLocalAuth()); - Assertions.assertTrue(model.autoCreateTopicWithFirstSubscription()); + Assertions.assertTrue(model.disableLocalAuth()); + Assertions.assertFalse(model.autoCreateTopicWithFirstSubscription()); Assertions.assertFalse(model.autoDeleteTopicWithLastSubscription()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); + Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, 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()); + Assertions.assertEquals("pevf", model.eventTypeInfo().inlineEventTypes().get("rwfscjfnynszquj").description()); + Assertions.assertEquals("b", model.eventTypeInfo().inlineEventTypes().get("rwfscjfnynszquj").displayName()); + Assertions.assertEquals("rilbywdx", + model.eventTypeInfo().inlineEventTypes().get("rwfscjfnynszquj").documentationUrl()); + Assertions.assertEquals("icc", model.eventTypeInfo().inlineEventTypes().get("rwfscjfnynszquj").dataSchemaUrl()); } // Use "Map.of" if available 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 index 869b733d7016b..82348a6e0cb15 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -28,92 +28,94 @@ 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\"}}") + "{\"tags\":{\"vyvnqqyb\":\"zf\",\"yjkqabqgzslesjcb\":\"ryeu\"},\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"ewdjcvbquwrb\",\"action\":\"Allow\"},{\"ipMask\":\"gohbuffkmrq\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.1\",\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinGeopair\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"ulfgslqu\":{\"description\":\"jvewzcjznmwcp\",\"displayName\":\"uaadraufactkahzo\",\"documentationUrl\":\"jjziuxxpsh\",\"dataSchemaUrl\":\"e\"},\"pgpqchiszepnnb\":{\"description\":\"wdlenrdsut\",\"displayName\":\"bazpjuohmi\",\"documentationUrl\":\"flnorwmduvwp\",\"dataSchemaUrl\":\"vxwmygd\"},\"wzsoldweyuqdunv\":{\"description\":\"rxgibbd\",\"displayName\":\"confozauors\",\"documentationUrl\":\"okwbqplh\",\"dataSchemaUrl\":\"nuuepzlrp\"}}}},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"rbior\",\"tenantId\":\"alywjhhgdn\",\"userAssignedIdentities\":{\"ndieuzaofj\":{\"principalId\":\"ivfomiloxgg\",\"clientId\":\"fi\"}}},\"sku\":{\"name\":\"Premium\"}}") .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("zf", model.tags().get("vyvnqqyb")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("rbior", model.identity().principalId()); + Assertions.assertEquals("alywjhhgdn", model.identity().tenantId()); + Assertions.assertEquals("ivfomiloxgg", + model.identity().userAssignedIdentities().get("ndieuzaofj").principalId()); + Assertions.assertEquals("fi", model.identity().userAssignedIdentities().get("ndieuzaofj").clientId()); + Assertions.assertEquals(Sku.PREMIUM, model.sku().name()); Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("ttouwaboekqvkel", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("ewdjcvbquwrb", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertTrue(model.autoCreateTopicWithFirstSubscription()); - Assertions.assertFalse(model.autoDeleteTopicWithLastSubscription()); + Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); + Assertions.assertFalse(model.disableLocalAuth()); + Assertions.assertFalse(model.autoCreateTopicWithFirstSubscription()); + Assertions.assertTrue(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()); + Assertions.assertEquals("jvewzcjznmwcp", + model.eventTypeInfo().inlineEventTypes().get("ulfgslqu").description()); + Assertions.assertEquals("uaadraufactkahzo", + model.eventTypeInfo().inlineEventTypes().get("ulfgslqu").displayName()); + Assertions.assertEquals("jjziuxxpsh", + model.eventTypeInfo().inlineEventTypes().get("ulfgslqu").documentationUrl()); + Assertions.assertEquals("e", model.eventTypeInfo().inlineEventTypes().get("ulfgslqu").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)) + = new DomainUpdateParameters().withTags(mapOf("vyvnqqyb", "zf", "yjkqabqgzslesjcb", "ryeu")) + .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) + .withPrincipalId("rbior") + .withTenantId("alywjhhgdn") + .withUserAssignedIdentities(mapOf("ndieuzaofj", + new UserIdentityProperties().withPrincipalId("ivfomiloxgg").withClientId("fi")))) + .withSku(new ResourceSku().withName(Sku.PREMIUM)) .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) + Arrays.asList(new InboundIpRule().withIpMask("ewdjcvbquwrb").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("gohbuffkmrq").withAction(IpActionType.ALLOW))) + .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) + .withDisableLocalAuth(false) + .withAutoCreateTopicWithFirstSubscription(false) + .withAutoDeleteTopicWithLastSubscription(true) .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")))); + .withInlineEventTypes(mapOf("ulfgslqu", + new InlineEventProperties().withDescription("jvewzcjznmwcp") + .withDisplayName("uaadraufactkahzo") + .withDocumentationUrl("jjziuxxpsh") + .withDataSchemaUrl("e"), + "pgpqchiszepnnb", + new InlineEventProperties().withDescription("wdlenrdsut") + .withDisplayName("bazpjuohmi") + .withDocumentationUrl("flnorwmduvwp") + .withDataSchemaUrl("vxwmygd"), + "wzsoldweyuqdunv", + new InlineEventProperties().withDescription("rxgibbd") + .withDisplayName("confozauors") + .withDocumentationUrl("okwbqplh") + .withDataSchemaUrl("nuuepzlrp")))); 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("zf", model.tags().get("vyvnqqyb")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("rbior", model.identity().principalId()); + Assertions.assertEquals("alywjhhgdn", model.identity().tenantId()); + Assertions.assertEquals("ivfomiloxgg", + model.identity().userAssignedIdentities().get("ndieuzaofj").principalId()); + Assertions.assertEquals("fi", model.identity().userAssignedIdentities().get("ndieuzaofj").clientId()); + Assertions.assertEquals(Sku.PREMIUM, model.sku().name()); Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("ttouwaboekqvkel", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("ewdjcvbquwrb", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertTrue(model.autoCreateTopicWithFirstSubscription()); - Assertions.assertFalse(model.autoDeleteTopicWithLastSubscription()); + Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); + Assertions.assertFalse(model.disableLocalAuth()); + Assertions.assertFalse(model.autoCreateTopicWithFirstSubscription()); + Assertions.assertTrue(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()); + Assertions.assertEquals("jvewzcjznmwcp", + model.eventTypeInfo().inlineEventTypes().get("ulfgslqu").description()); + Assertions.assertEquals("uaadraufactkahzo", + model.eventTypeInfo().inlineEventTypes().get("ulfgslqu").displayName()); + Assertions.assertEquals("jjziuxxpsh", + model.eventTypeInfo().inlineEventTypes().get("ulfgslqu").documentationUrl()); + Assertions.assertEquals("e", model.eventTypeInfo().inlineEventTypes().get("ulfgslqu").dataSchemaUrl()); } // Use "Map.of" if available 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 index b3f7d509851c9..9550377449cb7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.domains().delete("qwec", "snhpcselqx", com.azure.core.util.Context.NONE); + manager.domains().delete("bfntumeezbxvq", "bnuvwcg", 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 index efaf597a62efd..130257439724e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -29,7 +29,7 @@ public final class DomainsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"qady\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"hwriuo\",\"name\":\"zczfkiceevs\",\"type\":\"axwspcaxikhfjqeb\"}],\"provisioningState\":\"Failed\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"gzzromv\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"lyt\":{\"description\":\"srfsvpinkzpatqt\",\"displayName\":\"swxspvckojaz\",\"documentationUrl\":\"gspftesu\",\"dataSchemaUrl\":\"pvpvd\"},\"kjmdihdcyy\":{\"description\":\"vqseus\",\"displayName\":\"j\",\"documentationUrl\":\"xzfxn\",\"dataSchemaUrl\":\"lbmuos\"},\"wobtdphti\":{\"description\":\"lwhbwzjnu\",\"displayName\":\"rfgmdqgnnbzrtfte\",\"documentationUrl\":\"uubjtvgjsxmty\",\"dataSchemaUrl\":\"vavdp\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"fofwan\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"uwazcgwdfriwg\",\"action\":\"Allow\"},{\"ipMask\":\"ozokscvglli\",\"action\":\"Allow\"},{\"ipMask\":\"yfgwewqkj\",\"action\":\"Allow\"},{\"ipMask\":\"wpxsoo\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"None\",\"principalId\":\"lfb\",\"tenantId\":\"dc\",\"userAssignedIdentities\":{\"fcm\":{\"principalId\":\"rtmdylperpil\",\"clientId\":\"jzgc\"}}},\"location\":\"fbodetresrgvts\",\"tags\":{\"ai\":\"ft\",\"pdxxzetwwz\":\"muqkevzgjypanhx\"},\"id\":\"wot\",\"name\":\"xl\",\"type\":\"fhglhrfo\"}"; + = "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"opazdazgbs\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"q\",\"name\":\"fut\",\"type\":\"dpvozglqj\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"clctzey\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"covdwzqaux\",\"name\":\"a\",\"type\":\"hmkvfruwkudrb\"}],\"provisioningState\":\"Updating\",\"minimumTlsVersionAllowed\":\"1.3\",\"endpoint\":\"dqyemebunaucm\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"priylfmp\":{\"description\":\"jauwcgxefnohaitr\",\"displayName\":\"izerw\",\"documentationUrl\":\"dasmxu\",\"dataSchemaUrl\":\"fbngfcocef\"},\"jz\":{\"description\":\"raudsvhlcdcul\",\"displayName\":\"gpqtmo\",\"documentationUrl\":\"vr\",\"dataSchemaUrl\":\"nvgyshqrdgrtwme\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"kcfazzw\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"zrransyb\",\"action\":\"Allow\"},{\"ipMask\":\"lwzrg\",\"action\":\"Allow\"},{\"ipMask\":\"einkfsc\",\"action\":\"Allow\"},{\"ipMask\":\"jwvuag\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"zmijajwo\",\"tenantId\":\"fsvagh\",\"userAssignedIdentities\":{\"a\":{\"principalId\":\"wl\",\"clientId\":\"rcigtzjcvbxq\"},\"vyezslpux\":{\"principalId\":\"nssovyxpav\",\"clientId\":\"nievwffc\"},\"vnjobfelhldiuhzz\":{\"principalId\":\"bdsval\",\"clientId\":\"ptwtrkxgpazwugxy\"},\"sdsu\":{\"principalId\":\"lmfaewzgiudjp\",\"clientId\":\"qhttqhnmhkre\"}}},\"location\":\"eqdgcruxsp\",\"tags\":{\"qgwokmikp\":\"m\",\"ipfdvhaxdvwzaehp\":\"zfbmjxuv\",\"oixwgiksb\":\"hthdklmvetatlakf\"},\"id\":\"vtooxrpo\",\"name\":\"wp\",\"type\":\"chgjtnhtukfacih\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,31 +39,33 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Domain response = manager.domains() - .getByResourceGroupWithResponse("clrvtzqnrbctbh", "jhxpcvrd", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("wzzqseuzuukykcy", "hyqqzzdcy", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fbodetresrgvts", response.location()); - Assertions.assertEquals("ft", response.tags().get("ai")); + Assertions.assertEquals("eqdgcruxsp", response.location()); + Assertions.assertEquals("m", response.tags().get("qgwokmikp")); Assertions.assertEquals(Sku.PREMIUM, response.sku().name()); - Assertions.assertEquals(IdentityType.NONE, response.identity().type()); - Assertions.assertEquals("lfb", response.identity().principalId()); - Assertions.assertEquals("dc", response.identity().tenantId()); - Assertions.assertEquals("rtmdylperpil", response.identity().userAssignedIdentities().get("fcm").principalId()); - Assertions.assertEquals("jzgc", response.identity().userAssignedIdentities().get("fcm").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ONE, response.minimumTlsVersionAllowed()); + Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("zmijajwo", response.identity().principalId()); + Assertions.assertEquals("fsvagh", response.identity().tenantId()); + Assertions.assertEquals("wl", response.identity().userAssignedIdentities().get("a").principalId()); + Assertions.assertEquals("rcigtzjcvbxq", response.identity().userAssignedIdentities().get("a").clientId()); + Assertions.assertEquals(TlsVersion.ONE_THREE, response.minimumTlsVersionAllowed()); Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.inputSchema()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("srfsvpinkzpatqt", - response.eventTypeInfo().inlineEventTypes().get("lyt").description()); - Assertions.assertEquals("swxspvckojaz", response.eventTypeInfo().inlineEventTypes().get("lyt").displayName()); - Assertions.assertEquals("gspftesu", response.eventTypeInfo().inlineEventTypes().get("lyt").documentationUrl()); - Assertions.assertEquals("pvpvd", response.eventTypeInfo().inlineEventTypes().get("lyt").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.publicNetworkAccess()); - Assertions.assertEquals("uwazcgwdfriwg", response.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("jauwcgxefnohaitr", + response.eventTypeInfo().inlineEventTypes().get("priylfmp").description()); + Assertions.assertEquals("izerw", response.eventTypeInfo().inlineEventTypes().get("priylfmp").displayName()); + Assertions.assertEquals("dasmxu", + response.eventTypeInfo().inlineEventTypes().get("priylfmp").documentationUrl()); + Assertions.assertEquals("fbngfcocef", + response.eventTypeInfo().inlineEventTypes().get("priylfmp").dataSchemaUrl()); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, response.publicNetworkAccess()); + Assertions.assertEquals("zrransyb", response.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, response.inboundIpRules().get(0).action()); - Assertions.assertFalse(response.disableLocalAuth()); - Assertions.assertFalse(response.autoCreateTopicWithFirstSubscription()); - Assertions.assertFalse(response.autoDeleteTopicWithLastSubscription()); + Assertions.assertTrue(response.disableLocalAuth()); + Assertions.assertTrue(response.autoCreateTopicWithFirstSubscription()); + Assertions.assertTrue(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 index 361b57cfa6a3f..63c6c5c720cc0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -30,7 +30,7 @@ public final class DomainsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"zjhfvhuwzbxpc\",\"zgihotje\",\"ohmxvvlrrska\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"iee\",\"name\":\"uyader\",\"type\":\"tfo\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"imyc\",\"grvkcxzznnuif\",\"rsejegprkj\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Canceled\"},\"id\":\"jmwvvbtuqkxxi\",\"name\":\"wgxql\",\"type\":\"ekotjgxi\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"fh\",\"wvjaq\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"ynvskpajbmgeume\",\"name\":\"mj\",\"type\":\"xcbccwkqmt\"}],\"provisioningState\":\"Creating\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"scrpilgftrqrej\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"j\":{\"description\":\"dahlfxlmuifmuadj\",\"displayName\":\"snc\",\"documentationUrl\":\"iioshjgcz\",\"dataSchemaUrl\":\"ybnxgztlcgc\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"j\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"ebecuvlbefv\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"yxjijeypdvrbker\",\"tenantId\":\"dkgaw\",\"userAssignedIdentities\":{\"oisfmnaybdjn\":{\"principalId\":\"ildfk\",\"clientId\":\"feygzqp\"},\"xym\":{\"principalId\":\"mentqo\",\"clientId\":\"why\"},\"jasqubf\":{\"principalId\":\"wi\",\"clientId\":\"towlhlsycoyb\"}}},\"location\":\"cywhj\",\"tags\":{\"ymjzpwdlvwtiws\":\"chqohtfxcpupuk\",\"tassaekewna\":\"osaonhqnamppu\"},\"id\":\"eajbkajlcyizyddc\",\"name\":\"xo\",\"type\":\"krvfsxxbydes\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"edmls\",\"grllcc\",\"aovjow\",\"zhpabac\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"t\",\"name\":\"kwsx\",\"type\":\"srqorcgenmvceb\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"ujxcxxqn\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"e\",\"name\":\"wqurc\",\"type\":\"ojmrvvxwjongzse\"}],\"provisioningState\":\"Canceled\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"lcchskxxkansbvri\",\"inputSchema\":\"EventGridSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"hpqatiwkkvyanxk\":{\"description\":\"lfuctejrthcfjzhx\",\"displayName\":\"ubqjro\",\"documentationUrl\":\"vrjeqmtzzbeqrztr\",\"dataSchemaUrl\":\"lxrdhabsrwrsn\"},\"iibelwcerw\":{\"description\":\"csemsvuvd\",\"displayName\":\"qxetqmmlivrjjx\",\"documentationUrl\":\"xdchp\",\"dataSchemaUrl\":\"xlehzlxpgfquwzp\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"pjxljtxb\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"xniu\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":true,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"db\",\"tenantId\":\"qrgxf\",\"userAssignedIdentities\":{\"uaxroqvqpilrgu\":{\"principalId\":\"iynezoellnkkiiwv\",\"clientId\":\"umxpymdj\"},\"x\":{\"principalId\":\"anlduwzorxsb\",\"clientId\":\"aqklxy\"}}},\"location\":\"vfqepd\",\"tags\":{\"wcpjqduqgi\":\"tuubwyvpjb\",\"lj\":\"exkydfb\"},\"id\":\"vhuerkjddvrglieg\",\"name\":\"tcvbiiftk\",\"type\":\"dwgdn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,36 +39,36 @@ public void testListByResourceGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.domains().listByResourceGroup("l", "yjprxslw", 211488619, com.azure.core.util.Context.NONE); + PagedIterable response = manager.domains() + .listByResourceGroup("sgomtmjz", "xuqgovsxpwwztj", 933500866, com.azure.core.util.Context.NONE); - Assertions.assertEquals("cywhj", response.iterator().next().location()); - Assertions.assertEquals("chqohtfxcpupuk", response.iterator().next().tags().get("ymjzpwdlvwtiws")); - Assertions.assertEquals(Sku.BASIC, response.iterator().next().sku().name()); + Assertions.assertEquals("vfqepd", response.iterator().next().location()); + Assertions.assertEquals("tuubwyvpjb", response.iterator().next().tags().get("wcpjqduqgi")); + Assertions.assertEquals(Sku.PREMIUM, response.iterator().next().sku().name()); Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("yxjijeypdvrbker", response.iterator().next().identity().principalId()); - Assertions.assertEquals("dkgaw", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("ildfk", - response.iterator().next().identity().userAssignedIdentities().get("oisfmnaybdjn").principalId()); - Assertions.assertEquals("feygzqp", - response.iterator().next().identity().userAssignedIdentities().get("oisfmnaybdjn").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ONE, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.iterator().next().inputSchema()); + Assertions.assertEquals("db", response.iterator().next().identity().principalId()); + Assertions.assertEquals("qrgxf", response.iterator().next().identity().tenantId()); + Assertions.assertEquals("iynezoellnkkiiwv", + response.iterator().next().identity().userAssignedIdentities().get("uaxroqvqpilrgu").principalId()); + Assertions.assertEquals("umxpymdj", + response.iterator().next().identity().userAssignedIdentities().get("uaxroqvqpilrgu").clientId()); + Assertions.assertEquals(TlsVersion.ONE_ZERO, 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("dahlfxlmuifmuadj", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("j").description()); - Assertions.assertEquals("snc", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("j").displayName()); - Assertions.assertEquals("iioshjgcz", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("j").documentationUrl()); - Assertions.assertEquals("ybnxgztlcgc", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("j").dataSchemaUrl()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("ebecuvlbefv", response.iterator().next().inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("lfuctejrthcfjzhx", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("hpqatiwkkvyanxk").description()); + Assertions.assertEquals("ubqjro", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("hpqatiwkkvyanxk").displayName()); + Assertions.assertEquals("vrjeqmtzzbeqrztr", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("hpqatiwkkvyanxk").documentationUrl()); + Assertions.assertEquals("lxrdhabsrwrsn", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("hpqatiwkkvyanxk").dataSchemaUrl()); + Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.iterator().next().publicNetworkAccess()); + Assertions.assertEquals("xniu", response.iterator().next().inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertTrue(response.iterator().next().disableLocalAuth()); + Assertions.assertFalse(response.iterator().next().disableLocalAuth()); Assertions.assertTrue(response.iterator().next().autoCreateTopicWithFirstSubscription()); - Assertions.assertTrue(response.iterator().next().autoDeleteTopicWithLastSubscription()); + Assertions.assertFalse(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 index 9c8661395de4f..37f71b567b7b1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -30,7 +30,7 @@ public final class DomainsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"rmlccmet\",\"scz\",\"vfqbqna\",\"dsyenzsieuscpl\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"gxlyzkxitdshezs\",\"name\":\"kol\",\"type\":\"upjo\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"ayeb\",\"azwzlpzbtzuykyki\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"yepfn\",\"name\":\"cmbezac\",\"type\":\"pztgazwyqejgaaok\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"pgkqzkcyzmffngdy\",\"cixrhlcqvh\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"oiutgwrmkahpq\",\"name\":\"azyntacihncogm\",\"type\":\"pnmliq\"}],\"provisioningState\":\"Failed\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"ke\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"sbgbwwzvdajfwn\":{\"description\":\"xpupdtsdf\",\"displayName\":\"i\",\"documentationUrl\":\"ocwiqbuoutmpyzgl\",\"dataSchemaUrl\":\"f\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"maciqgjjrl\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"xvtbougux\",\"action\":\"Allow\"},{\"ipMask\":\"pg\",\"action\":\"Allow\"},{\"ipMask\":\"asualapdlndbea\",\"action\":\"Allow\"},{\"ipMask\":\"xvvlwyn\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"None\",\"principalId\":\"zjljmphfk\",\"tenantId\":\"zolgjzmicuydocc\",\"userAssignedIdentities\":{\"cbdaom\":{\"principalId\":\"anzbui\",\"clientId\":\"hbatecaatsdohzni\"},\"ktl\":{\"principalId\":\"iinj\",\"clientId\":\"l\"}}},\"location\":\"owavvqxuajgcqw\",\"tags\":{\"wsikxxtclhuulr\":\"nkgfcfdr\",\"lttfyhc\":\"qbyokvjgbzsxebr\"},\"id\":\"jwsuoardnag\",\"name\":\"tpufpbpgnrholhu\",\"type\":\"bfwxiplkys\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"utbaaqgze\",\"ajclyzgsnorbjg\",\"nzjotvmr\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"bvvjbhvhdiq\",\"name\":\"yfluiyuosnuudte\",\"type\":\"vhyibdrqrsw\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"pyrowtj\",\"xztfwfqchvczevj\",\"nctagfyvrtpqpem\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"repdqhqyhwq\",\"name\":\"e\",\"type\":\"vx\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"mzeoxinhgre\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"lpuzjpcee\",\"name\":\"nzangprbfaxy\",\"type\":\"zlbciphmse\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"ndktxfv\",\"nfee\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"ietbgnix\",\"name\":\"owwzkyfwnwpi\",\"type\":\"xe\"}],\"provisioningState\":\"Deleting\",\"minimumTlsVersionAllowed\":\"1.3\",\"endpoint\":\"e\",\"inputSchema\":\"EventGridSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"qicladv\":{\"description\":\"jvskwsdgkjg\",\"displayName\":\"cwrase\",\"documentationUrl\":\"efcvo\",\"dataSchemaUrl\":\"woqartwy\"},\"ibb\":{\"description\":\"davuqmcbyms\",\"displayName\":\"bjlquv\",\"documentationUrl\":\"zcjumvpsimioyoig\",\"dataSchemaUrl\":\"miqwnnrac\"},\"qrvwerfwxbsm\":{\"description\":\"pspkladydgnhautw\",\"displayName\":\"exzgpmnmabedd\",\"documentationUrl\":\"lwgdfpfqfpcvs\",\"dataSchemaUrl\":\"l\"},\"hg\":{\"description\":\"ljjehhcifkwdvb\",\"displayName\":\"rek\",\"documentationUrl\":\"sqhtfpw\",\"dataSchemaUrl\":\"byejuwyqwdqigm\"}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"txlujkhnjcmr\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"cqtwmlmhjnqtq\",\"action\":\"Allow\"},{\"ipMask\":\"e\",\"action\":\"Allow\"},{\"ipMask\":\"gpokddxejhhkvgu\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"offbkkwvdxaexqok\",\"tenantId\":\"rlj\",\"userAssignedIdentities\":{\"yudivbxnhsqeaeo\":{\"principalId\":\"bn\",\"clientId\":\"rqlpbcjtrpz\"},\"za\":{\"principalId\":\"elwg\",\"clientId\":\"uruzy\"},\"vfkn\":{\"principalId\":\"gatmoljiy\",\"clientId\":\"pinm\"},\"lugdybnhrxlelf\":{\"principalId\":\"rzztrk\",\"clientId\":\"j\"}}},\"location\":\"k\",\"tags\":{\"iwje\":\"cpihtd\"},\"id\":\"p\",\"name\":\"ycayd\",\"type\":\"jzcqymlcfnz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,36 +39,37 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.domains().list("vppqi", 80001822, com.azure.core.util.Context.NONE); + PagedIterable response + = manager.domains().list("efgmwdhcebuv", 1684190073, com.azure.core.util.Context.NONE); - Assertions.assertEquals("owavvqxuajgcqw", response.iterator().next().location()); - Assertions.assertEquals("nkgfcfdr", response.iterator().next().tags().get("wsikxxtclhuulr")); + Assertions.assertEquals("k", response.iterator().next().location()); + Assertions.assertEquals("cpihtd", response.iterator().next().tags().get("iwje")); Assertions.assertEquals(Sku.BASIC, response.iterator().next().sku().name()); - Assertions.assertEquals(IdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("zjljmphfk", response.iterator().next().identity().principalId()); - Assertions.assertEquals("zolgjzmicuydocc", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("anzbui", - response.iterator().next().identity().userAssignedIdentities().get("cbdaom").principalId()); - Assertions.assertEquals("hbatecaatsdohzni", - response.iterator().next().identity().userAssignedIdentities().get("cbdaom").clientId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.iterator().next().inputSchema()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("offbkkwvdxaexqok", response.iterator().next().identity().principalId()); + Assertions.assertEquals("rlj", response.iterator().next().identity().tenantId()); + Assertions.assertEquals("bn", + response.iterator().next().identity().userAssignedIdentities().get("yudivbxnhsqeaeo").principalId()); + Assertions.assertEquals("rqlpbcjtrpz", + response.iterator().next().identity().userAssignedIdentities().get("yudivbxnhsqeaeo").clientId()); + Assertions.assertEquals(TlsVersion.ONE_THREE, 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("xpupdtsdf", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("sbgbwwzvdajfwn").description()); - Assertions.assertEquals("i", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("sbgbwwzvdajfwn").displayName()); - Assertions.assertEquals("ocwiqbuoutmpyzgl", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("sbgbwwzvdajfwn").documentationUrl()); - Assertions.assertEquals("f", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("sbgbwwzvdajfwn").dataSchemaUrl()); + Assertions.assertEquals("jvskwsdgkjg", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("qicladv").description()); + Assertions.assertEquals("cwrase", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("qicladv").displayName()); + Assertions.assertEquals("efcvo", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("qicladv").documentationUrl()); + Assertions.assertEquals("woqartwy", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("qicladv").dataSchemaUrl()); Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("xvtbougux", response.iterator().next().inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("cqtwmlmhjnqtq", response.iterator().next().inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertFalse(response.iterator().next().disableLocalAuth()); + Assertions.assertTrue(response.iterator().next().disableLocalAuth()); Assertions.assertFalse(response.iterator().next().autoCreateTopicWithFirstSubscription()); - Assertions.assertTrue(response.iterator().next().autoDeleteTopicWithLastSubscription()); + Assertions.assertFalse(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 index a75b91b6c7ffe..3a16b4e8d34cd 100644 --- 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 @@ -1,201 +1,47 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.DomainsListResult; 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\"}") + "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"w\",\"name\":\"youpfgfbkj\",\"type\":\"bdyhgkfminsgowz\"},{\"properties\":{},\"id\":\"sttktlahbqa\",\"name\":\"tx\",\"type\":\"gzukxitmm\"},{\"properties\":{},\"id\":\"qqqxhrnxrx\",\"name\":\"pjui\",\"type\":\"av\"}],\"provisioningState\":\"Canceled\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"vazivjlfr\",\"inputSchema\":\"CustomEventSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"atnwxyiopi\":{},\"kqqfk\":{}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"cxkdmligovi\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"loazuruocbgoo\",\"action\":\"Allow\"},{\"ipMask\":\"oybfhjxakvvj\",\"action\":\"Allow\"},{\"ipMask\":\"r\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"gyvudtjuewbc\",\"tenantId\":\"xuuwhcj\",\"userAssignedIdentities\":{\"lma\":{\"principalId\":\"ybvpay\",\"clientId\":\"kudzpxgwj\"},\"ogsjkmnwqjno\":{\"principalId\":\"tcyohpfkyrk\",\"clientId\":\"dg\"}}},\"location\":\"iyhddvi\",\"tags\":{\"dwvvba\":\"gfnmntfpmvmemfnc\",\"db\":\"xlllchp\",\"vsjcswsmystuluqy\":\"evwrdnhfuk\",\"qbmfpjbabwidf\":\"fcvlerch\"},\"id\":\"xsspuunnoxyhk\",\"name\":\"g\",\"type\":\"ddrihpf\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"ewda\",\"name\":\"mdjvlpj\",\"type\":\"xkzb\"},{\"properties\":{},\"id\":\"geivsiykzkdncj\",\"name\":\"xonbzoggculapz\",\"type\":\"y\"}],\"provisioningState\":\"Failed\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"qxepnylbfuaj\",\"inputSchema\":\"CustomEventSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"qzhv\":{},\"cib\":{}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"owuxrkjpvdwx\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"wzjbh\",\"action\":\"Allow\"},{\"ipMask\":\"jrkambtrnegvmnv\",\"action\":\"Allow\"},{\"ipMask\":\"vldspa\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":true,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"None\",\"principalId\":\"rriloz\",\"tenantId\":\"eewchpxlktw\",\"userAssignedIdentities\":{\"rqzz\":{\"principalId\":\"ycslevufuztcktyh\",\"clientId\":\"qedcgzulwm\"},\"epr\":{\"principalId\":\"jvpglydzgk\",\"clientId\":\"qeevt\"},\"dmovzvfva\":{\"principalId\":\"t\",\"clientId\":\"ytp\"},\"riglaec\":{\"principalId\":\"zqadf\",\"clientId\":\"z\"}}},\"location\":\"dticokpvzml\",\"tags\":{\"x\":\"ld\",\"rclnpkc\":\"bf\",\"khyawfvjlboxqv\":\"ayzri\"},\"id\":\"jlmxhomdynhd\",\"name\":\"digumbnr\",\"type\":\"auzzptjazysd\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"vaiqyuvvf\",\"name\":\"nk\",\"type\":\"hhqyi\"},{\"properties\":{},\"id\":\"lauyav\",\"name\":\"uwmncs\",\"type\":\"tijfybvp\"}],\"provisioningState\":\"Creating\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"sgbdhuz\",\"inputSchema\":\"CustomEventSchema\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"nscliqhzvhxnk\":{},\"mtk\":{}}},\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"tppn\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"ihfrbbcevqa\",\"action\":\"Allow\"},{\"ipMask\":\"dhlfkqojpykvgt\",\"action\":\"Allow\"},{\"ipMask\":\"ifmzzsd\",\"action\":\"Allow\"},{\"ipMask\":\"nysuxmprafwgckh\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"autoCreateTopicWithFirstSubscription\":false,\"autoDeleteTopicWithLastSubscription\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"pavehhr\",\"tenantId\":\"bunzozudh\",\"userAssignedIdentities\":{\"mfdn\":{\"principalId\":\"moy\",\"clientId\":\"dyuib\"},\"cvwmzhwplefa\":{\"principalId\":\"ydvfvfcjnae\",\"clientId\":\"srvhmgorffuki\"},\"zqlqhyc\":{\"principalId\":\"xilcbtgnhnzey\",\"clientId\":\"tjj\"},\"mieknlraria\":{\"principalId\":\"odggx\",\"clientId\":\"ee\"}}},\"location\":\"iuagydwqfbylyrfg\",\"tags\":{\"fnzjvusfzldm\":\"tcojocqwo\",\"nbtgkbugrjqctoj\":\"zuxylfsbtkadpyso\",\"of\":\"mi\"},\"id\":\"eypefojyqd\",\"name\":\"cuplcplcwkhih\",\"type\":\"hlhzdsqtzbsrgno\"}],\"nextLink\":\"jhf\"}") .toObject(DomainsListResult.class); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("wkfvhqcrailvp", model.value().get(0).tags().get("ppfufl")); + Assertions.assertEquals("iyhddvi", model.value().get(0).location()); + Assertions.assertEquals("gfnmntfpmvmemfnc", model.value().get(0).tags().get("dwvvba")); 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(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("gyvudtjuewbc", model.value().get(0).identity().principalId()); + Assertions.assertEquals("xuuwhcj", model.value().get(0).identity().tenantId()); + Assertions.assertEquals("ybvpay", + model.value().get(0).identity().userAssignedIdentities().get("lma").principalId()); + Assertions.assertEquals("kudzpxgwj", + model.value().get(0).identity().userAssignedIdentities().get("lma").clientId()); + Assertions.assertEquals(TlsVersion.ONE_ONE, model.value().get(0).minimumTlsVersionAllowed()); + Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, 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(PublicNetworkAccess.DISABLED, model.value().get(0).publicNetworkAccess()); + Assertions.assertEquals("loazuruocbgoo", model.value().get(0).inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertTrue(model.value().get(0).disableLocalAuth()); - Assertions.assertTrue(model.value().get(0).autoCreateTopicWithFirstSubscription()); + Assertions.assertFalse(model.value().get(0).disableLocalAuth()); + Assertions.assertFalse(model.value().get(0).autoCreateTopicWithFirstSubscription()); Assertions.assertFalse(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.assertTrue(model.value().get(0).disableLocalAuth()); - Assertions.assertTrue(model.value().get(0).autoCreateTopicWithFirstSubscription()); - Assertions.assertFalse(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; + Assertions.assertEquals("jhf", model.nextLink()); } } 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 index 85a99f8f91348..e3c1b761739b3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,16 +11,16 @@ public final class DynamicDeliveryAttributeMappingPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DynamicDeliveryAttributeMappingProperties model = BinaryData.fromString("{\"sourceField\":\"drtpzkgme\"}") + DynamicDeliveryAttributeMappingProperties model = BinaryData.fromString("{\"sourceField\":\"etnwsdtutnw\"}") .toObject(DynamicDeliveryAttributeMappingProperties.class); - Assertions.assertEquals("drtpzkgme", model.sourceField()); + Assertions.assertEquals("etnwsdtutnw", model.sourceField()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DynamicDeliveryAttributeMappingProperties model - = new DynamicDeliveryAttributeMappingProperties().withSourceField("drtpzkgme"); + = new DynamicDeliveryAttributeMappingProperties().withSourceField("etnwsdtutnw"); model = BinaryData.fromObject(model).toObject(DynamicDeliveryAttributeMappingProperties.class); - Assertions.assertEquals("drtpzkgme", model.sourceField()); + Assertions.assertEquals("etnwsdtutnw", 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 index 92aa15fce0804..f6c5aa1eeb417 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,19 +12,18 @@ public final class DynamicDeliveryAttributeMappingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DynamicDeliveryAttributeMapping model = BinaryData - .fromString( - "{\"type\":\"Dynamic\",\"properties\":{\"sourceField\":\"whczzqrhmng\"},\"name\":\"edygisrzwnykdi\"}") + .fromString("{\"type\":\"Dynamic\",\"properties\":{\"sourceField\":\"q\"},\"name\":\"aqvlgafcqusr\"}") .toObject(DynamicDeliveryAttributeMapping.class); - Assertions.assertEquals("edygisrzwnykdi", model.name()); - Assertions.assertEquals("whczzqrhmng", model.sourceField()); + Assertions.assertEquals("aqvlgafcqusr", model.name()); + Assertions.assertEquals("q", model.sourceField()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DynamicDeliveryAttributeMapping model - = new DynamicDeliveryAttributeMapping().withName("edygisrzwnykdi").withSourceField("whczzqrhmng"); + = new DynamicDeliveryAttributeMapping().withName("aqvlgafcqusr").withSourceField("q"); model = BinaryData.fromObject(model).toObject(DynamicDeliveryAttributeMapping.class); - Assertions.assertEquals("edygisrzwnykdi", model.name()); - Assertions.assertEquals("whczzqrhmng", model.sourceField()); + Assertions.assertEquals("aqvlgafcqusr", model.name()); + Assertions.assertEquals("q", 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 index 32618a26f1d37..d071c7dc6f518 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,20 +14,22 @@ public final class EventHubEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EventHubEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"aklozk\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"pejplssa\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"tttk\"}]}") + "{\"resourceId\":\"sx\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"buzjyih\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"sbhud\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ohyuemslynsq\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"pfoobr\"}]}") .toObject(EventHubEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("aklozk", model.resourceId()); - Assertions.assertEquals("pejplssa", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("sx", model.resourceId()); + Assertions.assertEquals("buzjyih", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EventHubEventSubscriptionDestinationProperties model - = new EventHubEventSubscriptionDestinationProperties().withResourceId("aklozk") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("pejplssa"), - new DeliveryAttributeMapping().withName("tttk"))); + = new EventHubEventSubscriptionDestinationProperties().withResourceId("sx") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("buzjyih"), + new DeliveryAttributeMapping().withName("sbhud"), + new DeliveryAttributeMapping().withName("ohyuemslynsq"), + new DeliveryAttributeMapping().withName("pfoobr"))); model = BinaryData.fromObject(model).toObject(EventHubEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("aklozk", model.resourceId()); - Assertions.assertEquals("pejplssa", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("sx", model.resourceId()); + Assertions.assertEquals("buzjyih", 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 index d4d8f143eb686..bc17c4e5ebc08 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,22 +14,21 @@ public final class EventHubEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EventHubEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"EventHub\",\"properties\":{\"resourceId\":\"xunrswgkpjhboy\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"huhkslgwlok\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"eoijyzcqypzqzufg\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"fejyvdwtfxptpqa\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"mkncfgybmxsnxo\"}]}}") + "{\"endpointType\":\"EventHub\",\"properties\":{\"resourceId\":\"ycvuzhyrmewipmv\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ukuqgsj\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"undxgketw\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"hzjhf\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"hvvmuvgpmun\"}]}}") .toObject(EventHubEventSubscriptionDestination.class); - Assertions.assertEquals("xunrswgkpjhboy", model.resourceId()); - Assertions.assertEquals("huhkslgwlok", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("ycvuzhyrmewipmv", model.resourceId()); + Assertions.assertEquals("ukuqgsj", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EventHubEventSubscriptionDestination model - = new EventHubEventSubscriptionDestination().withResourceId("xunrswgkpjhboy") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("huhkslgwlok"), - new DeliveryAttributeMapping().withName("eoijyzcqypzqzufg"), - new DeliveryAttributeMapping().withName("fejyvdwtfxptpqa"), - new DeliveryAttributeMapping().withName("mkncfgybmxsnxo"))); + EventHubEventSubscriptionDestination model = new EventHubEventSubscriptionDestination() + .withResourceId("ycvuzhyrmewipmv") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("ukuqgsj"), + new DeliveryAttributeMapping().withName("undxgketw"), new DeliveryAttributeMapping().withName("hzjhf"), + new DeliveryAttributeMapping().withName("hvvmuvgpmun"))); model = BinaryData.fromObject(model).toObject(EventHubEventSubscriptionDestination.class); - Assertions.assertEquals("xunrswgkpjhboy", model.resourceId()); - Assertions.assertEquals("huhkslgwlok", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("ycvuzhyrmewipmv", model.resourceId()); + Assertions.assertEquals("ukuqgsj", 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 index d6e977b88d1dc..ad058b673381a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; 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 index 8870798fc8b4c..536e824dd5644 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,14 +12,7 @@ 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()); + = BinaryData.fromString("{\"endpointUrl\":\"fcktqumiekke\"}").toObject(EventSubscriptionFullUrlInner.class); + Assertions.assertEquals("fcktqumiekke", model.endpointUrl()); } } 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 index c0c4ecc45da94..55f53f277f274 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.eventSubscriptions().delete("vi", "neychbjizq", com.azure.core.util.Context.NONE); + manager.eventSubscriptions().delete("wnrrnquoxso", "ireimseobf", 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 index 0835990fbee21..9f8029ca7485f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class EventSubscriptionsGetDeliveryAttributesWithResponseMockTests @Test public void testGetDeliveryAttributesWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"skw\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"sdetjygowifcqpol\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"gysdgzyyb\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xlvocptvdx\"}]}"; + = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"cqibzj\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"weebiphryv\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"wqwoqsratjhdhzyb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetDeliveryAttributesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeliveryAttributeListResult response = manager.eventSubscriptions() - .getDeliveryAttributesWithResponse("yrqsdbpokszanm", "wgpterdiuw", com.azure.core.util.Context.NONE) + .getDeliveryAttributesWithResponse("wyj", "nldpxottd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("skw", response.value().get(0).name()); + Assertions.assertEquals("cqibzj", 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 index eb35b89d0bc00..79303f3989ace 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class EventSubscriptionsGetFullUrlWithResponseMockTests { @Test public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"ipmlnfyzavf\"}"; + String responseStr = "{\"endpointUrl\":\"khsusmmorf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testGetFullUrlWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EventSubscriptionFullUrl response = manager.eventSubscriptions() - .getFullUrlWithResponse("sgnwdxzedpq", "rfbo", com.azure.core.util.Context.NONE) + .getFullUrlWithResponse("pijhfrzgdkk", "gv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ipmlnfyzavf", response.endpointUrl()); + Assertions.assertEquals("khsusmmorf", response.endpointUrl()); } } 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 index e962be9f5643f..87f5b9a7a2b8c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,34 +16,39 @@ 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\"}}}") + "{\"kind\":\"Inline\",\"inlineEventTypes\":{\"lhbnxkna\":{\"description\":\"aalnjixi\",\"displayName\":\"yaw\",\"documentationUrl\":\"yaqcslyjpkiidz\",\"dataSchemaUrl\":\"xznelixhnrztf\"},\"qwwncw\":{\"description\":\"ulppggdtpnapnyir\",\"displayName\":\"uhpigvp\",\"documentationUrl\":\"lgqg\",\"dataSchemaUrl\":\"xmedjvcsly\"},\"ac\":{\"description\":\"hxg\",\"displayName\":\"rmgucnap\",\"documentationUrl\":\"eoellwptfdygp\",\"dataSchemaUrl\":\"b\"}}}") .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()); + Assertions.assertEquals("aalnjixi", model.inlineEventTypes().get("lhbnxkna").description()); + Assertions.assertEquals("yaw", model.inlineEventTypes().get("lhbnxkna").displayName()); + Assertions.assertEquals("yaqcslyjpkiidz", model.inlineEventTypes().get("lhbnxkna").documentationUrl()); + Assertions.assertEquals("xznelixhnrztf", model.inlineEventTypes().get("lhbnxkna").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"))); + .withInlineEventTypes(mapOf("lhbnxkna", + new InlineEventProperties().withDescription("aalnjixi") + .withDisplayName("yaw") + .withDocumentationUrl("yaqcslyjpkiidz") + .withDataSchemaUrl("xznelixhnrztf"), + "qwwncw", + new InlineEventProperties().withDescription("ulppggdtpnapnyir") + .withDisplayName("uhpigvp") + .withDocumentationUrl("lgqg") + .withDataSchemaUrl("xmedjvcsly"), + "ac", + new InlineEventProperties().withDescription("hxg") + .withDisplayName("rmgucnap") + .withDocumentationUrl("eoellwptfdygp") + .withDataSchemaUrl("b"))); 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()); + Assertions.assertEquals("aalnjixi", model.inlineEventTypes().get("lhbnxkna").description()); + Assertions.assertEquals("yaw", model.inlineEventTypes().get("lhbnxkna").displayName()); + Assertions.assertEquals("yaqcslyjpkiidz", model.inlineEventTypes().get("lhbnxkna").documentationUrl()); + Assertions.assertEquals("xznelixhnrztf", model.inlineEventTypes().get("lhbnxkna").dataSchemaUrl()); } // Use "Map.of" if available 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 index 5a360a7a99107..0a639ccb96550 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,24 +12,11 @@ public final class EventTypeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EventTypeInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"fg\",\"description\":\"saetgzdgvpyig\",\"schemaUrl\":\"qqil\",\"isInDefaultSet\":true},\"id\":\"d\",\"name\":\"wjoe\",\"type\":\"xngucaifpaurwwgi\"}") + "{\"properties\":{\"displayName\":\"xivzrrry\",\"description\":\"imipskdyzatvfuz\",\"schemaUrl\":\"ftjvvruxwigsye\",\"isInDefaultSet\":false},\"id\":\"smjtgrqgdg\",\"name\":\"kileplkcsmknhwtb\",\"type\":\"aedorvvmqf\"}") .toObject(EventTypeInner.class); - Assertions.assertEquals("fg", model.displayName()); - Assertions.assertEquals("saetgzdgvpyig", model.description()); - Assertions.assertEquals("qqil", model.schemaUrl()); - Assertions.assertTrue(model.isInDefaultSet()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventTypeInner model = new EventTypeInner().withDisplayName("fg") - .withDescription("saetgzdgvpyig") - .withSchemaUrl("qqil") - .withIsInDefaultSet(true); - model = BinaryData.fromObject(model).toObject(EventTypeInner.class); - Assertions.assertEquals("fg", model.displayName()); - Assertions.assertEquals("saetgzdgvpyig", model.description()); - Assertions.assertEquals("qqil", model.schemaUrl()); - Assertions.assertTrue(model.isInDefaultSet()); + Assertions.assertEquals("xivzrrry", model.displayName()); + Assertions.assertEquals("imipskdyzatvfuz", model.description()); + Assertions.assertEquals("ftjvvruxwigsye", model.schemaUrl()); + Assertions.assertFalse(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 index c802c5609966e..0b5640ae0f5a8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,24 +12,11 @@ public final class EventTypePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EventTypeProperties model = BinaryData.fromString( - "{\"displayName\":\"jqqacdmkx\",\"description\":\"dcvjwc\",\"schemaUrl\":\"iakeciqc\",\"isInDefaultSet\":false}") + "{\"displayName\":\"ygbdgwumgxdgdhpa\",\"description\":\"dexjddvjs\",\"schemaUrl\":\"wotmmwllcolsrsxa\",\"isInDefaultSet\":false}") .toObject(EventTypeProperties.class); - Assertions.assertEquals("jqqacdmkx", model.displayName()); - Assertions.assertEquals("dcvjwc", model.description()); - Assertions.assertEquals("iakeciqc", model.schemaUrl()); - Assertions.assertFalse(model.isInDefaultSet()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventTypeProperties model = new EventTypeProperties().withDisplayName("jqqacdmkx") - .withDescription("dcvjwc") - .withSchemaUrl("iakeciqc") - .withIsInDefaultSet(false); - model = BinaryData.fromObject(model).toObject(EventTypeProperties.class); - Assertions.assertEquals("jqqacdmkx", model.displayName()); - Assertions.assertEquals("dcvjwc", model.description()); - Assertions.assertEquals("iakeciqc", model.schemaUrl()); + Assertions.assertEquals("ygbdgwumgxdgdhpa", model.displayName()); + Assertions.assertEquals("dexjddvjs", model.description()); + Assertions.assertEquals("wotmmwllcolsrsxa", model.schemaUrl()); Assertions.assertFalse(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 index c665f3f271748..1d3144a8bc741 100644 --- 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 @@ -1,42 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.eventgrid.implementation.models.EventTypesListResult; 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\":\"xyqvg\",\"description\":\"aodetv\",\"schemaUrl\":\"kxdxuwsaifmcwn\",\"isInDefaultSet\":false},\"id\":\"zlehgcvkbcknjolg\",\"name\":\"y\",\"type\":\"xpvelszerqzevxo\"},{\"properties\":{\"displayName\":\"ntxwaljglzob\",\"description\":\"waafrqulh\",\"schemaUrl\":\"yqbhd\",\"isInDefaultSet\":true},\"id\":\"jrqpjiyrqjcrga\",\"name\":\"wmzwdfkbnrzorpdl\",\"type\":\"bqc\"}]}") + "{\"value\":[{\"properties\":{\"displayName\":\"qalsxkd\",\"description\":\"qapfgsdpc\",\"schemaUrl\":\"ssmzhhkuui\",\"isInDefaultSet\":false},\"id\":\"qctekvalb\",\"name\":\"htjqvqyvw\",\"type\":\"hta\"}],\"nextLink\":\"xhzzyse\"}") .toObject(EventTypesListResult.class); - Assertions.assertEquals("xyqvg", model.value().get(0).displayName()); - Assertions.assertEquals("aodetv", model.value().get(0).description()); - Assertions.assertEquals("kxdxuwsaifmcwn", model.value().get(0).schemaUrl()); - Assertions.assertFalse(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("xyqvg") - .withDescription("aodetv") - .withSchemaUrl("kxdxuwsaifmcwn") - .withIsInDefaultSet(false), - new EventTypeInner().withDisplayName("ntxwaljglzob") - .withDescription("waafrqulh") - .withSchemaUrl("yqbhd") - .withIsInDefaultSet(true))); - model = BinaryData.fromObject(model).toObject(EventTypesListResult.class); - Assertions.assertEquals("xyqvg", model.value().get(0).displayName()); - Assertions.assertEquals("aodetv", model.value().get(0).description()); - Assertions.assertEquals("kxdxuwsaifmcwn", model.value().get(0).schemaUrl()); + Assertions.assertEquals("qalsxkd", model.value().get(0).displayName()); + Assertions.assertEquals("qapfgsdpc", model.value().get(0).description()); + Assertions.assertEquals("ssmzhhkuui", model.value().get(0).schemaUrl()); Assertions.assertFalse(model.value().get(0).isInDefaultSet()); + Assertions.assertEquals("xhzzyse", model.nextLink()); } } 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 index ac5cb6c35c535..126ff926101b7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,17 +11,17 @@ public final class ExtendedLocationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtendedLocation model - = BinaryData.fromString("{\"name\":\"ulmdgglm\",\"type\":\"jpfseykg\"}").toObject(ExtendedLocation.class); - Assertions.assertEquals("ulmdgglm", model.name()); - Assertions.assertEquals("jpfseykg", model.type()); + ExtendedLocation model = BinaryData.fromString("{\"name\":\"smffjkutycyarnr\",\"type\":\"hguabzoghktdp\"}") + .toObject(ExtendedLocation.class); + Assertions.assertEquals("smffjkutycyarnr", model.name()); + Assertions.assertEquals("hguabzoghktdp", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withName("ulmdgglm").withType("jpfseykg"); + ExtendedLocation model = new ExtendedLocation().withName("smffjkutycyarnr").withType("hguabzoghktdp"); model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("ulmdgglm", model.name()); - Assertions.assertEquals("jpfseykg", model.type()); + Assertions.assertEquals("smffjkutycyarnr", model.name()); + Assertions.assertEquals("hguabzoghktdp", 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 index 543645aaa6e34..402da0a6e9dfd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,18 +12,9 @@ public final class ExtensionTopicInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionTopicInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"icdsiwd\",\"systemTopic\":\"mpzhzzwvywrgyngy\"},\"id\":\"rpxncaki\",\"name\":\"aondjrkclamgg\",\"type\":\"vlmfej\"}") + "{\"properties\":{\"description\":\"excgjokjljnhvl\",\"systemTopic\":\"bekpeeksnbksdqhj\"},\"id\":\"klxesl\",\"name\":\"hhus\",\"type\":\"cpoq\"}") .toObject(ExtensionTopicInner.class); - Assertions.assertEquals("icdsiwd", model.description()); - Assertions.assertEquals("mpzhzzwvywrgyngy", model.systemTopic()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionTopicInner model - = new ExtensionTopicInner().withDescription("icdsiwd").withSystemTopic("mpzhzzwvywrgyngy"); - model = BinaryData.fromObject(model).toObject(ExtensionTopicInner.class); - Assertions.assertEquals("icdsiwd", model.description()); - Assertions.assertEquals("mpzhzzwvywrgyngy", model.systemTopic()); + Assertions.assertEquals("excgjokjljnhvl", model.description()); + Assertions.assertEquals("bekpeeksnbksdqhj", 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 index 7e02a127b895c..d6e67d762c228 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,18 +12,9 @@ public final class ExtensionTopicPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionTopicProperties model - = BinaryData.fromString("{\"description\":\"qey\",\"systemTopic\":\"ltygxhqfgqkayej\"}") + = BinaryData.fromString("{\"description\":\"vnwqjwgo\",\"systemTopic\":\"lejjjkxy\"}") .toObject(ExtensionTopicProperties.class); - Assertions.assertEquals("qey", model.description()); - Assertions.assertEquals("ltygxhqfgqkayej", model.systemTopic()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionTopicProperties model - = new ExtensionTopicProperties().withDescription("qey").withSystemTopic("ltygxhqfgqkayej"); - model = BinaryData.fromObject(model).toObject(ExtensionTopicProperties.class); - Assertions.assertEquals("qey", model.description()); - Assertions.assertEquals("ltygxhqfgqkayej", model.systemTopic()); + Assertions.assertEquals("vnwqjwgo", model.description()); + Assertions.assertEquals("lejjjkxy", 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 index 158ca2735979f..e2205f14b4cc8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class ExtensionTopicsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"pakbqyhlsor\",\"systemTopic\":\"b\"},\"id\":\"qagkncjmybn\",\"name\":\"evztnjawrhul\",\"type\":\"mmqmbwppx\"}"; + = "{\"properties\":{\"description\":\"zgbjbhrpgi\",\"systemTopic\":\"ttcucrcm\"},\"id\":\"ixpqj\",\"name\":\"wifhbksldttohq\",\"type\":\"lna\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExtensionTopic response - = manager.extensionTopics().getWithResponse("oswgfqvj", com.azure.core.util.Context.NONE).getValue(); + = manager.extensionTopics().getWithResponse("yalhtgm", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("pakbqyhlsor", response.description()); - Assertions.assertEquals("b", response.systemTopic()); + Assertions.assertEquals("zgbjbhrpgi", response.description()); + Assertions.assertEquals("ttcucrcm", response.systemTopic()); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/FederatedIdentityCredentialInfoTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/FederatedIdentityCredentialInfoTests.java index 5d5a8bfb89d2d..55217a64d712f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/FederatedIdentityCredentialInfoTests.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/FederatedIdentityCredentialInfoTests.java @@ -1,28 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.eventgrid.models.FederatedIdentityCredentialInfo; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class FederatedIdentityCredentialInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FederatedIdentityCredentialInfo model - = BinaryData.fromString("{\"federatedClientId\":\"6f52ca65-07ba-4fae-a8dc-ffec1434059e\"}") - .toObject(FederatedIdentityCredentialInfo.class); - Assertions.assertEquals(UUID.fromString("6f52ca65-07ba-4fae-a8dc-ffec1434059e"), model.federatedClientId()); + = BinaryData.fromString("{\"federatedClientId\":\"es\"}").toObject(FederatedIdentityCredentialInfo.class); + Assertions.assertEquals("es", model.federatedClientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FederatedIdentityCredentialInfo model = new FederatedIdentityCredentialInfo() - .withFederatedClientId(UUID.fromString("6f52ca65-07ba-4fae-a8dc-ffec1434059e")); + FederatedIdentityCredentialInfo model = new FederatedIdentityCredentialInfo().withFederatedClientId("es"); model = BinaryData.fromObject(model).toObject(FederatedIdentityCredentialInfo.class); - Assertions.assertEquals(UUID.fromString("6f52ca65-07ba-4fae-a8dc-ffec1434059e"), model.federatedClientId()); + Assertions.assertEquals("es", model.federatedClientId()); } } 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 index d12961fa939c3..a10519c2695c4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,21 +14,22 @@ public final class HybridConnectionEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HybridConnectionEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"nq\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"wbsfpyxxtjlfl\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ominxojjlu\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dhilzzdzz\"}]}") + "{\"resourceId\":\"rkenx\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"efrp\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dnqqskawaoqvmmb\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"qfr\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"lkzmegnitgvkxl\"}]}") .toObject(HybridConnectionEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("nq", model.resourceId()); - Assertions.assertEquals("wbsfpyxxtjlfl", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("rkenx", model.resourceId()); + Assertions.assertEquals("efrp", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { HybridConnectionEventSubscriptionDestinationProperties model - = new HybridConnectionEventSubscriptionDestinationProperties().withResourceId("nq") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("wbsfpyxxtjlfl"), - new DeliveryAttributeMapping().withName("ominxojjlu"), - new DeliveryAttributeMapping().withName("dhilzzdzz"))); + = new HybridConnectionEventSubscriptionDestinationProperties().withResourceId("rkenx") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("efrp"), + new DeliveryAttributeMapping().withName("dnqqskawaoqvmmb"), + new DeliveryAttributeMapping().withName("qfr"), + new DeliveryAttributeMapping().withName("lkzmegnitgvkxl"))); model = BinaryData.fromObject(model).toObject(HybridConnectionEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("nq", model.resourceId()); - Assertions.assertEquals("wbsfpyxxtjlfl", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("rkenx", model.resourceId()); + Assertions.assertEquals("efrp", 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 index bd927bfef5c44..99901e0607cbc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,22 +14,20 @@ public final class HybridConnectionEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HybridConnectionEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"HybridConnection\",\"properties\":{\"resourceId\":\"uezayov\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"lotokh\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"wtaznkcqw\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"wjyofgwhnkbtl\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"jssmctsnldkpwo\"}]}}") + "{\"endpointType\":\"HybridConnection\",\"properties\":{\"resourceId\":\"zunbixx\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"vcpwpgclrc\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"tso\"}]}}") .toObject(HybridConnectionEventSubscriptionDestination.class); - Assertions.assertEquals("uezayov", model.resourceId()); - Assertions.assertEquals("lotokh", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("zunbixx", model.resourceId()); + Assertions.assertEquals("vcpwpgclrc", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { HybridConnectionEventSubscriptionDestination model - = new HybridConnectionEventSubscriptionDestination().withResourceId("uezayov") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("lotokh"), - new DeliveryAttributeMapping().withName("wtaznkcqw"), - new DeliveryAttributeMapping().withName("wjyofgwhnkbtl"), - new DeliveryAttributeMapping().withName("jssmctsnldkpwo"))); + = new HybridConnectionEventSubscriptionDestination().withResourceId("zunbixx") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("vcpwpgclrc"), + new DeliveryAttributeMapping().withName("tso"))); model = BinaryData.fromObject(model).toObject(HybridConnectionEventSubscriptionDestination.class); - Assertions.assertEquals("uezayov", model.resourceId()); - Assertions.assertEquals("lotokh", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("zunbixx", model.resourceId()); + Assertions.assertEquals("vcpwpgclrc", 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 index bbb19bf8f848f..f27ca1e1dbfc1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,29 +16,30 @@ 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\"}}}") + "{\"type\":\"SystemAssigned\",\"principalId\":\"qwxrjfeallnw\",\"tenantId\":\"bisnja\",\"userAssignedIdentities\":{\"njeaseipheofloke\":{\"principalId\":\"gnzscxaqwo\",\"clientId\":\"hcbonqvpkvlr\"},\"e\":{\"principalId\":\"ienjbdlwtgr\",\"clientId\":\"djpjumasxazjpq\"},\"jzzvdud\":{\"principalId\":\"alhbx\",\"clientId\":\"e\"}}}") .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()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals("qwxrjfeallnw", model.principalId()); + Assertions.assertEquals("bisnja", model.tenantId()); + Assertions.assertEquals("gnzscxaqwo", model.userAssignedIdentities().get("njeaseipheofloke").principalId()); + Assertions.assertEquals("hcbonqvpkvlr", model.userAssignedIdentities().get("njeaseipheofloke").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"))); + IdentityInfo model = new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) + .withPrincipalId("qwxrjfeallnw") + .withTenantId("bisnja") + .withUserAssignedIdentities(mapOf("njeaseipheofloke", + new UserIdentityProperties().withPrincipalId("gnzscxaqwo").withClientId("hcbonqvpkvlr"), "e", + new UserIdentityProperties().withPrincipalId("ienjbdlwtgr").withClientId("djpjumasxazjpq"), "jzzvdud", + new UserIdentityProperties().withPrincipalId("alhbx").withClientId("e"))); 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()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals("qwxrjfeallnw", model.principalId()); + Assertions.assertEquals("bisnja", model.tenantId()); + Assertions.assertEquals("gnzscxaqwo", model.userAssignedIdentities().get("njeaseipheofloke").principalId()); + Assertions.assertEquals("hcbonqvpkvlr", model.userAssignedIdentities().get("njeaseipheofloke").clientId()); } // Use "Map.of" if available 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 index 637099a9ccf8a..add11b4d26744 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,17 +12,17 @@ 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()); + InboundIpRule model + = BinaryData.fromString("{\"ipMask\":\"cfionl\",\"action\":\"Allow\"}").toObject(InboundIpRule.class); + Assertions.assertEquals("cfionl", 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); + InboundIpRule model = new InboundIpRule().withIpMask("cfionl").withAction(IpActionType.ALLOW); model = BinaryData.fromObject(model).toObject(InboundIpRule.class); - Assertions.assertEquals("mtsavjcbpwxqp", model.ipMask()); + Assertions.assertEquals("cfionl", 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 index f0d31f282c1b3..7c5d005662762 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,24 +12,24 @@ 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\"}") + "{\"description\":\"pzfqrhhuaoppp\",\"displayName\":\"eqx\",\"documentationUrl\":\"z\",\"dataSchemaUrl\":\"hzxct\"}") .toObject(InlineEventProperties.class); - Assertions.assertEquals("cukjf", model.description()); - Assertions.assertEquals("iawxklry", model.displayName()); - Assertions.assertEquals("wckbasyypnd", model.documentationUrl()); - Assertions.assertEquals("sgcbac", model.dataSchemaUrl()); + Assertions.assertEquals("pzfqrhhuaoppp", model.description()); + Assertions.assertEquals("eqx", model.displayName()); + Assertions.assertEquals("z", model.documentationUrl()); + Assertions.assertEquals("hzxct", model.dataSchemaUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InlineEventProperties model = new InlineEventProperties().withDescription("cukjf") - .withDisplayName("iawxklry") - .withDocumentationUrl("wckbasyypnd") - .withDataSchemaUrl("sgcbac"); + InlineEventProperties model = new InlineEventProperties().withDescription("pzfqrhhuaoppp") + .withDisplayName("eqx") + .withDocumentationUrl("z") + .withDataSchemaUrl("hzxct"); 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()); + Assertions.assertEquals("pzfqrhhuaoppp", model.description()); + Assertions.assertEquals("eqx", model.displayName()); + Assertions.assertEquals("z", model.documentationUrl()); + Assertions.assertEquals("hzxct", 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 index 7623b07fc65d1..86fc5b514dec9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; 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 index 527254dfddfc6..14234920fcdd1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,22 +14,22 @@ public final class IssuerCertificateInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IssuerCertificateInfo model = BinaryData.fromString( - "{\"certificateUrl\":\"stotxh\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"bypel\"}}") + "{\"certificateUrl\":\"a\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"ayvvtpgvdf\"}}") .toObject(IssuerCertificateInfo.class); - Assertions.assertEquals("stotxh", model.certificateUrl()); - Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bypel", model.identity().userAssignedIdentity()); + Assertions.assertEquals("a", model.certificateUrl()); + Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("ayvvtpgvdf", model.identity().userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IssuerCertificateInfo model = new IssuerCertificateInfo().withCertificateUrl("stotxh") + IssuerCertificateInfo model = new IssuerCertificateInfo().withCertificateUrl("a") .withIdentity(new CustomJwtAuthenticationManagedIdentity() - .withType(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("bypel")); + .withType(CustomJwtAuthenticationManagedIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentity("ayvvtpgvdf")); model = BinaryData.fromObject(model).toObject(IssuerCertificateInfo.class); - Assertions.assertEquals("stotxh", model.certificateUrl()); - Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bypel", model.identity().userAssignedIdentity()); + Assertions.assertEquals("a", model.certificateUrl()); + Assertions.assertEquals(CustomJwtAuthenticationManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("ayvvtpgvdf", 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 index ba91c96169b07..e56ac5b3e35ef 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,14 +11,14 @@ public final class JsonFieldTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - JsonField model = BinaryData.fromString("{\"sourceField\":\"hsidsjtdlpbnin\"}").toObject(JsonField.class); - Assertions.assertEquals("hsidsjtdlpbnin", model.sourceField()); + JsonField model = BinaryData.fromString("{\"sourceField\":\"dyg\"}").toObject(JsonField.class); + Assertions.assertEquals("dyg", model.sourceField()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JsonField model = new JsonField().withSourceField("hsidsjtdlpbnin"); + JsonField model = new JsonField().withSourceField("dyg"); model = BinaryData.fromObject(model).toObject(JsonField.class); - Assertions.assertEquals("hsidsjtdlpbnin", model.sourceField()); + Assertions.assertEquals("dyg", 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 index c3d601d5f58f5..43a14724e9752 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,19 +11,17 @@ public final class JsonFieldWithDefaultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - JsonFieldWithDefault model - = BinaryData.fromString("{\"sourceField\":\"azlsvbzfcpuo\",\"defaultValue\":\"dwjcciklhs\"}") - .toObject(JsonFieldWithDefault.class); - Assertions.assertEquals("azlsvbzfcpuo", model.sourceField()); - Assertions.assertEquals("dwjcciklhs", model.defaultValue()); + JsonFieldWithDefault model = BinaryData.fromString("{\"sourceField\":\"okkqfqjbvleo\",\"defaultValue\":\"ml\"}") + .toObject(JsonFieldWithDefault.class); + Assertions.assertEquals("okkqfqjbvleo", model.sourceField()); + Assertions.assertEquals("ml", model.defaultValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JsonFieldWithDefault model - = new JsonFieldWithDefault().withSourceField("azlsvbzfcpuo").withDefaultValue("dwjcciklhs"); + JsonFieldWithDefault model = new JsonFieldWithDefault().withSourceField("okkqfqjbvleo").withDefaultValue("ml"); model = BinaryData.fromObject(model).toObject(JsonFieldWithDefault.class); - Assertions.assertEquals("azlsvbzfcpuo", model.sourceField()); - Assertions.assertEquals("dwjcciklhs", model.defaultValue()); + Assertions.assertEquals("okkqfqjbvleo", model.sourceField()); + Assertions.assertEquals("ml", 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 index 0d813228242f1..f1efea2f75f28 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,38 +14,38 @@ public final class JsonInputSchemaMappingPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JsonInputSchemaMappingProperties model = BinaryData.fromString( - "{\"id\":{\"sourceField\":\"wenawwam\"},\"topic\":{\"sourceField\":\"eq\"},\"eventTime\":{\"sourceField\":\"lndh\"},\"eventType\":{\"sourceField\":\"eojhtollhsvi\",\"defaultValue\":\"ytz\"},\"subject\":{\"sourceField\":\"lxpnovyoanf\",\"defaultValue\":\"swqagywvtxigvjrk\"},\"dataVersion\":{\"sourceField\":\"aeukyawohpm\",\"defaultValue\":\"qnucs\"}}") + "{\"id\":{\"sourceField\":\"tbaxk\"},\"topic\":{\"sourceField\":\"wrck\"},\"eventTime\":{\"sourceField\":\"lyhpluodpvruud\"},\"eventType\":{\"sourceField\":\"ibthostgktstvd\",\"defaultValue\":\"clzedqbcvh\"},\"subject\":{\"sourceField\":\"plodqkdlwwqfbu\",\"defaultValue\":\"kxtrq\"},\"dataVersion\":{\"sourceField\":\"mlmbtxhwgfwsrta\",\"defaultValue\":\"oezbrhubsk\"}}") .toObject(JsonInputSchemaMappingProperties.class); - Assertions.assertEquals("wenawwam", model.id().sourceField()); - Assertions.assertEquals("eq", model.topic().sourceField()); - Assertions.assertEquals("lndh", model.eventTime().sourceField()); - Assertions.assertEquals("eojhtollhsvi", model.eventType().sourceField()); - Assertions.assertEquals("ytz", model.eventType().defaultValue()); - Assertions.assertEquals("lxpnovyoanf", model.subject().sourceField()); - Assertions.assertEquals("swqagywvtxigvjrk", model.subject().defaultValue()); - Assertions.assertEquals("aeukyawohpm", model.dataVersion().sourceField()); - Assertions.assertEquals("qnucs", model.dataVersion().defaultValue()); + Assertions.assertEquals("tbaxk", model.id().sourceField()); + Assertions.assertEquals("wrck", model.topic().sourceField()); + Assertions.assertEquals("lyhpluodpvruud", model.eventTime().sourceField()); + Assertions.assertEquals("ibthostgktstvd", model.eventType().sourceField()); + Assertions.assertEquals("clzedqbcvh", model.eventType().defaultValue()); + Assertions.assertEquals("plodqkdlwwqfbu", model.subject().sourceField()); + Assertions.assertEquals("kxtrq", model.subject().defaultValue()); + Assertions.assertEquals("mlmbtxhwgfwsrta", model.dataVersion().sourceField()); + Assertions.assertEquals("oezbrhubsk", model.dataVersion().defaultValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JsonInputSchemaMappingProperties model - = new JsonInputSchemaMappingProperties().withId(new JsonField().withSourceField("wenawwam")) - .withTopic(new JsonField().withSourceField("eq")) - .withEventTime(new JsonField().withSourceField("lndh")) - .withEventType(new JsonFieldWithDefault().withSourceField("eojhtollhsvi").withDefaultValue("ytz")) - .withSubject( - new JsonFieldWithDefault().withSourceField("lxpnovyoanf").withDefaultValue("swqagywvtxigvjrk")) - .withDataVersion(new JsonFieldWithDefault().withSourceField("aeukyawohpm").withDefaultValue("qnucs")); + JsonInputSchemaMappingProperties model = new JsonInputSchemaMappingProperties() + .withId(new JsonField().withSourceField("tbaxk")) + .withTopic(new JsonField().withSourceField("wrck")) + .withEventTime(new JsonField().withSourceField("lyhpluodpvruud")) + .withEventType(new JsonFieldWithDefault().withSourceField("ibthostgktstvd").withDefaultValue("clzedqbcvh")) + .withSubject(new JsonFieldWithDefault().withSourceField("plodqkdlwwqfbu").withDefaultValue("kxtrq")) + .withDataVersion( + new JsonFieldWithDefault().withSourceField("mlmbtxhwgfwsrta").withDefaultValue("oezbrhubsk")); model = BinaryData.fromObject(model).toObject(JsonInputSchemaMappingProperties.class); - Assertions.assertEquals("wenawwam", model.id().sourceField()); - Assertions.assertEquals("eq", model.topic().sourceField()); - Assertions.assertEquals("lndh", model.eventTime().sourceField()); - Assertions.assertEquals("eojhtollhsvi", model.eventType().sourceField()); - Assertions.assertEquals("ytz", model.eventType().defaultValue()); - Assertions.assertEquals("lxpnovyoanf", model.subject().sourceField()); - Assertions.assertEquals("swqagywvtxigvjrk", model.subject().defaultValue()); - Assertions.assertEquals("aeukyawohpm", model.dataVersion().sourceField()); - Assertions.assertEquals("qnucs", model.dataVersion().defaultValue()); + Assertions.assertEquals("tbaxk", model.id().sourceField()); + Assertions.assertEquals("wrck", model.topic().sourceField()); + Assertions.assertEquals("lyhpluodpvruud", model.eventTime().sourceField()); + Assertions.assertEquals("ibthostgktstvd", model.eventType().sourceField()); + Assertions.assertEquals("clzedqbcvh", model.eventType().defaultValue()); + Assertions.assertEquals("plodqkdlwwqfbu", model.subject().sourceField()); + Assertions.assertEquals("kxtrq", model.subject().defaultValue()); + Assertions.assertEquals("mlmbtxhwgfwsrta", model.dataVersion().sourceField()); + Assertions.assertEquals("oezbrhubsk", 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 index 94d0508e94139..6fce61362fcf4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,36 +14,36 @@ public final class JsonInputSchemaMappingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JsonInputSchemaMapping model = BinaryData.fromString( - "{\"inputSchemaMappingType\":\"Json\",\"properties\":{\"id\":{\"sourceField\":\"drenxol\"},\"topic\":{\"sourceField\":\"ehqbeivdlhydwbdb\"},\"eventTime\":{\"sourceField\":\"lpu\"},\"eventType\":{\"sourceField\":\"jlkesmmpath\",\"defaultValue\":\"ta\"},\"subject\":{\"sourceField\":\"an\",\"defaultValue\":\"wllbv\"},\"dataVersion\":{\"sourceField\":\"sfftedousnktjtgr\",\"defaultValue\":\"aqo\"}}}") + "{\"inputSchemaMappingType\":\"Json\",\"properties\":{\"id\":{\"sourceField\":\"znxcvds\"},\"topic\":{\"sourceField\":\"jivolvtnov\"},\"eventTime\":{\"sourceField\":\"gemjdftuljltdu\"},\"eventType\":{\"sourceField\":\"mtmczuome\",\"defaultValue\":\"cwwqiokn\"},\"subject\":{\"sourceField\":\"mojmsvpkjprvkw\",\"defaultValue\":\"zqljyxgtczh\"},\"dataVersion\":{\"sourceField\":\"bsdshmkxmaehvbbx\",\"defaultValue\":\"iplt\"}}}") .toObject(JsonInputSchemaMapping.class); - Assertions.assertEquals("drenxol", model.id().sourceField()); - Assertions.assertEquals("ehqbeivdlhydwbdb", model.topic().sourceField()); - Assertions.assertEquals("lpu", model.eventTime().sourceField()); - Assertions.assertEquals("jlkesmmpath", model.eventType().sourceField()); - Assertions.assertEquals("ta", model.eventType().defaultValue()); - Assertions.assertEquals("an", model.subject().sourceField()); - Assertions.assertEquals("wllbv", model.subject().defaultValue()); - Assertions.assertEquals("sfftedousnktjtgr", model.dataVersion().sourceField()); - Assertions.assertEquals("aqo", model.dataVersion().defaultValue()); + Assertions.assertEquals("znxcvds", model.id().sourceField()); + Assertions.assertEquals("jivolvtnov", model.topic().sourceField()); + Assertions.assertEquals("gemjdftuljltdu", model.eventTime().sourceField()); + Assertions.assertEquals("mtmczuome", model.eventType().sourceField()); + Assertions.assertEquals("cwwqiokn", model.eventType().defaultValue()); + Assertions.assertEquals("mojmsvpkjprvkw", model.subject().sourceField()); + Assertions.assertEquals("zqljyxgtczh", model.subject().defaultValue()); + Assertions.assertEquals("bsdshmkxmaehvbbx", model.dataVersion().sourceField()); + Assertions.assertEquals("iplt", model.dataVersion().defaultValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JsonInputSchemaMapping model = new JsonInputSchemaMapping().withId(new JsonField().withSourceField("drenxol")) - .withTopic(new JsonField().withSourceField("ehqbeivdlhydwbdb")) - .withEventTime(new JsonField().withSourceField("lpu")) - .withEventType(new JsonFieldWithDefault().withSourceField("jlkesmmpath").withDefaultValue("ta")) - .withSubject(new JsonFieldWithDefault().withSourceField("an").withDefaultValue("wllbv")) - .withDataVersion(new JsonFieldWithDefault().withSourceField("sfftedousnktjtgr").withDefaultValue("aqo")); + JsonInputSchemaMapping model = new JsonInputSchemaMapping().withId(new JsonField().withSourceField("znxcvds")) + .withTopic(new JsonField().withSourceField("jivolvtnov")) + .withEventTime(new JsonField().withSourceField("gemjdftuljltdu")) + .withEventType(new JsonFieldWithDefault().withSourceField("mtmczuome").withDefaultValue("cwwqiokn")) + .withSubject(new JsonFieldWithDefault().withSourceField("mojmsvpkjprvkw").withDefaultValue("zqljyxgtczh")) + .withDataVersion(new JsonFieldWithDefault().withSourceField("bsdshmkxmaehvbbx").withDefaultValue("iplt")); model = BinaryData.fromObject(model).toObject(JsonInputSchemaMapping.class); - Assertions.assertEquals("drenxol", model.id().sourceField()); - Assertions.assertEquals("ehqbeivdlhydwbdb", model.topic().sourceField()); - Assertions.assertEquals("lpu", model.eventTime().sourceField()); - Assertions.assertEquals("jlkesmmpath", model.eventType().sourceField()); - Assertions.assertEquals("ta", model.eventType().defaultValue()); - Assertions.assertEquals("an", model.subject().sourceField()); - Assertions.assertEquals("wllbv", model.subject().defaultValue()); - Assertions.assertEquals("sfftedousnktjtgr", model.dataVersion().sourceField()); - Assertions.assertEquals("aqo", model.dataVersion().defaultValue()); + Assertions.assertEquals("znxcvds", model.id().sourceField()); + Assertions.assertEquals("jivolvtnov", model.topic().sourceField()); + Assertions.assertEquals("gemjdftuljltdu", model.eventTime().sourceField()); + Assertions.assertEquals("mtmczuome", model.eventType().sourceField()); + Assertions.assertEquals("cwwqiokn", model.eventType().defaultValue()); + Assertions.assertEquals("mojmsvpkjprvkw", model.subject().sourceField()); + Assertions.assertEquals("zqljyxgtczh", model.subject().defaultValue()); + Assertions.assertEquals("bsdshmkxmaehvbbx", model.dataVersion().sourceField()); + Assertions.assertEquals("iplt", model.dataVersion().defaultValue()); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/KeyEncryptionKeyIdentityTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/KeyEncryptionKeyIdentityTests.java new file mode 100644 index 0000000000000..1d9538feee89a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/KeyEncryptionKeyIdentityTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionIdentityType; +import com.azure.resourcemanager.eventgrid.models.KeyEncryptionKeyIdentity; +import org.junit.jupiter.api.Assertions; + +public final class KeyEncryptionKeyIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KeyEncryptionKeyIdentity model + = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentityResourceId\":\"bxubmdna\"}") + .toObject(KeyEncryptionKeyIdentity.class); + Assertions.assertEquals(KeyEncryptionIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals("bxubmdna", model.userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + KeyEncryptionKeyIdentity model + = new KeyEncryptionKeyIdentity().withType(KeyEncryptionIdentityType.USER_ASSIGNED) + .withUserAssignedIdentityResourceId("bxubmdna"); + model = BinaryData.fromObject(model).toObject(KeyEncryptionKeyIdentity.class); + Assertions.assertEquals(KeyEncryptionIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals("bxubmdna", model.userAssignedIdentityResourceId()); + } +} 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 index f412bdf087abb..7b48ae01bd5d1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,23 +13,23 @@ public final class MonitorAlertEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MonitorAlertEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"severity\":\"Sev2\",\"description\":\"ye\",\"actionGroups\":[\"unaucm\",\"irtneemmjau\",\"cgxefnohaitraniz\"]}") + MonitorAlertEventSubscriptionDestinationProperties model = BinaryData + .fromString("{\"severity\":\"Sev3\",\"description\":\"wddji\",\"actionGroups\":[\"xvititvtz\"]}") .toObject(MonitorAlertEventSubscriptionDestinationProperties.class); - Assertions.assertEquals(MonitorAlertSeverity.SEV2, model.severity()); - Assertions.assertEquals("ye", model.description()); - Assertions.assertEquals("unaucm", model.actionGroups().get(0)); + Assertions.assertEquals(MonitorAlertSeverity.SEV3, model.severity()); + Assertions.assertEquals("wddji", model.description()); + Assertions.assertEquals("xvititvtz", model.actionGroups().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitorAlertEventSubscriptionDestinationProperties model - = new MonitorAlertEventSubscriptionDestinationProperties().withSeverity(MonitorAlertSeverity.SEV2) - .withDescription("ye") - .withActionGroups(Arrays.asList("unaucm", "irtneemmjau", "cgxefnohaitraniz")); + = new MonitorAlertEventSubscriptionDestinationProperties().withSeverity(MonitorAlertSeverity.SEV3) + .withDescription("wddji") + .withActionGroups(Arrays.asList("xvititvtz")); model = BinaryData.fromObject(model).toObject(MonitorAlertEventSubscriptionDestinationProperties.class); - Assertions.assertEquals(MonitorAlertSeverity.SEV2, model.severity()); - Assertions.assertEquals("ye", model.description()); - Assertions.assertEquals("unaucm", model.actionGroups().get(0)); + Assertions.assertEquals(MonitorAlertSeverity.SEV3, model.severity()); + Assertions.assertEquals("wddji", model.description()); + Assertions.assertEquals("xvititvtz", 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 index 6fa492b52037e..e853e9ccb0397 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,22 +14,22 @@ public final class MonitorAlertEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitorAlertEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"MonitorAlert\",\"properties\":{\"severity\":\"Sev4\",\"description\":\"dasmxu\",\"actionGroups\":[\"bngfcocefhpri\",\"lfmpztr\",\"ud\"]}}") + "{\"endpointType\":\"MonitorAlert\",\"properties\":{\"severity\":\"Sev4\",\"description\":\"refdee\",\"actionGroups\":[\"cuijpxt\",\"s\",\"wprtu\"]}}") .toObject(MonitorAlertEventSubscriptionDestination.class); Assertions.assertEquals(MonitorAlertSeverity.SEV4, model.severity()); - Assertions.assertEquals("dasmxu", model.description()); - Assertions.assertEquals("bngfcocefhpri", model.actionGroups().get(0)); + Assertions.assertEquals("refdee", model.description()); + Assertions.assertEquals("cuijpxt", model.actionGroups().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitorAlertEventSubscriptionDestination model = new MonitorAlertEventSubscriptionDestination().withSeverity(MonitorAlertSeverity.SEV4) - .withDescription("dasmxu") - .withActionGroups(Arrays.asList("bngfcocefhpri", "lfmpztr", "ud")); + .withDescription("refdee") + .withActionGroups(Arrays.asList("cuijpxt", "s", "wprtu")); model = BinaryData.fromObject(model).toObject(MonitorAlertEventSubscriptionDestination.class); Assertions.assertEquals(MonitorAlertSeverity.SEV4, model.severity()); - Assertions.assertEquals("dasmxu", model.description()); - Assertions.assertEquals("bngfcocefhpri", model.actionGroups().get(0)); + Assertions.assertEquals("refdee", model.description()); + Assertions.assertEquals("cuijpxt", 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 index 7c51eac7cd8b9..73d52a801acae 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,16 +13,16 @@ public final class NamespaceSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceSku model - = BinaryData.fromString("{\"name\":\"Standard\",\"capacity\":916840280}").toObject(NamespaceSku.class); + = BinaryData.fromString("{\"name\":\"Standard\",\"capacity\":1901976575}").toObject(NamespaceSku.class); Assertions.assertEquals(SkuName.STANDARD, model.name()); - Assertions.assertEquals(916840280, model.capacity()); + Assertions.assertEquals(1901976575, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceSku model = new NamespaceSku().withName(SkuName.STANDARD).withCapacity(916840280); + NamespaceSku model = new NamespaceSku().withName(SkuName.STANDARD).withCapacity(1901976575); model = BinaryData.fromObject(model).toObject(NamespaceSku.class); Assertions.assertEquals(SkuName.STANDARD, model.name()); - Assertions.assertEquals(916840280, model.capacity()); + Assertions.assertEquals(1901976575, 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 index 97ed54c914545..c02dc28b8ff5f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,16 +11,16 @@ public final class NamespaceTopicEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NamespaceTopicEventSubscriptionDestinationProperties model = BinaryData.fromString("{\"resourceId\":\"hlcdc\"}") + NamespaceTopicEventSubscriptionDestinationProperties model = BinaryData.fromString("{\"resourceId\":\"cd\"}") .toObject(NamespaceTopicEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("hlcdc", model.resourceId()); + Assertions.assertEquals("cd", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NamespaceTopicEventSubscriptionDestinationProperties model - = new NamespaceTopicEventSubscriptionDestinationProperties().withResourceId("hlcdc"); + = new NamespaceTopicEventSubscriptionDestinationProperties().withResourceId("cd"); model = BinaryData.fromObject(model).toObject(NamespaceTopicEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("hlcdc", model.resourceId()); + Assertions.assertEquals("cd", 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 index f947be796757f..44dfc2828e605 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,16 +12,16 @@ public final class NamespaceTopicEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceTopicEventSubscriptionDestination model - = BinaryData.fromString("{\"endpointType\":\"NamespaceTopic\",\"properties\":{\"resourceId\":\"egpqtmo\"}}") + = BinaryData.fromString("{\"endpointType\":\"NamespaceTopic\",\"properties\":{\"resourceId\":\"avoxtfg\"}}") .toObject(NamespaceTopicEventSubscriptionDestination.class); - Assertions.assertEquals("egpqtmo", model.resourceId()); + Assertions.assertEquals("avoxtfg", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NamespaceTopicEventSubscriptionDestination model - = new NamespaceTopicEventSubscriptionDestination().withResourceId("egpqtmo"); + = new NamespaceTopicEventSubscriptionDestination().withResourceId("avoxtfg"); model = BinaryData.fromObject(model).toObject(NamespaceTopicEventSubscriptionDestination.class); - Assertions.assertEquals("egpqtmo", model.resourceId()); + Assertions.assertEquals("avoxtfg", 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 index b3639b91d44d5..a9f28392e9a91 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.namespaceTopicEventSubscriptions() - .delete("c", "uzfwo", "wakukzkdtzxs", "ednlwglihezo", com.azure.core.util.Context.NONE); + .delete("xmlitqdsjip", "viscot", "xbriifefn", "s", 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 index c887e28c74ed8..de38d87183734 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class NamespaceTopicEventSubscriptionsGetDeliveryAttributesWithResp @Test public void testGetDeliveryAttributesWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"k\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"yzmspamwbwmbnl\"}]}"; + = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xtrlqbpx\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"zkjp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetDeliveryAttributesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeliveryAttributeListResult response = manager.namespaceTopicEventSubscriptions() - .getDeliveryAttributesWithResponse("toxjdzj", "jznvhxqqmq", "paydhfn", "ocxm", + .getDeliveryAttributesWithResponse("uppiyxlzm", "yddeeqz", "vab", "hvsexduetbapf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("k", response.value().get(0).name()); + Assertions.assertEquals("xtrlqbpx", 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 index f0eec1409a5fd..0ab2d14bd5a93 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class NamespaceTopicEventSubscriptionsGetFullUrlWithResponseMockTests { @Test public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"adpcmhjhausy\"}"; + String responseStr = "{\"endpointUrl\":\"grunozfvualjthoi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testGetFullUrlWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubscriptionFullUrl response = manager.namespaceTopicEventSubscriptions() - .getFullUrlWithResponse("lcefiqdktw", "kvi", "lpfliwoyn", "uuzhw", com.azure.core.util.Context.NONE) + .getFullUrlWithResponse("rgzxvbc", "wh", "egbthm", "ritjbu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("adpcmhjhausy", response.endpointUrl()); + Assertions.assertEquals("grunozfvualjthoi", 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 index 9f562d4714569..b4255de9035ab 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,21 +14,21 @@ public final class NamespaceTopicInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceTopicInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1566032769},\"id\":\"vutpthjoxo\",\"name\":\"smsks\",\"type\":\"pi\"}") + "{\"properties\":{\"provisioningState\":\"Deleting\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":101589203},\"id\":\"sdbccxjmonfdgnwn\",\"name\":\"ypuuwwltvuqjctze\",\"type\":\"keifzzhmkdasv\"}") .toObject(NamespaceTopicInner.class); Assertions.assertEquals(PublisherType.CUSTOM, model.publisherType()); Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(1566032769, model.eventRetentionInDays()); + Assertions.assertEquals(101589203, 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(1566032769); + .withEventRetentionInDays(101589203); 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(1566032769, model.eventRetentionInDays()); + Assertions.assertEquals(101589203, 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 index 33b69721044a3..092eca11c5dd1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,21 +14,21 @@ public final class NamespaceTopicPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceTopicProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Updating\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1786870924}") + "{\"provisioningState\":\"Succeeded\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1487873625}") .toObject(NamespaceTopicProperties.class); Assertions.assertEquals(PublisherType.CUSTOM, model.publisherType()); Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(1786870924, model.eventRetentionInDays()); + Assertions.assertEquals(1487873625, 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(1786870924); + .withEventRetentionInDays(1487873625); 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(1786870924, model.eventRetentionInDays()); + Assertions.assertEquals(1487873625, 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 index 4c5a7276b93f2..33f352edb3492 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,16 +11,16 @@ public final class NamespaceTopicUpdateParameterPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NamespaceTopicUpdateParameterProperties model = BinaryData.fromString("{\"eventRetentionInDays\":255902242}") + NamespaceTopicUpdateParameterProperties model = BinaryData.fromString("{\"eventRetentionInDays\":972359949}") .toObject(NamespaceTopicUpdateParameterProperties.class); - Assertions.assertEquals(255902242, model.eventRetentionInDays()); + Assertions.assertEquals(972359949, model.eventRetentionInDays()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NamespaceTopicUpdateParameterProperties model - = new NamespaceTopicUpdateParameterProperties().withEventRetentionInDays(255902242); + = new NamespaceTopicUpdateParameterProperties().withEventRetentionInDays(972359949); model = BinaryData.fromObject(model).toObject(NamespaceTopicUpdateParameterProperties.class); - Assertions.assertEquals(255902242, model.eventRetentionInDays()); + Assertions.assertEquals(972359949, 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 index 91615d5f1013f..206d256eb9a01 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,15 +12,16 @@ public final class NamespaceTopicUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceTopicUpdateParameters model - = BinaryData.fromString("{\"properties\":{\"eventRetentionInDays\":601502455}}") + = BinaryData.fromString("{\"properties\":{\"eventRetentionInDays\":1481873943}}") .toObject(NamespaceTopicUpdateParameters.class); - Assertions.assertEquals(601502455, model.eventRetentionInDays()); + Assertions.assertEquals(1481873943, model.eventRetentionInDays()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceTopicUpdateParameters model = new NamespaceTopicUpdateParameters().withEventRetentionInDays(601502455); + NamespaceTopicUpdateParameters model + = new NamespaceTopicUpdateParameters().withEventRetentionInDays(1481873943); model = BinaryData.fromObject(model).toObject(NamespaceTopicUpdateParameters.class); - Assertions.assertEquals(601502455, model.eventRetentionInDays()); + Assertions.assertEquals(1481873943, 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 index b237eeafe21e2..85107782ae540 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -23,7 +23,7 @@ public final class NamespaceTopicsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":681962481},\"id\":\"dh\",\"name\":\"hojvlirkn\",\"type\":\"c\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1347263959},\"id\":\"snvlaqd\",\"name\":\"z\",\"type\":\"zawatuwqkokbc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NamespaceTopic response = manager.namespaceTopics() - .define("tzo") - .withExistingNamespace("mbbfnv", "x") + .define("azrhxudd") + .withExistingNamespace("yjmqrf", "iocuselqkr") .withPublisherType(PublisherType.CUSTOM) .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventRetentionInDays(355023173) + .withEventRetentionInDays(1971965910) .create(); Assertions.assertEquals(PublisherType.CUSTOM, response.publisherType()); Assertions.assertEquals(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0, response.inputSchema()); - Assertions.assertEquals(681962481, response.eventRetentionInDays()); + Assertions.assertEquals(1347263959, 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 index eed3dc9e5cff0..4be56d2b5f600 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.namespaceTopics().delete("nnohmmzngo", "fr", "uypwyiulaynos", com.azure.core.util.Context.NONE); + manager.namespaceTopics().delete("vuldbkkejjk", "igaw", "azmxjqi", 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 index bf1ecae2fb6ef..183641243a12e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -23,7 +23,7 @@ public final class NamespaceTopicsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":191717432},\"id\":\"ayqmarxneibpgbrh\",\"name\":\"jdqknhqn\",\"type\":\"otpu\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1580811749},\"id\":\"qdowkppnwyytfv\",\"name\":\"ct\",\"type\":\"jikffffgkuhznw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NamespaceTopic response = manager.namespaceTopics() - .getWithResponse("qbdqnasttuxvz", "q", "yopbtsixhgvb", com.azure.core.util.Context.NONE) + .getWithResponse("kvibfa", "gmat", "nzpducdaaktu", 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(191717432, response.eventRetentionInDays()); + Assertions.assertEquals(1580811749, 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 index 48299579300be..5fc8240ea03d8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -24,7 +24,7 @@ public final class NamespaceTopicsListByNamespaceMockTests { @Test public void testListByNamespace() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1802698962},\"id\":\"uarigrj\",\"name\":\"ljlkqhvk\",\"type\":\"bzkuastaxklpr\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":356055012},\"id\":\"zgfjzcvaaxoialah\",\"name\":\"xw\",\"type\":\"cokdxkukmkczyn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,10 +34,10 @@ public void testListByNamespace() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.namespaceTopics() - .listByNamespace("gkfh", "xttpfs", "wgsghqucumldd", 900543932, com.azure.core.util.Context.NONE); + .listByNamespace("h", "jjsbcmlzaahzbhur", "olk", 1062065188, 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(1802698962, response.iterator().next().eventRetentionInDays()); + Assertions.assertEquals(356055012, 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 index fc9354fa54e6f..6923136f2b0f2 100644 --- 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 @@ -1,46 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.NamespaceTopicsListResult; 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\":546640275},\"id\":\"l\",\"name\":\"w\",\"type\":\"youpfgfbkj\"},{\"properties\":{\"provisioningState\":\"UpdatedFailed\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":370188648},\"id\":\"sgow\",\"name\":\"fttsttk\",\"type\":\"lahb\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":1623568145},\"id\":\"itmmqtgqqqxh\",\"name\":\"n\",\"type\":\"rxcpjuisavo\"}],\"nextLink\":\"dzf\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"publisherType\":\"Custom\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"eventRetentionInDays\":821548341},\"id\":\"jlvizbfhfovva\",\"name\":\"qpbtuodxes\",\"type\":\"abbelawumuaslzk\"}],\"nextLink\":\"rwoycqucwyh\"}") .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(546640275, model.value().get(0).eventRetentionInDays()); - Assertions.assertEquals("dzf", 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(546640275), - new NamespaceTopicInner().withPublisherType(PublisherType.CUSTOM) - .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventRetentionInDays(370188648), - new NamespaceTopicInner().withPublisherType(PublisherType.CUSTOM) - .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withEventRetentionInDays(1623568145))) - .withNextLink("dzf"); - 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(546640275, model.value().get(0).eventRetentionInDays()); - Assertions.assertEquals("dzf", model.nextLink()); + Assertions.assertEquals(821548341, model.value().get(0).eventRetentionInDays()); + Assertions.assertEquals("rwoycqucwyh", 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 index 42aa75c310157..17f10f08cb9c9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.namespaces().delete("snaajph", "poejnglpwsa", com.azure.core.util.Context.NONE); + manager.namespaces().delete("wnosbzlehgcvkbck", "jolgjyyxpvels", 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 index d87da260c0fe0..ccad833909ba4 100644 --- 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 @@ -1,64 +1,46 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.NamespacesListResult; 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.CustomWebhookAuthenticationManagedIdentity; import com.azure.resourcemanager.eventgrid.models.CustomWebhookAuthenticationManagedIdentityType; -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.IpAddressType; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; -import com.azure.resourcemanager.eventgrid.models.RoutingEnrichments; -import com.azure.resourcemanager.eventgrid.models.RoutingIdentityInfo; import com.azure.resourcemanager.eventgrid.models.RoutingIdentityType; import com.azure.resourcemanager.eventgrid.models.SkuName; -import com.azure.resourcemanager.eventgrid.models.StaticRoutingEnrichment; import com.azure.resourcemanager.eventgrid.models.TlsVersion; -import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState; -import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; -import com.azure.resourcemanager.eventgrid.models.UserIdentityProperties; -import com.azure.resourcemanager.eventgrid.models.WebhookAuthenticationSettings; -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\":\"gz\",\"name\":\"ulucv\",\"type\":\"amrsreuzv\"},{\"properties\":{},\"id\":\"risjnhnytxifqjz\",\"name\":\"xmrhu\",\"type\":\"lw\"},{\"properties\":{},\"id\":\"esutrgjupauutpw\",\"name\":\"qhih\",\"type\":\"jqgwzp\"}],\"provisioningState\":\"Updating\",\"topicsConfiguration\":{\"hostname\":\"cypsxjv\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"mwks\"},{\"fullyQualifiedDomainName\":\"ircizjxvy\"},{\"fullyQualifiedDomainName\":\"fceacvlhvygd\"}]},\"topicSpacesConfiguration\":{\"state\":\"Enabled\",\"routeTopicResourceId\":\"rtwnawjslbi\",\"hostname\":\"ojgcyzt\",\"routingEnrichments\":{\"static\":[{\"valueType\":\"StaticRoutingEnrichment\"}],\"dynamic\":[{},{}]},\"clientAuthentication\":{\"alternativeAuthenticationNameSources\":[\"ClientCertificateUri\",\"ClientCertificateEmail\",\"ClientCertificateUri\",\"ClientCertificateUri\"],\"customJwtAuthentication\":{},\"webhookAuthentication\":{\"identity\":{\"type\":\"SystemAssigned\"},\"endpointUrl\":\"nrpxehuw\",\"azureActiveDirectoryApplicationIdOrUri\":\"ykqgaifmvik\",\"azureActiveDirectoryTenantId\":\"bydvkhbejdz\"}},\"maximumSessionExpiryInHours\":2140259102,\"maximumClientSessionsPerAuthenticationName\":2141010446,\"routingIdentityInfo\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"jivolvtnov\"},\"customDomains\":[{\"fullyQualifiedDomainName\":\"gemjdftuljltdu\"},{\"fullyQualifiedDomainName\":\"eamtmcz\"},{\"fullyQualifiedDomainName\":\"o\"},{\"fullyQualifiedDomainName\":\"ejwcwwqiok\"}]},\"isZoneRedundant\":false,\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"sv\",\"action\":\"Allow\"},{\"ipMask\":\"rvkwc\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.0\"},\"sku\":{\"name\":\"Standard\",\"capacity\":1494813827},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"dbsdshm\",\"tenantId\":\"maehvbbxurip\",\"userAssignedIdentities\":{\"wrck\":{\"principalId\":\"htba\",\"clientId\":\"gx\"},\"uudl\":{\"principalId\":\"kl\",\"clientId\":\"pluodpv\"},\"lhpl\":{\"principalId\":\"ibthostgktstvd\",\"clientId\":\"clzedqbcvh\"}}},\"location\":\"qkdlw\",\"tags\":{\"kxtrq\":\"bum\",\"rtawcoezb\":\"fsmlmbtxhwgfw\"},\"id\":\"hubskhudygooo\",\"name\":\"kqfqjbvl\",\"type\":\"orfmluiqt\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"yvnqqybaryeuay\",\"name\":\"kq\",\"type\":\"bqgzslesjcbhern\"},{\"properties\":{},\"id\":\"iew\",\"name\":\"jcvb\",\"type\":\"uwrbehwagoh\"},{\"properties\":{},\"id\":\"f\",\"name\":\"kmr\",\"type\":\"emvvhm\"}],\"provisioningState\":\"Updating\",\"topicsConfiguration\":{\"hostname\":\"futacoebjvewzc\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"m\"},{\"fullyQualifiedDomainName\":\"cpmguaadraufact\"}]},\"topicSpacesConfiguration\":{\"state\":\"Disabled\",\"routeTopicResourceId\":\"v\",\"hostname\":\"j\",\"routingEnrichments\":{\"static\":[{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"}],\"dynamic\":[{},{},{},{}]},\"clientAuthentication\":{\"alternativeAuthenticationNameSources\":[\"ClientCertificateEmail\",\"ClientCertificateDns\"],\"customJwtAuthentication\":{},\"webhookAuthentication\":{\"identity\":{\"type\":\"SystemAssigned\"},\"endpointUrl\":\"fgslqubkwdl\",\"azureActiveDirectoryApplicationIdOrUri\":\"nrdsutujbazpjuoh\",\"azureActiveDirectoryTenantId\":\"inyflnorwmduvwp\"}},\"maximumSessionExpiryInHours\":1862028450,\"maximumClientSessionsPerAuthenticationName\":156368674,\"routingIdentityInfo\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"xpgpq\"},\"customDomains\":[{\"fullyQualifiedDomainName\":\"sze\"}]},\"isZoneRedundant\":false,\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"gibbdaxc\",\"action\":\"Allow\"},{\"ipMask\":\"zauorsuk\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.0\"},\"sku\":{\"name\":\"Standard\",\"capacity\":2075854063},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"pzlrphw\",\"tenantId\":\"oldweyuqdu\",\"userAssignedIdentities\":{\"dnhxmsi\":{\"principalId\":\"nrwrbiork\",\"clientId\":\"lywjhh\"},\"ndieuzaofj\":{\"principalId\":\"omi\",\"clientId\":\"xggdufi\"}}},\"location\":\"vcyy\",\"tags\":{\"onmacjekniz\":\"gdotcubiipuipwo\"},\"id\":\"hqvcimpevfgmblr\",\"name\":\"ilbywdxsm\",\"type\":\"ccwr\"}],\"nextLink\":\"scjfnyns\"}") + "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"yokacspkw\",\"name\":\"hzdobpxjmflbvvnc\",\"type\":\"rkcciwwzjuqk\"}],\"provisioningState\":\"UpdatedFailed\",\"topicsConfiguration\":{\"hostname\":\"iwkuofos\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"sauuimj\"},{\"fullyQualifiedDomainName\":\"vxieduugidyj\"},{\"fullyQualifiedDomainName\":\"rfbyaosvexcso\"},{\"fullyQualifiedDomainName\":\"pclhocohslk\"}]},\"topicSpacesConfiguration\":{\"state\":\"Disabled\",\"routeTopicResourceId\":\"gz\",\"hostname\":\"u\",\"routingEnrichments\":{\"static\":[{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"},{\"valueType\":\"StaticRoutingEnrichment\"}],\"dynamic\":[{},{}]},\"clientAuthentication\":{\"alternativeAuthenticationNameSources\":[\"ClientCertificateIp\",\"ClientCertificateEmail\"],\"customJwtAuthentication\":{},\"webhookAuthentication\":{\"identity\":{\"type\":\"SystemAssigned\"},\"endpointUrl\":\"hl\",\"azureActiveDirectoryApplicationIdOrUri\":\"m\",\"azureActiveDirectoryTenantId\":\"zy\"}},\"maximumSessionExpiryInHours\":1090911341,\"maximumClientSessionsPerAuthenticationName\":916932114,\"routingIdentityInfo\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"zoggigrxwburvjxx\"},\"customDomains\":[{\"fullyQualifiedDomainName\":\"pydptko\"}]},\"isZoneRedundant\":true,\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"udwtiukbl\",\"action\":\"Allow\"},{\"ipMask\":\"pocipazyxoegu\",\"action\":\"Allow\"},{\"ipMask\":\"piu\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.2\",\"ipAddressType\":\"IPv4\",\"autoScaleConfiguration\":{\"enableAutoScale\":true,\"minimumThroughputUnits\":561322525,\"maximumThroughputUnits\":1534766868}},\"sku\":{\"name\":\"Standard\",\"capacity\":173387394},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"sdpydnfyhxdeoejz\",\"tenantId\":\"w\",\"userAssignedIdentities\":{\"jdeyeamdpha\":{\"principalId\":\"ttgzfbis\",\"clientId\":\"bkh\"},\"tmryw\":{\"principalId\":\"lpbuxwgipwhonowk\",\"clientId\":\"hwankixzbinjepu\"},\"nwvlryavwhheunmm\":{\"principalId\":\"zoqftiyqzrnkcqvy\",\"clientId\":\"whzlsicohoq\"}}},\"location\":\"gyxzk\",\"tags\":{\"szfkbe\":\"cukoklyaxuconu\",\"jmwvvj\":\"pewr\",\"xsenhwlr\":\"kt\"},\"id\":\"ffrzpwvlqdqgbiqy\",\"name\":\"ihkaetcktvfc\",\"type\":\"vf\"}],\"nextLink\":\"kymuctqhjfbebr\"}") .toObject(NamespacesListResult.class); - Assertions.assertEquals("qkdlw", model.value().get(0).location()); - Assertions.assertEquals("bum", model.value().get(0).tags().get("kxtrq")); + Assertions.assertEquals("gyxzk", model.value().get(0).location()); + Assertions.assertEquals("cukoklyaxuconu", model.value().get(0).tags().get("szfkbe")); Assertions.assertEquals(SkuName.STANDARD, model.value().get(0).sku().name()); - Assertions.assertEquals(1494813827, model.value().get(0).sku().capacity()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("dbsdshm", model.value().get(0).identity().principalId()); - Assertions.assertEquals("maehvbbxurip", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("htba", - model.value().get(0).identity().userAssignedIdentities().get("wrck").principalId()); - Assertions.assertEquals("gx", model.value().get(0).identity().userAssignedIdentities().get("wrck").clientId()); - Assertions.assertEquals("mwks", + Assertions.assertEquals(173387394, model.value().get(0).sku().capacity()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("sdpydnfyhxdeoejz", model.value().get(0).identity().principalId()); + Assertions.assertEquals("w", model.value().get(0).identity().tenantId()); + Assertions.assertEquals("ttgzfbis", + model.value().get(0).identity().userAssignedIdentities().get("jdeyeamdpha").principalId()); + Assertions.assertEquals("bkh", + model.value().get(0).identity().userAssignedIdentities().get("jdeyeamdpha").clientId()); + Assertions.assertEquals("sauuimj", model.value().get(0).topicsConfiguration().customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(TopicSpacesConfigurationState.ENABLED, + Assertions.assertEquals(TopicSpacesConfigurationState.DISABLED, model.value().get(0).topicSpacesConfiguration().state()); - Assertions.assertEquals("rtwnawjslbi", model.value().get(0).topicSpacesConfiguration().routeTopicResourceId()); - Assertions.assertEquals(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI, + Assertions.assertEquals("gz", model.value().get(0).topicSpacesConfiguration().routeTopicResourceId()); + Assertions.assertEquals(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_IP, model.value() .get(0) .topicSpacesConfiguration() @@ -73,236 +55,46 @@ public void testDeserialize() throws Exception { .webhookAuthentication() .identity() .type()); - Assertions.assertEquals("nrpxehuw", + Assertions.assertEquals("hl", model.value() .get(0) .topicSpacesConfiguration() .clientAuthentication() .webhookAuthentication() .endpointUrl()); - Assertions.assertEquals("ykqgaifmvik", + Assertions.assertEquals("m", model.value() .get(0) .topicSpacesConfiguration() .clientAuthentication() .webhookAuthentication() .azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("bydvkhbejdz", + Assertions.assertEquals("zy", model.value() .get(0) .topicSpacesConfiguration() .clientAuthentication() .webhookAuthentication() .azureActiveDirectoryTenantId()); - Assertions.assertEquals(2140259102, + Assertions.assertEquals(1090911341, model.value().get(0).topicSpacesConfiguration().maximumSessionExpiryInHours()); - Assertions.assertEquals(2141010446, + Assertions.assertEquals(916932114, model.value().get(0).topicSpacesConfiguration().maximumClientSessionsPerAuthenticationName()); - Assertions.assertEquals(RoutingIdentityType.USER_ASSIGNED, + Assertions.assertEquals(RoutingIdentityType.SYSTEM_ASSIGNED, model.value().get(0).topicSpacesConfiguration().routingIdentityInfo().type()); - Assertions.assertEquals("jivolvtnov", + Assertions.assertEquals("zoggigrxwburvjxx", model.value().get(0).topicSpacesConfiguration().routingIdentityInfo().userAssignedIdentity()); - Assertions.assertEquals("gemjdftuljltdu", + Assertions.assertEquals("pydptko", model.value().get(0).topicSpacesConfiguration().customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertFalse(model.value().get(0).isZoneRedundant()); + Assertions.assertTrue(model.value().get(0).isZoneRedundant()); Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("sv", model.value().get(0).inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("udwtiukbl", model.value().get(0).inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals("scjfnyns", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespacesListResult model - = new NamespacesListResult() - .withValue( - Arrays.asList( - new NamespaceInner().withLocation("qkdlw") - .withTags(mapOf("kxtrq", "bum", "rtawcoezb", "fsmlmbtxhwgfw")) - .withSku(new NamespaceSku().withName(SkuName.STANDARD).withCapacity(1494813827)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("dbsdshm") - .withTenantId("maehvbbxurip") - .withUserAssignedIdentities(mapOf("wrck", - new UserIdentityProperties().withPrincipalId("htba").withClientId("gx"), "uudl", - new UserIdentityProperties().withPrincipalId("kl").withClientId("pluodpv"), "lhpl", - new UserIdentityProperties().withPrincipalId("ibthostgktstvd") - .withClientId("clzedqbcvh")))) - .withPrivateEndpointConnections(Arrays.asList(new PrivateEndpointConnectionInner(), - new PrivateEndpointConnectionInner(), new PrivateEndpointConnectionInner())) - .withTopicsConfiguration(new TopicsConfiguration().withCustomDomains( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("mwks"), - new CustomDomainConfiguration() - .withFullyQualifiedDomainName("ircizjxvy"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("fceacvlhvygd")))) - .withTopicSpacesConfiguration( - new TopicSpacesConfiguration().withState(TopicSpacesConfigurationState.ENABLED) - .withRouteTopicResourceId("rtwnawjslbi") - .withRoutingEnrichments(new RoutingEnrichments() - .withStaticProperty(Arrays.asList(new StaticRoutingEnrichment())) - .withDynamic(Arrays.asList(new DynamicRoutingEnrichment(), - new DynamicRoutingEnrichment()))) - .withClientAuthentication(new ClientAuthenticationSettings() - .withAlternativeAuthenticationNameSources( - Arrays.asList(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI, - AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_EMAIL, - AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI, - AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI)) - .withCustomJwtAuthentication(new CustomJwtAuthenticationSettings()) - .withWebhookAuthentication(new WebhookAuthenticationSettings() - .withIdentity(new CustomWebhookAuthenticationManagedIdentity().withType( - CustomWebhookAuthenticationManagedIdentityType.SYSTEM_ASSIGNED)) - .withEndpointUrl("nrpxehuw") - .withAzureActiveDirectoryApplicationIdOrUri("ykqgaifmvik") - .withAzureActiveDirectoryTenantId("bydvkhbejdz"))) - .withMaximumSessionExpiryInHours(2140259102) - .withMaximumClientSessionsPerAuthenticationName(2141010446) - .withRoutingIdentityInfo( - new RoutingIdentityInfo().withType(RoutingIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("jivolvtnov")) - .withCustomDomains(Arrays.asList( - new CustomDomainConfiguration().withFullyQualifiedDomainName("gemjdftuljltdu"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("eamtmcz"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("o"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("ejwcwwqiok")))) - .withIsZoneRedundant(false) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule() - .withIpMask("sv") - .withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("rvkwc").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO), - new NamespaceInner().withLocation("vcyy") - .withTags(mapOf("onmacjekniz", "gdotcubiipuipwo")) - .withSku(new NamespaceSku().withName(SkuName.STANDARD).withCapacity(2075854063)) - .withIdentity( - new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("pzlrphw") - .withTenantId("oldweyuqdu") - .withUserAssignedIdentities(mapOf("dnhxmsi", - new UserIdentityProperties().withPrincipalId("nrwrbiork") - .withClientId("lywjhh"), - "ndieuzaofj", - new UserIdentityProperties().withPrincipalId("omi").withClientId("xggdufi")))) - .withPrivateEndpointConnections(Arrays.asList(new PrivateEndpointConnectionInner(), - new PrivateEndpointConnectionInner(), new PrivateEndpointConnectionInner())) - .withTopicsConfiguration(new TopicsConfiguration().withCustomDomains( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("m"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("cpmguaadraufact")))) - .withTopicSpacesConfiguration(new TopicSpacesConfiguration() - .withState(TopicSpacesConfigurationState.DISABLED) - .withRouteTopicResourceId("v") - .withRoutingEnrichments(new RoutingEnrichments() - .withStaticProperty(Arrays.asList(new StaticRoutingEnrichment(), - new StaticRoutingEnrichment(), new StaticRoutingEnrichment())) - .withDynamic( - Arrays.asList(new DynamicRoutingEnrichment(), new DynamicRoutingEnrichment(), - new DynamicRoutingEnrichment(), new DynamicRoutingEnrichment()))) - .withClientAuthentication(new ClientAuthenticationSettings() - .withAlternativeAuthenticationNameSources( - Arrays.asList(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_EMAIL, - AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_DNS)) - .withCustomJwtAuthentication(new CustomJwtAuthenticationSettings()) - .withWebhookAuthentication(new WebhookAuthenticationSettings() - .withIdentity(new CustomWebhookAuthenticationManagedIdentity() - .withType(CustomWebhookAuthenticationManagedIdentityType.SYSTEM_ASSIGNED)) - .withEndpointUrl("fgslqubkwdl") - .withAzureActiveDirectoryApplicationIdOrUri("nrdsutujbazpjuoh") - .withAzureActiveDirectoryTenantId("inyflnorwmduvwp"))) - .withMaximumSessionExpiryInHours(1862028450) - .withMaximumClientSessionsPerAuthenticationName(156368674) - .withRoutingIdentityInfo( - new RoutingIdentityInfo().withType(RoutingIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("xpgpq")) - .withCustomDomains( - Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("sze")))) - .withIsZoneRedundant(false) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("gibbdaxc").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("zauorsuk").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO))) - .withNextLink("scjfnyns"); - model = BinaryData.fromObject(model).toObject(NamespacesListResult.class); - Assertions.assertEquals("qkdlw", model.value().get(0).location()); - Assertions.assertEquals("bum", model.value().get(0).tags().get("kxtrq")); - Assertions.assertEquals(SkuName.STANDARD, model.value().get(0).sku().name()); - Assertions.assertEquals(1494813827, model.value().get(0).sku().capacity()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("dbsdshm", model.value().get(0).identity().principalId()); - Assertions.assertEquals("maehvbbxurip", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("htba", - model.value().get(0).identity().userAssignedIdentities().get("wrck").principalId()); - Assertions.assertEquals("gx", model.value().get(0).identity().userAssignedIdentities().get("wrck").clientId()); - Assertions.assertEquals("mwks", - model.value().get(0).topicsConfiguration().customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(TopicSpacesConfigurationState.ENABLED, - model.value().get(0).topicSpacesConfiguration().state()); - Assertions.assertEquals("rtwnawjslbi", model.value().get(0).topicSpacesConfiguration().routeTopicResourceId()); - Assertions.assertEquals(AlternativeAuthenticationNameSource.CLIENT_CERTIFICATE_URI, - model.value() - .get(0) - .topicSpacesConfiguration() - .clientAuthentication() - .alternativeAuthenticationNameSources() - .get(0)); - Assertions.assertEquals(CustomWebhookAuthenticationManagedIdentityType.SYSTEM_ASSIGNED, - model.value() - .get(0) - .topicSpacesConfiguration() - .clientAuthentication() - .webhookAuthentication() - .identity() - .type()); - Assertions.assertEquals("nrpxehuw", - model.value() - .get(0) - .topicSpacesConfiguration() - .clientAuthentication() - .webhookAuthentication() - .endpointUrl()); - Assertions.assertEquals("ykqgaifmvik", - model.value() - .get(0) - .topicSpacesConfiguration() - .clientAuthentication() - .webhookAuthentication() - .azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("bydvkhbejdz", - model.value() - .get(0) - .topicSpacesConfiguration() - .clientAuthentication() - .webhookAuthentication() - .azureActiveDirectoryTenantId()); - Assertions.assertEquals(2140259102, - model.value().get(0).topicSpacesConfiguration().maximumSessionExpiryInHours()); - Assertions.assertEquals(2141010446, - model.value().get(0).topicSpacesConfiguration().maximumClientSessionsPerAuthenticationName()); - Assertions.assertEquals(RoutingIdentityType.USER_ASSIGNED, - model.value().get(0).topicSpacesConfiguration().routingIdentityInfo().type()); - Assertions.assertEquals("jivolvtnov", - model.value().get(0).topicSpacesConfiguration().routingIdentityInfo().userAssignedIdentity()); - Assertions.assertEquals("gemjdftuljltdu", - model.value().get(0).topicSpacesConfiguration().customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertFalse(model.value().get(0).isZoneRedundant()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("sv", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals("scjfnyns", 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; + Assertions.assertEquals(TlsVersion.ONE_TWO, model.value().get(0).minimumTlsVersionAllowed()); + Assertions.assertEquals(IpAddressType.IPV4, model.value().get(0).ipAddressType()); + Assertions.assertTrue(model.value().get(0).autoScaleConfiguration().enableAutoScale()); + Assertions.assertEquals(561322525, model.value().get(0).autoScaleConfiguration().minimumThroughputUnits()); + Assertions.assertEquals(1534766868, model.value().get(0).autoScaleConfiguration().maximumThroughputUnits()); + Assertions.assertEquals("kymuctqhjfbebr", model.nextLink()); } } 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 index fd759851168fa..dcaa2d2d30a94 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -23,7 +23,7 @@ public final class NamespacesValidateCustomDomainOwnershipMockTests { @Test public void testValidateCustomDomainOwnership() throws Exception { String responseStr - = "{\"customDomainsForTopicsConfiguration\":[{\"fullyQualifiedDomainName\":\"cgnwplrrbphcts\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"uhqvums\"},\"certificateUrl\":\"fsfeqbbe\",\"expectedTxtRecordName\":\"cuq\",\"expectedTxtRecordValue\":\"yyxmzrmtmvwituw\"},{\"fullyQualifiedDomainName\":\"yyjshcybwfuppo\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"uujxdii\"},\"certificateUrl\":\"oxrezsvavlrxik\",\"expectedTxtRecordName\":\"oywlunpipcwyb\",\"expectedTxtRecordValue\":\"fncn\"},{\"fullyQualifiedDomainName\":\"atpf\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"whxorpwaltz\"},\"certificateUrl\":\"gexojfccylhtrht\",\"expectedTxtRecordName\":\"azjpwexcdrzpro\",\"expectedTxtRecordValue\":\"zxezmnr\"},{\"fullyQualifiedDomainName\":\"jgpjeuxs\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"mijpdvzvfbhwbdq\"},\"certificateUrl\":\"vcgnrgla\",\"expectedTxtRecordName\":\"wyambhba\",\"expectedTxtRecordValue\":\"bz\"}],\"customDomainsForTopicSpacesConfiguration\":[{\"fullyQualifiedDomainName\":\"jqut\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"trvrkpsab\"},\"certificateUrl\":\"xvzmlghny\",\"expectedTxtRecordName\":\"lpyeu\",\"expectedTxtRecordValue\":\"p\"}]}"; + = "{\"customDomainsForTopicsConfiguration\":[{\"fullyQualifiedDomainName\":\"xlhdj\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"vpsozjiihjri\"},\"certificateUrl\":\"mrzoep\",\"expectedTxtRecordName\":\"wdvwnjkgvfnmx\",\"expectedTxtRecordValue\":\"rsqftib\"},{\"fullyQualifiedDomainName\":\"yibuyvpirfqjpnqn\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"e\"},\"certificateUrl\":\"exkxbhx\",\"expectedTxtRecordName\":\"cnulgmnhjevdy\",\"expectedTxtRecordValue\":\"fajs\"},{\"fullyQualifiedDomainName\":\"kskmqozzkivyhjrl\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"qfhefkwabsol\"},\"certificateUrl\":\"nqqlmgnl\",\"expectedTxtRecordName\":\"sjxtel\",\"expectedTxtRecordValue\":\"hvuqbo\"},{\"fullyQualifiedDomainName\":\"oolzqocarkuzl\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"nx\"},\"certificateUrl\":\"qytl\",\"expectedTxtRecordName\":\"dyz\",\"expectedTxtRecordValue\":\"ckze\"}],\"customDomainsForTopicSpacesConfiguration\":[{\"fullyQualifiedDomainName\":\"akckywym\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"dtfohfaog\"},\"certificateUrl\":\"kiwrsiw\",\"expectedTxtRecordName\":\"jqu\",\"expectedTxtRecordValue\":\"kcrr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,34 +32,34 @@ public void testValidateCustomDomainOwnership() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - CustomDomainOwnershipValidationResult response - = manager.namespaces().validateCustomDomainOwnership("qgpwbmwhr", "ali", com.azure.core.util.Context.NONE); + CustomDomainOwnershipValidationResult response = manager.namespaces() + .validateCustomDomainOwnership("wpfsuqtaaz", "qbxyxoyfpuqqi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("cgnwplrrbphcts", + Assertions.assertEquals("xlhdj", response.customDomainsForTopicsConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.APPROVED, + Assertions.assertEquals(CustomDomainValidationState.PENDING, response.customDomainsForTopicsConfiguration().get(0).validationState()); Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, response.customDomainsForTopicsConfiguration().get(0).identity().type()); - Assertions.assertEquals("uhqvums", + Assertions.assertEquals("vpsozjiihjri", response.customDomainsForTopicsConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("fsfeqbbe", response.customDomainsForTopicsConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("cuq", response.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("yyxmzrmtmvwituw", + Assertions.assertEquals("mrzoep", response.customDomainsForTopicsConfiguration().get(0).certificateUrl()); + Assertions.assertEquals("wdvwnjkgvfnmx", + response.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordName()); + Assertions.assertEquals("rsqftib", response.customDomainsForTopicsConfiguration().get(0).expectedTxtRecordValue()); - Assertions.assertEquals("jqut", + Assertions.assertEquals("akckywym", response.customDomainsForTopicSpacesConfiguration().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.PENDING, + Assertions.assertEquals(CustomDomainValidationState.APPROVED, response.customDomainsForTopicSpacesConfiguration().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, + Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, response.customDomainsForTopicSpacesConfiguration().get(0).identity().type()); - Assertions.assertEquals("trvrkpsab", + Assertions.assertEquals("dtfohfaog", response.customDomainsForTopicSpacesConfiguration().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("xvzmlghny", - response.customDomainsForTopicSpacesConfiguration().get(0).certificateUrl()); - Assertions.assertEquals("lpyeu", + Assertions.assertEquals("kiwrsiw", response.customDomainsForTopicSpacesConfiguration().get(0).certificateUrl()); + Assertions.assertEquals("jqu", response.customDomainsForTopicSpacesConfiguration().get(0).expectedTxtRecordName()); - Assertions.assertEquals("p", + Assertions.assertEquals("kcrr", 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 index 579bc8580ef87..b23857d38ad8d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -10,149 +10,42 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import com.azure.resourcemanager.eventgrid.models.ResourceAssociation; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NetworkSecurityPerimeterConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"wtqabpxuckp\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"ird\",\"suggestedResourceIds\":[\"sn\",\"wfl\",\"qmp\",\"zruwn\"],\"suggestedAccessRules\":[\"pxiwf\",\"ngjsaasi\",\"xtmkzjvkviir\"]}}],\"networkSecurityPerimeter\":{\"id\":\"grwsdp\",\"perimeterGuid\":\"atzv\",\"location\":\"glbyvi\"},\"resourceAssociation\":{\"name\":\"tbrxkjz\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"fmsh\",\"accessRulesVersion\":\"fbkgozxwopdby\",\"accessRules\":[{\"fullyQualifiedArmId\":\"qaclnapxbiy\",\"name\":\"ugjknf\",\"type\":\"fcttuxuuyilfl\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"rehmr\",\"jhvsujztczyt\",\"jtwhauunf\",\"rnjlet\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"do\",\"ifamowazi\"],\"emailAddresses\":[\"nlqwzdvpiwhx\",\"szdtmaajquh\",\"xylrjvmtygjbmz\",\"ospspshckf\"],\"phoneNumbers\":[\"pms\",\"bpssdfp\",\"yogtieyujtvczkcn\",\"xrx\"]}},{\"fullyQualifiedArmId\":\"njdxvglnkvxl\",\"name\":\"aglqivbgkcvkh\",\"type\":\"vuqd\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"yp\",\"pubcpzgpxtivhjk\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"jxgpnrhgovfg\",\"ik\",\"mhha\",\"wjrmzvuporqzd\"],\"emailAddresses\":[\"dzvkfvxcnqmxq\",\"swokm\"],\"phoneNumbers\":[\"lgg\"]}},{\"fullyQualifiedArmId\":\"bemzqkzszuwi\",\"name\":\"glxxhljfpgpic\",\"type\":\"nzhrgmqgjsxvpqcb\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"thsqqgvriiba\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"rnxousxauzlwvsg\"],\"emailAddresses\":[\"hqf\",\"izvu\"],\"phoneNumbers\":[\"kjsvthnwpzteko\"]}},{\"fullyQualifiedArmId\":\"ribi\",\"name\":\"tgplucfota\",\"type\":\"c\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"cugswvxwlmzqw\",\"vtxnjmxmcuqud\",\"cvclxynpdk\",\"gfabuiyjibuzphdu\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"gox\",\"jiuqhibtozi\"],\"emailAddresses\":[\"jedmurrxxgewp\",\"tvqylkmqpzoyhlfb\",\"gwgcl\",\"xoe\"],\"phoneNumbers\":[\"njipnwjfujql\",\"fcbahhp\",\"pofoi\"]}}],\"diagnosticSettingsVersion\":\"w\",\"enabledLogCategories\":[\"lkmkkholvdndvi\",\"uogphuartvtiuky\"]}},\"id\":\"fchnmnah\",\"name\":\"nxhkxjqi\",\"type\":\"wrweoo\"}") + "{\"properties\":{\"provisioningState\":\"Accepted\",\"provisioningIssues\":[{\"name\":\"sp\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"pyogtieyuj\",\"suggestedResourceIds\":[\"zkc\",\"yxrxmunj\",\"xvglnkvxlxp\",\"glqivbgkcv\"],\"suggestedAccessRules\":[\"zvuqdflvon\",\"yp\",\"pubcpzgpxtivhjk\"]}}],\"networkSecurityPerimeter\":{\"id\":\"ibg\",\"perimeterGuid\":\"xgpnr\",\"location\":\"ov\"},\"resourceAssociation\":{\"name\":\"ik\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"owjrmzvuporqz\",\"accessRulesVersion\":\"uydzvk\",\"accessRules\":[{\"fullyQualifiedArmId\":\"nq\",\"name\":\"qpswokmvkhlggdhb\",\"type\":\"zqkzszuwi\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"hljfpgpi\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"gmqgjs\",\"vpqcb\"],\"emailAddresses\":[\"bodthsqqgvri\",\"bakclacjfrnxous\",\"au\",\"lwvsgm\"],\"phoneNumbers\":[\"qf\"]}},{\"fullyQualifiedArmId\":\"zvuxm\",\"name\":\"jsvthnwpzteko\",\"type\":\"ribi\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"ucfotangcf\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"gswvxwlmzqwm\",\"tx\"],\"emailAddresses\":[\"xmcuqud\",\"cvclxynpdk\",\"gfabuiyjibuzphdu\",\"neiknpg\"],\"phoneNumbers\":[\"jiuqhibtozi\",\"qw\",\"edmurrxxge\"]}},{\"fullyQualifiedArmId\":\"ktvqylkmqpzoy\",\"name\":\"fbcgwgcloxoebqin\",\"type\":\"pnwjfujq\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"hhpzpofoiyjwpf\",\"lkmkkholvdndvi\",\"uogphuartvtiuky\",\"fchnmnah\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"qirwrweoox\",\"fifhxwrsnew\"],\"emailAddresses\":[\"qvbubqmamhs\",\"cx\"],\"phoneNumbers\":[\"gaztt\"]}},{\"fullyQualifiedArmId\":\"o\",\"name\":\"vmfqhppubo\",\"type\":\"epdfgkmtdherng\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"hokq\",\"obkauxofsh\",\"phwpnulaiywzej\",\"whslwkoj\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"dwrpqafgfugsnn\",\"hyet\",\"fypococtfjgti\",\"rjvzuyt\"],\"emailAddresses\":[\"lmuowo\",\"bauiropi\"],\"phoneNumbers\":[\"zonwpngajinnixj\",\"wrtmjfjmy\",\"cxlzhcoxovnekh\",\"nlusfnrd\"]}}],\"diagnosticSettingsVersion\":\"xtxrdcqtjvidt\",\"enabledLogCategories\":[\"puslvyj\"]}},\"id\":\"vuwkasiziesfuugh\",\"name\":\"uqfecj\",\"type\":\"ey\"}") .toObject(NetworkSecurityPerimeterConfigurationInner.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.SUCCEEDED, model.provisioningState()); - Assertions.assertEquals("wtqabpxuckp", model.provisioningIssues().get(0).name()); + Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.ACCEPTED, model.provisioningState()); + Assertions.assertEquals("sp", model.provisioningIssues().get(0).name()); Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE, model.provisioningIssues().get(0).issueType()); Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, model.provisioningIssues().get(0).severity()); - Assertions.assertEquals("ird", model.provisioningIssues().get(0).description()); - Assertions.assertEquals("sn", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("pxiwf", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("grwsdp", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("atzv", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("glbyvi", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("tbrxkjz", model.resourceAssociation().name()); + Assertions.assertEquals("pyogtieyuj", model.provisioningIssues().get(0).description()); + Assertions.assertEquals("zkc", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); + Assertions.assertEquals("zvuqdflvon", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); + Assertions.assertEquals("ibg", model.networkSecurityPerimeter().id()); + Assertions.assertEquals("xgpnr", model.networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("ov", model.networkSecurityPerimeter().location()); + Assertions.assertEquals("ik", model.resourceAssociation().name()); Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.LEARNING, model.resourceAssociation().accessMode()); - Assertions.assertEquals("fmsh", model.profile().name()); - Assertions.assertEquals("fbkgozxwopdby", model.profile().accessRulesVersion()); - Assertions.assertEquals("qaclnapxbiy", model.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("ugjknf", model.profile().accessRules().get(0).name()); - Assertions.assertEquals("fcttuxuuyilfl", model.profile().accessRules().get(0).type()); + Assertions.assertEquals("owjrmzvuporqz", model.profile().name()); + Assertions.assertEquals("uydzvk", model.profile().accessRulesVersion()); + Assertions.assertEquals("nq", model.profile().accessRules().get(0).fullyQualifiedArmId()); + Assertions.assertEquals("qpswokmvkhlggdhb", model.profile().accessRules().get(0).name()); + Assertions.assertEquals("zqkzszuwi", model.profile().accessRules().get(0).type()); Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, model.profile().accessRules().get(0).direction()); - Assertions.assertEquals("rehmr", model.profile().accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("do", model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("nlqwzdvpiwhx", model.profile().accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("pms", model.profile().accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("w", model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("lkmkkholvdndvi", model.profile().enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationInner model = new NetworkSecurityPerimeterConfigurationInner() - .withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState.SUCCEEDED) - .withProvisioningIssues( - Arrays.asList(new NetworkSecurityPerimeterConfigurationIssues().withName("wtqabpxuckp") - .withIssueType(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR) - .withDescription("ird") - .withSuggestedResourceIds(Arrays.asList("sn", "wfl", "qmp", "zruwn")) - .withSuggestedAccessRules(Arrays.asList("pxiwf", "ngjsaasi", "xtmkzjvkviir")))) - .withNetworkSecurityPerimeter( - new NetworkSecurityPerimeterInfo().withId("grwsdp").withPerimeterGuid("atzv").withLocation("glbyvi")) - .withResourceAssociation(new ResourceAssociation().withName("tbrxkjz") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.LEARNING)) - .withProfile(new NetworkSecurityPerimeterConfigurationProfile().withName("fmsh") - .withAccessRulesVersion("fbkgozxwopdby") - .withAccessRules(Arrays.asList( - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("qaclnapxbiy") - .withName("ugjknf") - .withType("fcttuxuuyilfl") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("rehmr", "jhvsujztczyt", "jtwhauunf", "rnjlet")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo(), - new NetworkSecurityPerimeterInfo(), new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("do", "ifamowazi")) - .withEmailAddresses( - Arrays.asList("nlqwzdvpiwhx", "szdtmaajquh", "xylrjvmtygjbmz", "ospspshckf")) - .withPhoneNumbers(Arrays.asList("pms", "bpssdfp", "yogtieyujtvczkcn", "xrx")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("njdxvglnkvxl") - .withName("aglqivbgkcvkh") - .withType("vuqd") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("yp", "pubcpzgpxtivhjk")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription(), new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo(), - new NetworkSecurityPerimeterInfo(), new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("jxgpnrhgovfg", "ik", "mhha", "wjrmzvuporqzd")) - .withEmailAddresses(Arrays.asList("dzvkfvxcnqmxq", "swokm")) - .withPhoneNumbers(Arrays.asList("lgg")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("bemzqkzszuwi") - .withName("glxxhljfpgpic") - .withType("nzhrgmqgjsxvpqcb") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("thsqqgvriiba")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription(), new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("rnxousxauzlwvsg")) - .withEmailAddresses(Arrays.asList("hqf", "izvu")) - .withPhoneNumbers(Arrays.asList("kjsvthnwpzteko")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("ribi") - .withName("tgplucfota") - .withType("c") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes( - Arrays.asList("cugswvxwlmzqw", "vtxnjmxmcuqud", "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")))) - .withDiagnosticSettingsVersion("w") - .withEnabledLogCategories(Arrays.asList("lkmkkholvdndvi", "uogphuartvtiuky"))); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationInner.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.SUCCEEDED, model.provisioningState()); - Assertions.assertEquals("wtqabpxuckp", model.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE, - model.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, - model.provisioningIssues().get(0).severity()); - Assertions.assertEquals("ird", model.provisioningIssues().get(0).description()); - Assertions.assertEquals("sn", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("pxiwf", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("grwsdp", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("atzv", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("glbyvi", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("tbrxkjz", model.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.LEARNING, - model.resourceAssociation().accessMode()); - Assertions.assertEquals("fmsh", model.profile().name()); - Assertions.assertEquals("fbkgozxwopdby", model.profile().accessRulesVersion()); - Assertions.assertEquals("qaclnapxbiy", model.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("ugjknf", model.profile().accessRules().get(0).name()); - Assertions.assertEquals("fcttuxuuyilfl", model.profile().accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, - model.profile().accessRules().get(0).direction()); - Assertions.assertEquals("rehmr", model.profile().accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("do", model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("nlqwzdvpiwhx", model.profile().accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("pms", model.profile().accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("w", model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("lkmkkholvdndvi", model.profile().enabledLogCategories().get(0)); + Assertions.assertEquals("hljfpgpi", model.profile().accessRules().get(0).addressPrefixes().get(0)); + Assertions.assertEquals("gmqgjs", model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("bodthsqqgvri", model.profile().accessRules().get(0).emailAddresses().get(0)); + Assertions.assertEquals("qf", model.profile().accessRules().get(0).phoneNumbers().get(0)); + Assertions.assertEquals("xtxrdcqtjvidt", model.profile().diagnosticSettingsVersion()); + Assertions.assertEquals("puslvyj", 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 index 6870ed46975a0..85e0dee50e2d3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -8,38 +8,19 @@ 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\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"tznapxbannovv\",\"suggestedResourceIds\":[\"zytprwnwvroevy\",\"lyokrrrou\"],\"suggestedAccessRules\":[\"nsa\",\"bcrymodizrx\",\"lobdxna\",\"pmkmlmvevfx\"]}") + "{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"bvqt\",\"suggestedResourceIds\":[\"rfdl\",\"ukhpyrneizjcp\",\"ogkhnmgbr\",\"uxddbhfh\"],\"suggestedAccessRules\":[\"azjzo\"]}") .toObject(NetworkSecurityPerimeterConfigurationIssuesProperties.class); Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.MISSING_PERIMETER_CONFIGURATION, model.issueType()); Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING, model.severity()); - Assertions.assertEquals("tznapxbannovv", model.description()); - Assertions.assertEquals("zytprwnwvroevy", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("nsa", model.suggestedAccessRules().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationIssuesProperties model - = new NetworkSecurityPerimeterConfigurationIssuesProperties() - .withIssueType(NetworkSecurityPerimeterConfigurationIssueType.MISSING_PERIMETER_CONFIGURATION) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING) - .withDescription("tznapxbannovv") - .withSuggestedResourceIds(Arrays.asList("zytprwnwvroevy", "lyokrrrou")) - .withSuggestedAccessRules(Arrays.asList("nsa", "bcrymodizrx", "lobdxna", "pmkmlmvevfx")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationIssuesProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.MISSING_PERIMETER_CONFIGURATION, - model.issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING, model.severity()); - Assertions.assertEquals("tznapxbannovv", model.description()); - Assertions.assertEquals("zytprwnwvroevy", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("nsa", model.suggestedAccessRules().get(0)); + Assertions.assertEquals("bvqt", model.description()); + Assertions.assertEquals("rfdl", model.suggestedResourceIds().get(0)); + Assertions.assertEquals("azjzo", 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 index ef9fd1b0398a3..a621bb5799f7f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -8,38 +8,19 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NetworkSecurityPerimeterConfigurationIssuesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationIssues model = BinaryData.fromString( - "{\"name\":\"fqkfuarenl\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"vnafvvkyfedevjbo\",\"suggestedResourceIds\":[\"qxypokkhminq\",\"ymc\",\"ngnbdxxew\",\"ninvudbchaqdt\"],\"suggestedAccessRules\":[\"crqctmxxdtddmflh\"]}}") + "{\"name\":\"tn\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"gagflnlgmtrwah\",\"suggestedResourceIds\":[\"ucftbyrp\"],\"suggestedAccessRules\":[\"hkpigqfusuckzmkw\",\"lsnoxaxmqeqalh\",\"jnhgwydyyn\"]}}") .toObject(NetworkSecurityPerimeterConfigurationIssues.class); - Assertions.assertEquals("fqkfuarenl", model.name()); + Assertions.assertEquals("tn", model.name()); Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, model.issueType()); Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, model.severity()); - Assertions.assertEquals("vnafvvkyfedevjbo", model.description()); - Assertions.assertEquals("qxypokkhminq", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("crqctmxxdtddmflh", model.suggestedAccessRules().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationIssues model - = new NetworkSecurityPerimeterConfigurationIssues().withName("fqkfuarenl") - .withIssueType(NetworkSecurityPerimeterConfigurationIssueType.OTHER) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR) - .withDescription("vnafvvkyfedevjbo") - .withSuggestedResourceIds(Arrays.asList("qxypokkhminq", "ymc", "ngnbdxxew", "ninvudbchaqdt")) - .withSuggestedAccessRules(Arrays.asList("crqctmxxdtddmflh")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationIssues.class); - Assertions.assertEquals("fqkfuarenl", model.name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, model.issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, model.severity()); - Assertions.assertEquals("vnafvvkyfedevjbo", model.description()); - Assertions.assertEquals("qxypokkhminq", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("crqctmxxdtddmflh", model.suggestedAccessRules().get(0)); + Assertions.assertEquals("gagflnlgmtrwah", model.description()); + Assertions.assertEquals("ucftbyrp", model.suggestedResourceIds().get(0)); + Assertions.assertEquals("hkpigqfusuckzmkw", 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 index b6f1406bece69..29168984db2c7 100644 --- 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 @@ -1,92 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.NetworkSecurityPerimeterConfigurationList; 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\":\"Updating\",\"provisioningIssues\":[{\"name\":\"um\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"cjc\",\"perimeterGuid\":\"tbw\",\"location\":\"sqowxwc\"},\"resourceAssociation\":{\"name\":\"ikytwvczcswka\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"fdv\",\"accessRulesVersion\":\"hbwrnfxtgddpqth\",\"accessRules\":[{}],\"diagnosticSettingsVersion\":\"naoyank\",\"enabledLogCategories\":[\"qswankltytmhdr\",\"znnhd\",\"lktgjc\"]}},\"id\":\"gguxhemlwyw\",\"name\":\"eeczgfbu\",\"type\":\"klelssxb\"},{\"properties\":{\"provisioningState\":\"Updating\",\"provisioningIssues\":[{\"name\":\"jks\",\"properties\":{}},{\"name\":\"mdesqp\",\"properties\":{}},{\"name\":\"mjc\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"bidyv\",\"perimeterGuid\":\"owx\",\"location\":\"piudeugfsxzecpa\"},\"resourceAssociation\":{\"name\":\"ufykhvuhxepmru\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"aobn\",\"accessRulesVersion\":\"ujdjltymkmvg\",\"accessRules\":[{},{},{}],\"diagnosticSettingsVersion\":\"wartspphkixkykxd\",\"enabledLogCategories\":[\"pemmucfxhik\"]}},\"id\":\"flrmymyi\",\"name\":\"cqlh\",\"type\":\"isws\"}],\"nextLink\":\"iiiovgqcgxuugq\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"provisioningIssues\":[{\"name\":\"dxfzzzwyjaf\",\"properties\":{}},{\"name\":\"hguynuchlgmltxdw\",\"properties\":{}},{\"name\":\"zusg\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"snnjzfpafolpym\",\"perimeterGuid\":\"mxq\",\"location\":\"agpgdph\"},\"resourceAssociation\":{\"name\":\"ulajvlejchc\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"nmzlanru\",\"accessRulesVersion\":\"wvnph\",\"accessRules\":[{},{}],\"diagnosticSettingsVersion\":\"tpjhm\",\"enabledLogCategories\":[\"v\",\"hlaiwd\",\"xsmlz\",\"hzdtxetlgydlh\"]}},\"id\":\"lnnpx\",\"name\":\"b\",\"type\":\"fiqgeaar\"}],\"nextLink\":\"jekglklbyuli\"}") .toObject(NetworkSecurityPerimeterConfigurationList.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.UPDATING, + Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.ACCEPTED, model.value().get(0).provisioningState()); - Assertions.assertEquals("um", model.value().get(0).provisioningIssues().get(0).name()); - Assertions.assertEquals("cjc", model.value().get(0).networkSecurityPerimeter().id()); - Assertions.assertEquals("tbw", model.value().get(0).networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("sqowxwc", model.value().get(0).networkSecurityPerimeter().location()); - Assertions.assertEquals("ikytwvczcswka", model.value().get(0).resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED, + Assertions.assertEquals("dxfzzzwyjaf", model.value().get(0).provisioningIssues().get(0).name()); + Assertions.assertEquals("snnjzfpafolpym", model.value().get(0).networkSecurityPerimeter().id()); + Assertions.assertEquals("mxq", model.value().get(0).networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("agpgdph", model.value().get(0).networkSecurityPerimeter().location()); + Assertions.assertEquals("ulajvlejchc", model.value().get(0).resourceAssociation().name()); + Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, model.value().get(0).resourceAssociation().accessMode()); - Assertions.assertEquals("fdv", model.value().get(0).profile().name()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.value().get(0).profile().accessRulesVersion()); - Assertions.assertEquals("naoyank", model.value().get(0).profile().diagnosticSettingsVersion()); - Assertions.assertEquals("qswankltytmhdr", model.value().get(0).profile().enabledLogCategories().get(0)); - Assertions.assertEquals("iiiovgqcgxuugq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationList model = new NetworkSecurityPerimeterConfigurationList() - .withValue(Arrays.asList(new NetworkSecurityPerimeterConfigurationInner() - .withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState.UPDATING) - .withProvisioningIssues(Arrays.asList(new NetworkSecurityPerimeterConfigurationIssues().withName("um"))) - .withNetworkSecurityPerimeter( - new NetworkSecurityPerimeterInfo().withId("cjc").withPerimeterGuid("tbw").withLocation("sqowxwc")) - .withResourceAssociation(new ResourceAssociation().withName("ikytwvczcswka") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED)) - .withProfile(new NetworkSecurityPerimeterConfigurationProfile().withName("fdv") - .withAccessRulesVersion("hbwrnfxtgddpqth") - .withAccessRules(Arrays.asList(new NetworkSecurityPerimeterProfileAccessRule())) - .withDiagnosticSettingsVersion("naoyank") - .withEnabledLogCategories(Arrays.asList("qswankltytmhdr", "znnhd", "lktgjc"))), - new NetworkSecurityPerimeterConfigurationInner() - .withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState.UPDATING) - .withProvisioningIssues( - Arrays.asList(new NetworkSecurityPerimeterConfigurationIssues().withName("jks"), - new NetworkSecurityPerimeterConfigurationIssues().withName("mdesqp"), - new NetworkSecurityPerimeterConfigurationIssues().withName("mjc"))) - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeterInfo().withId("bidyv") - .withPerimeterGuid("owx") - .withLocation("piudeugfsxzecpa")) - .withResourceAssociation(new ResourceAssociation().withName("ufykhvuhxepmru") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.AUDIT)) - .withProfile(new NetworkSecurityPerimeterConfigurationProfile().withName("aobn") - .withAccessRulesVersion("ujdjltymkmvg") - .withAccessRules(Arrays.asList(new NetworkSecurityPerimeterProfileAccessRule(), - new NetworkSecurityPerimeterProfileAccessRule(), - new NetworkSecurityPerimeterProfileAccessRule())) - .withDiagnosticSettingsVersion("wartspphkixkykxd") - .withEnabledLogCategories(Arrays.asList("pemmucfxhik"))))) - .withNextLink("iiiovgqcgxuugq"); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationList.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.UPDATING, - model.value().get(0).provisioningState()); - Assertions.assertEquals("um", model.value().get(0).provisioningIssues().get(0).name()); - Assertions.assertEquals("cjc", model.value().get(0).networkSecurityPerimeter().id()); - Assertions.assertEquals("tbw", model.value().get(0).networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("sqowxwc", model.value().get(0).networkSecurityPerimeter().location()); - Assertions.assertEquals("ikytwvczcswka", model.value().get(0).resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED, - model.value().get(0).resourceAssociation().accessMode()); - Assertions.assertEquals("fdv", model.value().get(0).profile().name()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.value().get(0).profile().accessRulesVersion()); - Assertions.assertEquals("naoyank", model.value().get(0).profile().diagnosticSettingsVersion()); - Assertions.assertEquals("qswankltytmhdr", model.value().get(0).profile().enabledLogCategories().get(0)); - Assertions.assertEquals("iiiovgqcgxuugq", model.nextLink()); + Assertions.assertEquals("nmzlanru", model.value().get(0).profile().name()); + Assertions.assertEquals("wvnph", model.value().get(0).profile().accessRulesVersion()); + Assertions.assertEquals("tpjhm", model.value().get(0).profile().diagnosticSettingsVersion()); + Assertions.assertEquals("v", model.value().get(0).profile().enabledLogCategories().get(0)); + Assertions.assertEquals("jekglklbyuli", 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 index 961e234cb071b..85ed73fa834d7 100644 --- 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 @@ -1,112 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"cyknapqofyuicd\",\"accessRulesVersion\":\"bd\",\"accessRules\":[{\"fullyQualifiedArmId\":\"gbdvibidmhmwff\",\"name\":\"fmuvapckccr\",\"type\":\"weyoxoy\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"immoiroqboshbrag\",\"pyyrmfs\",\"bpav\"],\"subscriptions\":[{\"id\":\"ppdbwnupgahxkum\"},{\"id\":\"jcaacfdmmcpugm\"}],\"networkSecurityPerimeters\":[{\"id\":\"pvufhbze\",\"perimeterGuid\":\"whoqhnlbqnbldxe\",\"location\":\"lgsc\"},{\"id\":\"ri\",\"perimeterGuid\":\"rsrrmoucsofldp\",\"location\":\"iyfc\"},{\"id\":\"beolh\",\"perimeterGuid\":\"lvbmxuqibsxtkcu\",\"location\":\"b\"}],\"fullyQualifiedDomainNames\":[\"rfsiowlkjxn\",\"pvwgfstmhqykizmd\"],\"emailAddresses\":[\"oafcluqvox\"],\"phoneNumbers\":[\"jimryvwgcwwpbmz\",\"w\",\"sydsxwefohe\",\"bvopwndyqle\"]}},{\"fullyQualifiedArmId\":\"lklmtkhlo\",\"name\":\"x\",\"type\":\"vbrdfjmzsyzfho\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"yych\",\"nsjlpjrtws\",\"hv\"],\"subscriptions\":[{\"id\":\"phvtrrmhwrb\"},{\"id\":\"pyf\"},{\"id\":\"bhvjglr\"}],\"networkSecurityPerimeters\":[{\"id\":\"zlwhhmemhooclu\",\"perimeterGuid\":\"pqmem\",\"location\":\"jk\"},{\"id\":\"ykyujxsg\",\"perimeterGuid\":\"srrryejylmbkzu\",\"location\":\"igrfihotjewl\"}],\"fullyQualifiedDomainNames\":[\"zzjgnr\",\"fqyhqoto\",\"hiqakydiwfbrk\"],\"emailAddresses\":[\"dqtvhcsp\"],\"phoneNumbers\":[\"qaxsipietgbebjf\"]}}],\"diagnosticSettingsVersion\":\"bmoichd\",\"enabledLogCategories\":[\"fpubntnbatz\",\"iqsowsaaelc\",\"ttcjuhplrvkmjc\"]}") + "{\"name\":\"fuarenlvhht\",\"accessRulesVersion\":\"nvnaf\",\"accessRules\":[{\"fullyQualifiedArmId\":\"f\",\"name\":\"ev\",\"type\":\"oslc\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"khminqcymc\",\"ngnbdxxew\",\"ninvudbchaqdt\",\"qecrqctmxx\"],\"subscriptions\":[{\"id\":\"mflhuytxzvtznapx\"}],\"networkSecurityPerimeters\":[{\"id\":\"o\",\"perimeterGuid\":\"oxczytp\",\"location\":\"nwvroevytlyokrr\"},{\"id\":\"uuxvnsasbcry\",\"perimeterGuid\":\"dizr\",\"location\":\"lobdxna\"}],\"fullyQualifiedDomainNames\":[\"kml\",\"vevfxz\",\"pj\"],\"emailAddresses\":[\"xliohrdddt\",\"gxqbawpcb\"],\"phoneNumbers\":[\"qcy\",\"napqo\"]}},{\"fullyQualifiedArmId\":\"uicdhzbdybwwg\",\"name\":\"vibidmhmwffpl\",\"type\":\"u\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"crrvweyo\",\"oy\",\"ukphaimmoiroq\",\"oshbragapyy\"],\"subscriptions\":[{\"id\":\"vbpavbopfppdbw\"}],\"networkSecurityPerimeters\":[{\"id\":\"ahxku\",\"perimeterGuid\":\"sjcaacfdmmcpugm\",\"location\":\"qepvufhbzeh\"},{\"id\":\"hoqhnl\",\"perimeterGuid\":\"nbldxeaclgschori\",\"location\":\"rsrrmoucsofldp\"},{\"id\":\"iyfc\",\"perimeterGuid\":\"beolh\",\"location\":\"lvbmxuqibsxtkcu\"}],\"fullyQualifiedDomainNames\":[\"sfar\"],\"emailAddresses\":[\"owlkjxnqpv\"],\"phoneNumbers\":[\"stmhqykizmd\",\"saoafcluqvox\",\"ycjimryvwgcwwpbm\",\"gwe\"]}}],\"diagnosticSettingsVersion\":\"dsxwefoh\",\"enabledLogCategories\":[\"vopwndyqleallk\",\"mtkhlowkxxpvbr\",\"fjmzsyzfho\"]}") .toObject(NetworkSecurityPerimeterConfigurationProfile.class); - Assertions.assertEquals("cyknapqofyuicd", model.name()); - Assertions.assertEquals("bd", model.accessRulesVersion()); - Assertions.assertEquals("gbdvibidmhmwff", model.accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("fmuvapckccr", model.accessRules().get(0).name()); - Assertions.assertEquals("weyoxoy", model.accessRules().get(0).type()); + Assertions.assertEquals("fuarenlvhht", model.name()); + Assertions.assertEquals("nvnaf", model.accessRulesVersion()); + Assertions.assertEquals("f", model.accessRules().get(0).fullyQualifiedArmId()); + Assertions.assertEquals("ev", model.accessRules().get(0).name()); + Assertions.assertEquals("oslc", model.accessRules().get(0).type()); Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, model.accessRules().get(0).direction()); - Assertions.assertEquals("immoiroqboshbrag", model.accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("ppdbwnupgahxkum", model.accessRules().get(0).subscriptions().get(0).id()); - Assertions.assertEquals("pvufhbze", model.accessRules().get(0).networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("whoqhnlbqnbldxe", + Assertions.assertEquals("khminqcymc", model.accessRules().get(0).addressPrefixes().get(0)); + Assertions.assertEquals("mflhuytxzvtznapx", model.accessRules().get(0).subscriptions().get(0).id()); + Assertions.assertEquals("o", model.accessRules().get(0).networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("oxczytp", model.accessRules().get(0).networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("lgsc", model.accessRules().get(0).networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("rfsiowlkjxn", model.accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("oafcluqvox", model.accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("jimryvwgcwwpbmz", model.accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("bmoichd", model.diagnosticSettingsVersion()); - Assertions.assertEquals("fpubntnbatz", model.enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationProfile model - = new NetworkSecurityPerimeterConfigurationProfile().withName("cyknapqofyuicd") - .withAccessRulesVersion("bd") - .withAccessRules( - Arrays.asList( - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("gbdvibidmhmwff") - .withName("fmuvapckccr") - .withType("weyoxoy") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("immoiroqboshbrag", "pyyrmfs", "bpav")) - .withSubscriptions(Arrays.asList( - new NetworkSecurityPerimeterSubscription().withId("ppdbwnupgahxkum"), - new NetworkSecurityPerimeterSubscription().withId("jcaacfdmmcpugm"))) - .withNetworkSecurityPerimeters(Arrays.asList( - new NetworkSecurityPerimeterInfo().withId("pvufhbze") - .withPerimeterGuid("whoqhnlbqnbldxe") - .withLocation("lgsc"), - new NetworkSecurityPerimeterInfo().withId("ri") - .withPerimeterGuid("rsrrmoucsofldp") - .withLocation("iyfc"), - new NetworkSecurityPerimeterInfo() - .withId("beolh") - .withPerimeterGuid("lvbmxuqibsxtkcu") - .withLocation("b"))) - .withFullyQualifiedDomainNames(Arrays.asList("rfsiowlkjxn", "pvwgfstmhqykizmd")) - .withEmailAddresses(Arrays.asList("oafcluqvox")) - .withPhoneNumbers(Arrays.asList("jimryvwgcwwpbmz", "w", "sydsxwefohe", "bvopwndyqle")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("lklmtkhlo") - .withName("x") - .withType("vbrdfjmzsyzfho") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("yych", "nsjlpjrtws", "hv")) - .withSubscriptions( - Arrays.asList(new NetworkSecurityPerimeterSubscription().withId("phvtrrmhwrb"), - new NetworkSecurityPerimeterSubscription().withId("pyf"), - new NetworkSecurityPerimeterSubscription().withId("bhvjglr"))) - .withNetworkSecurityPerimeters(Arrays.asList( - new NetworkSecurityPerimeterInfo().withId("zlwhhmemhooclu") - .withPerimeterGuid("pqmem") - .withLocation("jk"), - new NetworkSecurityPerimeterInfo().withId("ykyujxsg") - .withPerimeterGuid("srrryejylmbkzu") - .withLocation("igrfihotjewl"))) - .withFullyQualifiedDomainNames(Arrays.asList("zzjgnr", "fqyhqoto", "hiqakydiwfbrk")) - .withEmailAddresses(Arrays.asList("dqtvhcsp")) - .withPhoneNumbers(Arrays.asList("qaxsipietgbebjf")))) - .withDiagnosticSettingsVersion("bmoichd") - .withEnabledLogCategories(Arrays.asList("fpubntnbatz", "iqsowsaaelc", "ttcjuhplrvkmjc")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationProfile.class); - Assertions.assertEquals("cyknapqofyuicd", model.name()); - Assertions.assertEquals("bd", model.accessRulesVersion()); - Assertions.assertEquals("gbdvibidmhmwff", model.accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("fmuvapckccr", model.accessRules().get(0).name()); - Assertions.assertEquals("weyoxoy", model.accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, - model.accessRules().get(0).direction()); - Assertions.assertEquals("immoiroqboshbrag", model.accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("ppdbwnupgahxkum", model.accessRules().get(0).subscriptions().get(0).id()); - Assertions.assertEquals("pvufhbze", model.accessRules().get(0).networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("whoqhnlbqnbldxe", - model.accessRules().get(0).networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("lgsc", model.accessRules().get(0).networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("rfsiowlkjxn", model.accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("oafcluqvox", model.accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("jimryvwgcwwpbmz", model.accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("bmoichd", model.diagnosticSettingsVersion()); - Assertions.assertEquals("fpubntnbatz", model.enabledLogCategories().get(0)); + Assertions.assertEquals("nwvroevytlyokrr", + model.accessRules().get(0).networkSecurityPerimeters().get(0).location()); + Assertions.assertEquals("kml", model.accessRules().get(0).fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("xliohrdddt", model.accessRules().get(0).emailAddresses().get(0)); + Assertions.assertEquals("qcy", model.accessRules().get(0).phoneNumbers().get(0)); + Assertions.assertEquals("dsxwefoh", model.diagnosticSettingsVersion()); + Assertions.assertEquals("vopwndyqleallk", 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 index a977b5f3731d8..9c054bd29d197 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -10,163 +10,42 @@ import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigProvisioningState; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueSeverity; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssueType; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationIssues; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterConfigurationProfile; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterInfo; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRule; import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterProfileAccessRuleDirection; -import com.azure.resourcemanager.eventgrid.models.NetworkSecurityPerimeterSubscription; -import com.azure.resourcemanager.eventgrid.models.ResourceAssociation; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NetworkSecurityPerimeterConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"provisioningIssues\":[{\"name\":\"xwrsnew\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"bqmamhsycxhxzgaz\",\"suggestedResourceIds\":[\"boi\"],\"suggestedAccessRules\":[\"fqhppubowsep\",\"fgkmtdhern\",\"btcjuah\"]}},{\"name\":\"qtobkauxo\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"pnulaiywzej\",\"suggestedResourceIds\":[\"slwkojpl\"],\"suggestedAccessRules\":[\"npdwr\",\"qafgfugsnnfhyet\",\"fypococtfjgti\"]}}],\"networkSecurityPerimeter\":{\"id\":\"vzuyturmlmu\",\"perimeterGuid\":\"olbauirop\",\"location\":\"nszonwpngaj\"},\"resourceAssociation\":{\"name\":\"ixjawrtm\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"ccxlzhcoxovnek\",\"accessRulesVersion\":\"nlusfnrd\",\"accessRules\":[{\"fullyQualifiedArmId\":\"xrdcqtj\",\"name\":\"dt\",\"type\":\"epu\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cvuwkasiz\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"htuqfecjxe\",\"gtuhxuicbu\",\"wmrswnjlxuzrh\"],\"emailAddresses\":[\"sxjb\",\"qehgpd\",\"hzjqatucoige\"],\"phoneNumbers\":[\"cnwfepbnwgfmxjg\",\"g\",\"jbgdlfgtdysnaquf\"]}},{\"fullyQualifiedArmId\":\"bctqhamzjrwd\",\"name\":\"zeqyjleziun\",\"type\":\"dfzantkwcegy\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"eqacjjvpilguooq\",\"agmdit\",\"ueio\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"rtdtpdelq\",\"cslmotoebnfxo\",\"vcjkgd\"],\"emailAddresses\":[\"zft\",\"ejwabmdujtmvco\",\"excmjurbuhhl\",\"yqltqsro\"],\"phoneNumbers\":[\"wkffdjkt\",\"ysidfvclgl\",\"n\",\"uijtkbu\"]}},{\"fullyQualifiedArmId\":\"ogsf\",\"name\":\"ayiansharujtji\",\"type\":\"fzyjqt\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"hjpenuygbq\",\"qqekewvnqvcdlgu\",\"ucmfdj\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"njqikcz\"],\"emailAddresses\":[\"tacgxmfc\",\"serxht\",\"soxhlwntsjgqr\",\"xypruuuy\"],\"phoneNumbers\":[\"hrszi\",\"oyuelyetn\"]}},{\"fullyQualifiedArmId\":\"bf\",\"name\":\"ggagfln\",\"type\":\"mtrwah\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"tb\",\"r\",\"lrohkpig\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"zmkw\",\"lsnoxaxmqeqalh\",\"jnhgwydyyn\",\"svkhgbv\"],\"emailAddresses\":[\"narfdlpukhpyrn\",\"izjcpeog\",\"hnmgbroux\",\"dbhfhp\"],\"phoneNumbers\":[\"zjzoywjxhpdul\",\"ntacn\"]}}],\"diagnosticSettingsVersion\":\"w\",\"enabledLogCategories\":[\"tuevrh\",\"ljyoogwx\",\"nsduugwbsre\"]}}") + "{\"provisioningState\":\"Updating\",\"provisioningIssues\":[{\"name\":\"ic\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"wnjlxu\",\"suggestedResourceIds\":[\"wpusxjbaqehg\",\"dohzjq\"],\"suggestedAccessRules\":[\"coi\",\"e\"]}}],\"networkSecurityPerimeter\":{\"id\":\"cnwfepbnwgfmxjg\",\"perimeterGuid\":\"bjb\",\"location\":\"lfgtdysnaquflqbc\"},\"resourceAssociation\":{\"name\":\"amz\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"qzeqyjleziunjxdf\",\"accessRulesVersion\":\"ntkwcegy\",\"accessRules\":[{\"fullyQualifiedArmId\":\"nseqacjjvp\",\"name\":\"guooqjagmdit\",\"type\":\"eiookjbsah\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"elqacslmot\",\"ebnfxofvc\",\"k\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"txejwabm\"],\"emailAddresses\":[\"tmvcop\",\"xcmjurbu\"],\"phoneNumbers\":[\"kyqltqsrogt\",\"wkffdjkt\",\"ysidfvclgl\"]}},{\"fullyQualifiedArmId\":\"fuijtkbus\",\"name\":\"gsfikayiansha\",\"type\":\"jtjiqx\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"tvwkpqhjpenu\",\"gbqe\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"n\",\"vcdlg\"],\"emailAddresses\":[\"cmfdjwnlax\",\"un\"],\"phoneNumbers\":[\"kczvvita\",\"gx\",\"fcsserxhtvsox\",\"lwntsjgqrs\"]}}],\"diagnosticSettingsVersion\":\"p\",\"enabledLogCategories\":[\"u\",\"bnchrsziz\",\"yuel\"]}}") .toObject(NetworkSecurityPerimeterConfigurationProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals("xwrsnew", model.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE, + Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.UPDATING, model.provisioningState()); + Assertions.assertEquals("ic", model.provisioningIssues().get(0).name()); + Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, model.provisioningIssues().get(0).issueType()); Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, model.provisioningIssues().get(0).severity()); - Assertions.assertEquals("bqmamhsycxhxzgaz", model.provisioningIssues().get(0).description()); - Assertions.assertEquals("boi", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("fqhppubowsep", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("vzuyturmlmu", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("olbauirop", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("nszonwpngaj", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("ixjawrtm", model.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, + Assertions.assertEquals("wnjlxu", model.provisioningIssues().get(0).description()); + Assertions.assertEquals("wpusxjbaqehg", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); + Assertions.assertEquals("coi", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); + Assertions.assertEquals("cnwfepbnwgfmxjg", model.networkSecurityPerimeter().id()); + Assertions.assertEquals("bjb", model.networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("lfgtdysnaquflqbc", model.networkSecurityPerimeter().location()); + Assertions.assertEquals("amz", model.resourceAssociation().name()); + Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.LEARNING, model.resourceAssociation().accessMode()); - Assertions.assertEquals("ccxlzhcoxovnek", model.profile().name()); - Assertions.assertEquals("nlusfnrd", model.profile().accessRulesVersion()); - Assertions.assertEquals("xrdcqtj", model.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("dt", model.profile().accessRules().get(0).name()); - Assertions.assertEquals("epu", model.profile().accessRules().get(0).type()); + Assertions.assertEquals("qzeqyjleziunjxdf", model.profile().name()); + Assertions.assertEquals("ntkwcegy", model.profile().accessRulesVersion()); + Assertions.assertEquals("nseqacjjvp", model.profile().accessRules().get(0).fullyQualifiedArmId()); + Assertions.assertEquals("guooqjagmdit", model.profile().accessRules().get(0).name()); + Assertions.assertEquals("eiookjbsah", model.profile().accessRules().get(0).type()); Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, model.profile().accessRules().get(0).direction()); - Assertions.assertEquals("cvuwkasiz", model.profile().accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("htuqfecjxe", model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("sxjb", model.profile().accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("cnwfepbnwgfmxjg", model.profile().accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("w", model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("tuevrh", model.profile().enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationProperties model - = new NetworkSecurityPerimeterConfigurationProperties() - .withProvisioningState(NetworkSecurityPerimeterConfigProvisioningState.FAILED) - .withProvisioningIssues( - Arrays.asList( - new NetworkSecurityPerimeterConfigurationIssues().withName("xwrsnew") - .withIssueType( - NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR) - .withDescription("bqmamhsycxhxzgaz") - .withSuggestedResourceIds(Arrays.asList("boi")) - .withSuggestedAccessRules(Arrays.asList("fqhppubowsep", "fgkmtdhern", "btcjuah")), - new NetworkSecurityPerimeterConfigurationIssues().withName("qtobkauxo") - .withIssueType( - NetworkSecurityPerimeterConfigurationIssueType.MISSING_IDENTITY_CONFIGURATION) - .withSeverity(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR) - .withDescription("pnulaiywzej") - .withSuggestedResourceIds(Arrays.asList("slwkojpl")) - .withSuggestedAccessRules(Arrays.asList("npdwr", "qafgfugsnnfhyet", "fypococtfjgti")))) - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeterInfo().withId("vzuyturmlmu") - .withPerimeterGuid("olbauirop") - .withLocation("nszonwpngaj")) - .withResourceAssociation(new ResourceAssociation() - .withName("ixjawrtm") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.AUDIT)) - .withProfile(new NetworkSecurityPerimeterConfigurationProfile().withName("ccxlzhcoxovnek") - .withAccessRulesVersion("nlusfnrd") - .withAccessRules(Arrays.asList( - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("xrdcqtj") - .withName("dt") - .withType("epu") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("cvuwkasiz")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription(), new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters( - Arrays.asList(new NetworkSecurityPerimeterInfo(), new NetworkSecurityPerimeterInfo(), - new NetworkSecurityPerimeterInfo(), new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("htuqfecjxe", "gtuhxuicbu", "wmrswnjlxuzrh")) - .withEmailAddresses(Arrays.asList("sxjb", "qehgpd", "hzjqatucoige")) - .withPhoneNumbers(Arrays.asList("cnwfepbnwgfmxjg", "g", "jbgdlfgtdysnaquf")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("bctqhamzjrwd") - .withName("zeqyjleziun") - .withType("dfzantkwcegy") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("eqacjjvpilguooq", "agmdit", "ueio")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription(), new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo(), - new NetworkSecurityPerimeterInfo(), new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("rtdtpdelq", "cslmotoebnfxo", "vcjkgd")) - .withEmailAddresses(Arrays.asList("zft", "ejwabmdujtmvco", "excmjurbuhhl", "yqltqsro")) - .withPhoneNumbers(Arrays.asList("wkffdjkt", "ysidfvclgl", "n", "uijtkbu")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("ogsf") - .withName("ayiansharujtji") - .withType("fzyjqt") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("hjpenuygbq", "qqekewvnqvcdlgu", "ucmfdj")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters( - Arrays.asList(new NetworkSecurityPerimeterInfo(), new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames(Arrays.asList("njqikcz")) - .withEmailAddresses(Arrays.asList("tacgxmfc", "serxht", "soxhlwntsjgqr", "xypruuuy")) - .withPhoneNumbers(Arrays.asList("hrszi", "oyuelyetn")), - new NetworkSecurityPerimeterProfileAccessRule().withFullyQualifiedArmId("bf") - .withName("ggagfln") - .withType("mtrwah") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("tb", "r", "lrohkpig")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription(), new NetworkSecurityPerimeterSubscription(), - new NetworkSecurityPerimeterSubscription())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo())) - .withFullyQualifiedDomainNames( - Arrays.asList("zmkw", "lsnoxaxmqeqalh", "jnhgwydyyn", "svkhgbv")) - .withEmailAddresses(Arrays.asList("narfdlpukhpyrn", "izjcpeog", "hnmgbroux", "dbhfhp")) - .withPhoneNumbers(Arrays.asList("zjzoywjxhpdul", "ntacn")))) - .withDiagnosticSettingsVersion("w") - .withEnabledLogCategories(Arrays.asList("tuevrh", "ljyoogwx", "nsduugwbsre"))); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.FAILED, model.provisioningState()); - Assertions.assertEquals("xwrsnew", model.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE, - model.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, - model.provisioningIssues().get(0).severity()); - Assertions.assertEquals("bqmamhsycxhxzgaz", model.provisioningIssues().get(0).description()); - Assertions.assertEquals("boi", model.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("fqhppubowsep", model.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("vzuyturmlmu", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("olbauirop", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("nszonwpngaj", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("ixjawrtm", model.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, - model.resourceAssociation().accessMode()); - Assertions.assertEquals("ccxlzhcoxovnek", model.profile().name()); - Assertions.assertEquals("nlusfnrd", model.profile().accessRulesVersion()); - Assertions.assertEquals("xrdcqtj", model.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("dt", model.profile().accessRules().get(0).name()); - Assertions.assertEquals("epu", model.profile().accessRules().get(0).type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, - model.profile().accessRules().get(0).direction()); - Assertions.assertEquals("cvuwkasiz", model.profile().accessRules().get(0).addressPrefixes().get(0)); - Assertions.assertEquals("htuqfecjxe", model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("sxjb", model.profile().accessRules().get(0).emailAddresses().get(0)); - Assertions.assertEquals("cnwfepbnwgfmxjg", model.profile().accessRules().get(0).phoneNumbers().get(0)); - Assertions.assertEquals("w", model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("tuevrh", model.profile().enabledLogCategories().get(0)); + Assertions.assertEquals("elqacslmot", model.profile().accessRules().get(0).addressPrefixes().get(0)); + Assertions.assertEquals("txejwabm", model.profile().accessRules().get(0).fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("tmvcop", model.profile().accessRules().get(0).emailAddresses().get(0)); + Assertions.assertEquals("kyqltqsrogt", model.profile().accessRules().get(0).phoneNumbers().get(0)); + Assertions.assertEquals("p", model.profile().diagnosticSettingsVersion()); + Assertions.assertEquals("u", 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 index 785f904097fd5..78e9dafa0fd93 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -26,7 +26,7 @@ public final class NetworkSecurityPerimeterConfigurationsGetWithResponseMockTest @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"provisioningIssues\":[{\"name\":\"kegtyc\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"lzmiyddeeq\",\"suggestedResourceIds\":[\"abm\"],\"suggestedAccessRules\":[\"exduetbapfczew\"]}},{\"name\":\"rlqbpxyazkjpir\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"wh\",\"suggestedResourceIds\":[\"bthmsritj\"],\"suggestedAccessRules\":[\"ggrunozfvualjt\",\"oivsdwsngkrf\"]}},{\"name\":\"sc\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"bhwahfbwih\",\"suggestedResourceIds\":[\"x\"],\"suggestedAccessRules\":[\"ynuqqkotauratnic\",\"pfzsclefyrl\",\"tndqlmf\",\"ggnbbuypwovvvsfl\"]}},{\"name\":\"vnoqayrehju\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"lzhpzihacenq\",\"suggestedResourceIds\":[\"xnq\",\"ubfonfdbgmkf\",\"mjcwtewfhxwyrkbr\",\"hzlrynjpchamkae\"],\"suggestedAccessRules\":[\"ajubo\",\"uywevtjrieikmwl\",\"oklf\",\"isyxgucbmtredsc\"]}}],\"networkSecurityPerimeter\":{\"id\":\"tjcyyuv\",\"perimeterGuid\":\"rx\",\"location\":\"cl\"},\"resourceAssociation\":{\"name\":\"wtzqzcloyhy\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"hzgyresgzsd\",\"accessRulesVersion\":\"wbyorjplbchych\",\"accessRules\":[{\"fullyQualifiedArmId\":\"rfbqvumkxqjsiuep\",\"name\":\"xfnzlpq\",\"type\":\"ft\",\"properties\":{}},{\"fullyQualifiedArmId\":\"vulb\",\"name\":\"rtux\",\"type\":\"rhfcaeooifqdyw\",\"properties\":{}},{\"fullyQualifiedArmId\":\"obhahqmomf\",\"name\":\"o\",\"type\":\"fr\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"bmx\",\"enabledLogCategories\":[\"mzezbjesylslu\"]}},\"id\":\"bqfy\",\"name\":\"pnyh\",\"type\":\"dzuqscag\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"provisioningIssues\":[{\"name\":\"okh\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"rnggcjfw\",\"suggestedResourceIds\":[\"hxkasmc\"],\"suggestedAccessRules\":[\"ugp\",\"vaos\"]}},{\"name\":\"l\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"zvtyevjhubn\",\"suggestedResourceIds\":[\"uqisqsqkpd\",\"ioyj\",\"nmlvi\",\"cpszpmcvqdvrdmv\"],\"suggestedAccessRules\":[\"xdhgvqojbxaotc\",\"bzxmbtplefoio\"]}},{\"name\":\"doxzn\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"uvda\",\"suggestedResourceIds\":[\"mrszbknimxlpnerx\",\"zutylcu\",\"za\",\"mnb\"],\"suggestedAccessRules\":[\"ehtd\",\"jmbnvynf\"]}},{\"name\":\"oeactedcglskakdd\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"rqm\",\"suggestedResourceIds\":[\"byx\",\"oiduyqypff\",\"noiicsu\"],\"suggestedAccessRules\":[\"brjjtalxrdsjr\"]}}],\"networkSecurityPerimeter\":{\"id\":\"uqwg\",\"perimeterGuid\":\"xxhdodpjwybl\",\"location\":\"bdmvsby\"},\"resourceAssociation\":{\"name\":\"elqpvekmk\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"tlo\",\"accessRulesVersion\":\"dusxurs\",\"accessRules\":[{\"fullyQualifiedArmId\":\"xcjkcoqwczsy\",\"name\":\"rizfwihvaang\",\"type\":\"nhjrfdmfd\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"aexxjfwtgdfkka\",\"enabledLogCategories\":[\"vmuafmc\",\"fedyuep\",\"vpltidajjvy\"]}},\"id\":\"ocfkumcfjxoky\",\"name\":\"lsyasv\",\"type\":\"nkwmygjj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,31 +36,31 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() - .getWithResponse("hdcfm", NetworkSecurityPerimeterResourceType.TOPICS, "cfasfodropal", "ngtwyuskwgq", - "ntaumd", com.azure.core.util.Context.NONE) + .getWithResponse("klvqzrwtrdgscn", NetworkSecurityPerimeterResourceType.TOPICS, "eonsgnwx", "wmezyohxp", + "hceopvkvtwf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.CREATING, response.provisioningState()); - Assertions.assertEquals("kegtyc", response.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE, + Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.CANCELED, response.provisioningState()); + Assertions.assertEquals("okh", response.provisioningIssues().get(0).name()); + Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, response.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING, + Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, response.provisioningIssues().get(0).severity()); - Assertions.assertEquals("lzmiyddeeq", response.provisioningIssues().get(0).description()); - Assertions.assertEquals("abm", response.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("exduetbapfczew", response.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("tjcyyuv", response.networkSecurityPerimeter().id()); - Assertions.assertEquals("rx", response.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("cl", response.networkSecurityPerimeter().location()); - Assertions.assertEquals("wtzqzcloyhy", response.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED, + Assertions.assertEquals("rnggcjfw", response.provisioningIssues().get(0).description()); + Assertions.assertEquals("hxkasmc", response.provisioningIssues().get(0).suggestedResourceIds().get(0)); + Assertions.assertEquals("ugp", response.provisioningIssues().get(0).suggestedAccessRules().get(0)); + Assertions.assertEquals("uqwg", response.networkSecurityPerimeter().id()); + Assertions.assertEquals("xxhdodpjwybl", response.networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("bdmvsby", response.networkSecurityPerimeter().location()); + Assertions.assertEquals("elqpvekmk", response.resourceAssociation().name()); + Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, response.resourceAssociation().accessMode()); - Assertions.assertEquals("hzgyresgzsd", response.profile().name()); - Assertions.assertEquals("wbyorjplbchych", response.profile().accessRulesVersion()); - Assertions.assertEquals("rfbqvumkxqjsiuep", response.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("xfnzlpq", response.profile().accessRules().get(0).name()); - Assertions.assertEquals("ft", response.profile().accessRules().get(0).type()); - Assertions.assertEquals("bmx", response.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("mzezbjesylslu", response.profile().enabledLogCategories().get(0)); + Assertions.assertEquals("tlo", response.profile().name()); + Assertions.assertEquals("dusxurs", response.profile().accessRulesVersion()); + Assertions.assertEquals("xcjkcoqwczsy", response.profile().accessRules().get(0).fullyQualifiedArmId()); + Assertions.assertEquals("rizfwihvaang", response.profile().accessRules().get(0).name()); + Assertions.assertEquals("nhjrfdmfd", response.profile().accessRules().get(0).type()); + Assertions.assertEquals("aexxjfwtgdfkka", response.profile().diagnosticSettingsVersion()); + Assertions.assertEquals("vmuafmc", 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 index 92dec0fa29325..8b5e1afc9eb5a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public final class NetworkSecurityPerimeterConfigurationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"provisioningIssues\":[{\"name\":\"dkxbq\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"fdxbvwfqjchiv\",\"suggestedResourceIds\":[\"j\"],\"suggestedAccessRules\":[\"ndmuvardlmz\",\"otprrmuhcuhtu\"]}},{\"name\":\"xiwy\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"ctwrapcz\",\"suggestedResourceIds\":[\"qyvzesipiysnjq\",\"owa\",\"dcndazabun\"],\"suggestedAccessRules\":[\"ewkaupwhl\"]}}],\"networkSecurityPerimeter\":{\"id\":\"kremgjl\",\"perimeterGuid\":\"vdorsirx\",\"location\":\"yrkqa\"},\"resourceAssociation\":{\"name\":\"ajfreprfvmkin\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"qshixbc\",\"accessRulesVersion\":\"opylbl\",\"accessRules\":[{\"fullyQualifiedArmId\":\"r\",\"name\":\"spimtcvvf\",\"type\":\"dytzf\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"izhqikmgobl\",\"enabledLogCategories\":[\"mcdiiisk\"]}},\"id\":\"bonxxupj\",\"name\":\"vtrkfkg\",\"type\":\"njqnnpjwkosny\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"provisioningIssues\":[{\"name\":\"k\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Warning\",\"description\":\"mzoonsvobchkxfpw\",\"suggestedResourceIds\":[\"sl\"],\"suggestedAccessRules\":[\"glmnnk\",\"wayqshwyqxrid\",\"tb\",\"aqjmkgxqwque\"]}}],\"networkSecurityPerimeter\":{\"id\":\"lztpziizevjykof\",\"perimeterGuid\":\"zefkhkqtwqlepjj\",\"location\":\"c\"},\"resourceAssociation\":{\"name\":\"wz\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"ffjwajnr\",\"accessRulesVersion\":\"zvaqkifmxawost\",\"accessRules\":[{\"fullyQualifiedArmId\":\"hrkmjqncfv\",\"name\":\"cnhemvwfnq\",\"type\":\"ypvndrw\",\"properties\":{}},{\"fullyQualifiedArmId\":\"dtggrssg\",\"name\":\"fk\",\"type\":\"njm\",\"properties\":{}},{\"fullyQualifiedArmId\":\"vecvzts\",\"name\":\"gmusaictdscnkzzo\",\"type\":\"rddclzeqozrehlb\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"xbnjrqvzyuexoz\",\"enabledLogCategories\":[\"npameudpabcreu\"]}},\"id\":\"osgyj\",\"name\":\"vcva\",\"type\":\"ormrexzv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,33 +37,36 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkSecurityPerimeterConfigurations() - .list("zmzivrtrfzhhez", NetworkSecurityPerimeterResourceType.TOPICS, "judxdyyrud", + .list("krknf", NetworkSecurityPerimeterResourceType.DOMAINS, "ugjqyckgtxkrdt", com.azure.core.util.Context.NONE); - Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.DELETING, + Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.CREATING, response.iterator().next().provisioningState()); - Assertions.assertEquals("dkxbq", response.iterator().next().provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.CONFIGURATION_PROPAGATION_FAILURE, + Assertions.assertEquals("k", 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("fdxbvwfqjchiv", response.iterator().next().provisioningIssues().get(0).description()); - Assertions.assertEquals("j", + Assertions.assertEquals("mzoonsvobchkxfpw", + response.iterator().next().provisioningIssues().get(0).description()); + Assertions.assertEquals("sl", response.iterator().next().provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("ndmuvardlmz", + Assertions.assertEquals("glmnnk", response.iterator().next().provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("kremgjl", response.iterator().next().networkSecurityPerimeter().id()); - Assertions.assertEquals("vdorsirx", response.iterator().next().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("yrkqa", response.iterator().next().networkSecurityPerimeter().location()); - Assertions.assertEquals("ajfreprfvmkin", response.iterator().next().resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.LEARNING, + Assertions.assertEquals("lztpziizevjykof", response.iterator().next().networkSecurityPerimeter().id()); + Assertions.assertEquals("zefkhkqtwqlepjj", + response.iterator().next().networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("c", response.iterator().next().networkSecurityPerimeter().location()); + Assertions.assertEquals("wz", response.iterator().next().resourceAssociation().name()); + Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, response.iterator().next().resourceAssociation().accessMode()); - Assertions.assertEquals("qshixbc", response.iterator().next().profile().name()); - Assertions.assertEquals("opylbl", response.iterator().next().profile().accessRulesVersion()); - Assertions.assertEquals("r", response.iterator().next().profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("spimtcvvf", response.iterator().next().profile().accessRules().get(0).name()); - Assertions.assertEquals("dytzf", response.iterator().next().profile().accessRules().get(0).type()); - Assertions.assertEquals("izhqikmgobl", response.iterator().next().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("mcdiiisk", response.iterator().next().profile().enabledLogCategories().get(0)); + Assertions.assertEquals("ffjwajnr", response.iterator().next().profile().name()); + Assertions.assertEquals("zvaqkifmxawost", response.iterator().next().profile().accessRulesVersion()); + Assertions.assertEquals("hrkmjqncfv", + response.iterator().next().profile().accessRules().get(0).fullyQualifiedArmId()); + Assertions.assertEquals("cnhemvwfnq", response.iterator().next().profile().accessRules().get(0).name()); + Assertions.assertEquals("ypvndrw", response.iterator().next().profile().accessRules().get(0).type()); + Assertions.assertEquals("xbnjrqvzyuexoz", response.iterator().next().profile().diagnosticSettingsVersion()); + Assertions.assertEquals("npameudpabcreu", 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 index 5af889973a6e1..a5af6f4c12577 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -26,7 +26,7 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileMockTests { @Test public void testReconcile() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"zluczdq\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Warning\",\"description\":\"vhvzielbprnqu\",\"suggestedResourceIds\":[\"zcqyg\",\"mnwsvh\"],\"suggestedAccessRules\":[\"qiwy\",\"jtobdrrp\"]}},{\"name\":\"ehkuns\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"tpkvegeattbzkgtz\",\"suggestedResourceIds\":[\"qsttewuvcysjeuf\",\"x\",\"lpditfnonpi\"],\"suggestedAccessRules\":[\"lvrhprrvbwonleq\",\"lvtlrvbst\",\"huy\",\"uninttlnrjdszd\"]}}],\"networkSecurityPerimeter\":{\"id\":\"iciqppo\",\"perimeterGuid\":\"gpnewuhwfwjnox\",\"location\":\"xtfnress\"},\"resourceAssociation\":{\"name\":\"gckncjmg\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"tqdx\",\"accessRulesVersion\":\"jymjnhjluq\",\"accessRules\":[{\"fullyQualifiedArmId\":\"upubdxckdlhz\",\"name\":\"cu\",\"type\":\"bosjjfd\",\"properties\":{}},{\"fullyQualifiedArmId\":\"rjqfyaytvslyekcg\",\"name\":\"uarlcjiwgsxfaioc\",\"type\":\"gujjgn\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"zxbarcbpae\",\"enabledLogCategories\":[\"sym\"]}},\"id\":\"w\",\"name\":\"njcytesmfucrtfod\",\"type\":\"hua\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"mclngygnhrko\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"dopg\",\"suggestedResourceIds\":[\"wj\",\"qtrotpvclp\",\"fyrlmwkptskwxj\"],\"suggestedAccessRules\":[\"xccb\",\"kakmkookbputmgvm\",\"yakmlwktf\"]}},{\"name\":\"zkroyrdur\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"m\",\"suggestedResourceIds\":[\"gzjxxlf\"],\"suggestedAccessRules\":[\"zuqloiwyayyzivr\",\"itcdqlhchwhrk\",\"jlei\",\"ibfiplhxfnsm\"]}},{\"name\":\"jow\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"dsqcmhnxl\",\"suggestedResourceIds\":[\"wodmachbkvnr\"],\"suggestedAccessRules\":[\"rmvgoqplehmumkz\"]}},{\"name\":\"lczdprwnh\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Warning\",\"description\":\"sstciv\",\"suggestedResourceIds\":[\"frrynjcwmhl\",\"mgnukxrke\"],\"suggestedAccessRules\":[\"equlrlz\",\"udgjtfb\",\"lakkucddwnhcz\",\"utoucgjt\"]}}],\"networkSecurityPerimeter\":{\"id\":\"way\",\"perimeterGuid\":\"cqqwwvgwkslvlize\",\"location\":\"biabvnsrgekz\"},\"resourceAssociation\":{\"name\":\"adyfhbmwkho\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"spvkhglaqjsgyz\",\"accessRulesVersion\":\"uj\",\"accessRules\":[{\"fullyQualifiedArmId\":\"kn\",\"name\":\"d\",\"type\":\"duyehiiitt\",\"properties\":{}}],\"diagnosticSettingsVersion\":\"uqwr\",\"enabledLogCategories\":[\"xurfqazcsozjvx\"]}},\"id\":\"ciggbnvtxof\",\"name\":\"alzyxwhoeamo\",\"type\":\"obdoey\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,31 +36,31 @@ public void testReconcile() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() - .reconcile("yvouprsytq", NetworkSecurityPerimeterResourceType.TOPICS, "slhmgw", "nivrxpfduio", "hgyqvpbfj", + .reconcile("ubewgzygba", NetworkSecurityPerimeterResourceType.TOPICS, "vecovsdqhzr", "dbakr", "imzfvpp", com.azure.core.util.Context.NONE); Assertions.assertEquals(NetworkSecurityPerimeterConfigProvisioningState.SUCCEEDED, response.provisioningState()); - Assertions.assertEquals("zluczdq", response.provisioningIssues().get(0).name()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.OTHER, + Assertions.assertEquals("mclngygnhrko", response.provisioningIssues().get(0).name()); + Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueType.MISSING_PERIMETER_CONFIGURATION, response.provisioningIssues().get(0).issueType()); - Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.WARNING, + Assertions.assertEquals(NetworkSecurityPerimeterConfigurationIssueSeverity.ERROR, response.provisioningIssues().get(0).severity()); - Assertions.assertEquals("vhvzielbprnqu", response.provisioningIssues().get(0).description()); - Assertions.assertEquals("zcqyg", response.provisioningIssues().get(0).suggestedResourceIds().get(0)); - Assertions.assertEquals("qiwy", response.provisioningIssues().get(0).suggestedAccessRules().get(0)); - Assertions.assertEquals("iciqppo", response.networkSecurityPerimeter().id()); - Assertions.assertEquals("gpnewuhwfwjnox", response.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("xtfnress", response.networkSecurityPerimeter().location()); - Assertions.assertEquals("gckncjmg", response.resourceAssociation().name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.LEARNING, + Assertions.assertEquals("dopg", response.provisioningIssues().get(0).description()); + Assertions.assertEquals("wj", response.provisioningIssues().get(0).suggestedResourceIds().get(0)); + Assertions.assertEquals("xccb", response.provisioningIssues().get(0).suggestedAccessRules().get(0)); + Assertions.assertEquals("way", response.networkSecurityPerimeter().id()); + Assertions.assertEquals("cqqwwvgwkslvlize", response.networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("biabvnsrgekz", response.networkSecurityPerimeter().location()); + Assertions.assertEquals("adyfhbmwkho", response.resourceAssociation().name()); + Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.AUDIT, response.resourceAssociation().accessMode()); - Assertions.assertEquals("tqdx", response.profile().name()); - Assertions.assertEquals("jymjnhjluq", response.profile().accessRulesVersion()); - Assertions.assertEquals("upubdxckdlhz", response.profile().accessRules().get(0).fullyQualifiedArmId()); - Assertions.assertEquals("cu", response.profile().accessRules().get(0).name()); - Assertions.assertEquals("bosjjfd", response.profile().accessRules().get(0).type()); - Assertions.assertEquals("zxbarcbpae", response.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("sym", response.profile().enabledLogCategories().get(0)); + Assertions.assertEquals("spvkhglaqjsgyz", response.profile().name()); + Assertions.assertEquals("uj", response.profile().accessRulesVersion()); + Assertions.assertEquals("kn", response.profile().accessRules().get(0).fullyQualifiedArmId()); + Assertions.assertEquals("d", response.profile().accessRules().get(0).name()); + Assertions.assertEquals("duyehiiitt", response.profile().accessRules().get(0).type()); + Assertions.assertEquals("uqwr", response.profile().diagnosticSettingsVersion()); + Assertions.assertEquals("xurfqazcsozjvx", 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 index c009dabe2d668..901fb5986e8aa 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,20 +12,10 @@ public final class NetworkSecurityPerimeterInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterInfo model - = BinaryData.fromString("{\"id\":\"pj\",\"perimeterGuid\":\"zxlioh\",\"location\":\"dd\"}") + = BinaryData.fromString("{\"id\":\"jxhpdulontacn\",\"perimeterGuid\":\"w\",\"location\":\"htuevrhrljy\"}") .toObject(NetworkSecurityPerimeterInfo.class); - Assertions.assertEquals("pj", model.id()); - Assertions.assertEquals("zxlioh", model.perimeterGuid()); - Assertions.assertEquals("dd", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterInfo model - = new NetworkSecurityPerimeterInfo().withId("pj").withPerimeterGuid("zxlioh").withLocation("dd"); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterInfo.class); - Assertions.assertEquals("pj", model.id()); - Assertions.assertEquals("zxlioh", model.perimeterGuid()); - Assertions.assertEquals("dd", model.location()); + Assertions.assertEquals("jxhpdulontacn", model.id()); + Assertions.assertEquals("w", model.perimeterGuid()); + Assertions.assertEquals("htuevrhrljy", 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 index 62dee126d3f58..5aedf3daaaeb4 100644 --- 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 @@ -1,68 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"Inbound\",\"addressPrefixes\":[\"phcnzqtpj\",\"mqrhvthl\",\"iwdcxsmlzzhzd\",\"xetlgydlhqv\"],\"subscriptions\":[{\"id\":\"xybafiqgea\"},{\"id\":\"bgj\"},{\"id\":\"glklb\"}],\"networkSecurityPerimeters\":[{\"id\":\"dw\",\"perimeterGuid\":\"vmzegj\",\"location\":\"fhjirwgdnqzbrfk\"},{\"id\":\"zhzmtksjci\",\"perimeterGuid\":\"igsxcdgljplk\",\"location\":\"acht\"},{\"id\":\"flrytswfpfm\",\"perimeterGuid\":\"ycxnmskw\",\"location\":\"jjyslurlps\"},{\"id\":\"kvp\",\"perimeterGuid\":\"wqslsrhmpqvw\",\"location\":\"kondcb\"}],\"fullyQualifiedDomainNames\":[\"muvqejosovyr\",\"leaesi\",\"uqtljqobbpih\",\"hcecybmrqbr\"],\"emailAddresses\":[\"mpxdlvy\",\"frexcrseqw\",\"ksghudgzhxogjgg\",\"voujkxibdafhrk\"],\"phoneNumbers\":[\"omkxf\",\"vfb\",\"dy\",\"rhpw\"]}") + "{\"direction\":\"Inbound\",\"addressPrefixes\":[\"tmvag\",\"w\"],\"subscriptions\":[{\"id\":\"vhuk\"}],\"networkSecurityPerimeters\":[{\"id\":\"fizr\",\"perimeterGuid\":\"f\",\"location\":\"jmvl\"},{\"id\":\"z\",\"perimeterGuid\":\"blkujrllfojuidjp\",\"location\":\"yjucejikzoeo\"}],\"fullyQualifiedDomainNames\":[\"zejet\",\"kl\",\"tikyj\"],\"emailAddresses\":[\"dbqzolxrzvhqjw\"],\"phoneNumbers\":[\"tgvgzp\"]}") .toObject(NetworkSecurityPerimeterProfileAccessRuleProperties.class); Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, model.direction()); - Assertions.assertEquals("phcnzqtpj", model.addressPrefixes().get(0)); - Assertions.assertEquals("xybafiqgea", model.subscriptions().get(0).id()); - Assertions.assertEquals("dw", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("vmzegj", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("fhjirwgdnqzbrfk", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("muvqejosovyr", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("mpxdlvy", model.emailAddresses().get(0)); - Assertions.assertEquals("omkxf", model.phoneNumbers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterProfileAccessRuleProperties model - = new NetworkSecurityPerimeterProfileAccessRuleProperties() - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("phcnzqtpj", "mqrhvthl", "iwdcxsmlzzhzd", "xetlgydlhqv")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription().withId("xybafiqgea"), - new NetworkSecurityPerimeterSubscription().withId("bgj"), - new NetworkSecurityPerimeterSubscription().withId("glklb"))) - .withNetworkSecurityPerimeters(Arrays.asList( - new NetworkSecurityPerimeterInfo().withId("dw") - .withPerimeterGuid("vmzegj") - .withLocation("fhjirwgdnqzbrfk"), - new NetworkSecurityPerimeterInfo().withId("zhzmtksjci") - .withPerimeterGuid("igsxcdgljplk") - .withLocation("acht"), - new NetworkSecurityPerimeterInfo().withId("flrytswfpfm") - .withPerimeterGuid("ycxnmskw") - .withLocation("jjyslurlps"), - new NetworkSecurityPerimeterInfo().withId("kvp") - .withPerimeterGuid("wqslsrhmpqvw") - .withLocation("kondcb"))) - .withFullyQualifiedDomainNames(Arrays.asList("muvqejosovyr", "leaesi", "uqtljqobbpih", "hcecybmrqbr")) - .withEmailAddresses(Arrays.asList("mpxdlvy", "frexcrseqw", "ksghudgzhxogjgg", "voujkxibdafhrk")) - .withPhoneNumbers(Arrays.asList("omkxf", "vfb", "dy", "rhpw")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterProfileAccessRuleProperties.class); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, model.direction()); - Assertions.assertEquals("phcnzqtpj", model.addressPrefixes().get(0)); - Assertions.assertEquals("xybafiqgea", model.subscriptions().get(0).id()); - Assertions.assertEquals("dw", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("vmzegj", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("fhjirwgdnqzbrfk", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("muvqejosovyr", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("mpxdlvy", model.emailAddresses().get(0)); - Assertions.assertEquals("omkxf", model.phoneNumbers().get(0)); + Assertions.assertEquals("tmvag", model.addressPrefixes().get(0)); + Assertions.assertEquals("vhuk", model.subscriptions().get(0).id()); + Assertions.assertEquals("fizr", model.networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("f", model.networkSecurityPerimeters().get(0).perimeterGuid()); + Assertions.assertEquals("jmvl", model.networkSecurityPerimeters().get(0).location()); + Assertions.assertEquals("zejet", model.fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("dbqzolxrzvhqjw", model.emailAddresses().get(0)); + Assertions.assertEquals("tgvgzp", 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 index bf44362180d25..a863517e5fba8 100644 --- 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 @@ -1,66 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"jvlgfggcvkyyliz\",\"name\":\"bjpsfxsfuztlvtm\",\"type\":\"gbwidqlvh\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"fizr\",\"jfnmjmvlwyz\",\"iblkujr\",\"lfojuidjp\"],\"subscriptions\":[{\"id\":\"ucejikzoeovvtz\"},{\"id\":\"et\"},{\"id\":\"ln\"}],\"networkSecurityPerimeters\":[{\"id\":\"juzkdbqz\",\"perimeterGuid\":\"xrzvhqjwtrhtgvgz\",\"location\":\"rrkolawjmjs\"}],\"fullyQualifiedDomainNames\":[\"okcdxfzzzwyjaf\",\"tlhguynuchl\",\"mltx\",\"whmozusgzvlnsnnj\"],\"emailAddresses\":[\"afolpymwamxqzrag\",\"gdphtvdula\"],\"phoneNumbers\":[\"ejchcsrlz\",\"nmzlanru\"]}}") + "{\"fullyQualifiedArmId\":\"h\",\"name\":\"cyychunsjlp\",\"type\":\"twszhvvuic\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"mhwrb\"],\"subscriptions\":[{\"id\":\"f\"}],\"networkSecurityPerimeters\":[{\"id\":\"vjglrocuyzlwhhme\",\"perimeterGuid\":\"ooclutnp\",\"location\":\"emc\"},{\"id\":\"kmmykyujxsglh\",\"perimeterGuid\":\"rryejylmbkzudnig\",\"location\":\"ihotjewlpxuzzjg\"}],\"fullyQualifiedDomainNames\":[\"fqyhqoto\",\"hiqakydiwfbrk\",\"pzdqtvhcspod\",\"qaxsipietgbebjf\"],\"emailAddresses\":[\"moichdlpnfpubntn\",\"atzviqsowsaael\"],\"phoneNumbers\":[\"tc\",\"uhplrvkmjcwmjv\",\"gfggcvkyylizrzbj\",\"sfxsf\"]}}") .toObject(NetworkSecurityPerimeterProfileAccessRule.class); - Assertions.assertEquals("jvlgfggcvkyyliz", model.fullyQualifiedArmId()); - Assertions.assertEquals("bjpsfxsfuztlvtm", model.name()); - Assertions.assertEquals("gbwidqlvh", model.type()); + Assertions.assertEquals("h", model.fullyQualifiedArmId()); + Assertions.assertEquals("cyychunsjlp", model.name()); + Assertions.assertEquals("twszhvvuic", model.type()); Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, model.direction()); - Assertions.assertEquals("fizr", model.addressPrefixes().get(0)); - Assertions.assertEquals("ucejikzoeovvtz", model.subscriptions().get(0).id()); - Assertions.assertEquals("juzkdbqz", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("xrzvhqjwtrhtgvgz", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("rrkolawjmjs", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("okcdxfzzzwyjaf", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("afolpymwamxqzrag", model.emailAddresses().get(0)); - Assertions.assertEquals("ejchcsrlz", model.phoneNumbers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterProfileAccessRule model = new NetworkSecurityPerimeterProfileAccessRule() - .withFullyQualifiedArmId("jvlgfggcvkyyliz") - .withName("bjpsfxsfuztlvtm") - .withType("gbwidqlvh") - .withDirection(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("fizr", "jfnmjmvlwyz", "iblkujr", "lfojuidjp")) - .withSubscriptions(Arrays.asList(new NetworkSecurityPerimeterSubscription().withId("ucejikzoeovvtz"), - new NetworkSecurityPerimeterSubscription().withId("et"), - new NetworkSecurityPerimeterSubscription().withId("ln"))) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeterInfo().withId("juzkdbqz") - .withPerimeterGuid("xrzvhqjwtrhtgvgz") - .withLocation("rrkolawjmjs"))) - .withFullyQualifiedDomainNames(Arrays.asList("okcdxfzzzwyjaf", "tlhguynuchl", "mltx", "whmozusgzvlnsnnj")) - .withEmailAddresses(Arrays.asList("afolpymwamxqzrag", "gdphtvdula")) - .withPhoneNumbers(Arrays.asList("ejchcsrlz", "nmzlanru")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterProfileAccessRule.class); - Assertions.assertEquals("jvlgfggcvkyyliz", model.fullyQualifiedArmId()); - Assertions.assertEquals("bjpsfxsfuztlvtm", model.name()); - Assertions.assertEquals("gbwidqlvh", model.type()); - Assertions.assertEquals(NetworkSecurityPerimeterProfileAccessRuleDirection.INBOUND, model.direction()); - Assertions.assertEquals("fizr", model.addressPrefixes().get(0)); - Assertions.assertEquals("ucejikzoeovvtz", model.subscriptions().get(0).id()); - Assertions.assertEquals("juzkdbqz", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("xrzvhqjwtrhtgvgz", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("rrkolawjmjs", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("okcdxfzzzwyjaf", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("afolpymwamxqzrag", model.emailAddresses().get(0)); - Assertions.assertEquals("ejchcsrlz", model.phoneNumbers().get(0)); + Assertions.assertEquals("mhwrb", model.addressPrefixes().get(0)); + Assertions.assertEquals("f", model.subscriptions().get(0).id()); + Assertions.assertEquals("vjglrocuyzlwhhme", model.networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("ooclutnp", model.networkSecurityPerimeters().get(0).perimeterGuid()); + Assertions.assertEquals("emc", model.networkSecurityPerimeters().get(0).location()); + Assertions.assertEquals("fqyhqoto", model.fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("moichdlpnfpubntn", model.emailAddresses().get(0)); + Assertions.assertEquals("tc", 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 index 40a17e2b96ef4..c823fdd050a08 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,14 +12,7 @@ public final class NetworkSecurityPerimeterSubscriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterSubscription model - = BinaryData.fromString("{\"id\":\"ddei\"}").toObject(NetworkSecurityPerimeterSubscription.class); - Assertions.assertEquals("ddei", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterSubscription model = new NetworkSecurityPerimeterSubscription().withId("ddei"); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterSubscription.class); - Assertions.assertEquals("ddei", model.id()); + = BinaryData.fromString("{\"id\":\"rkolawjm\"}").toObject(NetworkSecurityPerimeterSubscription.class); + Assertions.assertEquals("rkolawjm", 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 index f804193318965..12a618b92967b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,24 +12,11 @@ public final class OperationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInfo model = BinaryData.fromString( - "{\"provider\":\"fukuvsjcswsmystu\",\"resource\":\"qypfcv\",\"operation\":\"rchpqbmfpjbabwid\",\"description\":\"xsspuunnoxyhk\"}") + "{\"provider\":\"rqobmtuk\",\"resource\":\"ryrtihfxtijbpzv\",\"operation\":\"wzsymglzufcy\",\"description\":\"ohdbihanufh\"}") .toObject(OperationInfo.class); - Assertions.assertEquals("fukuvsjcswsmystu", model.provider()); - Assertions.assertEquals("qypfcv", model.resource()); - Assertions.assertEquals("rchpqbmfpjbabwid", model.operation()); - Assertions.assertEquals("xsspuunnoxyhk", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInfo model = new OperationInfo().withProvider("fukuvsjcswsmystu") - .withResource("qypfcv") - .withOperation("rchpqbmfpjbabwid") - .withDescription("xsspuunnoxyhk"); - model = BinaryData.fromObject(model).toObject(OperationInfo.class); - Assertions.assertEquals("fukuvsjcswsmystu", model.provider()); - Assertions.assertEquals("qypfcv", model.resource()); - Assertions.assertEquals("rchpqbmfpjbabwid", model.operation()); - Assertions.assertEquals("xsspuunnoxyhk", model.description()); + Assertions.assertEquals("rqobmtuk", model.provider()); + Assertions.assertEquals("ryrtihfxtijbpzv", model.resource()); + Assertions.assertEquals("wzsymglzufcy", model.operation()); + Assertions.assertEquals("ohdbihanufh", 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 index d31b1b5a8960f..33b10d79ddfde 100644 --- 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 @@ -1,46 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"dg\",\"display\":{\"provider\":\"sjkmnwqj\",\"resource\":\"baiyhddviaceg\",\"operation\":\"m\",\"description\":\"fpmvmemfnczd\"},\"origin\":\"vbalxlllc\",\"isDataAction\":true,\"properties\":\"databzevwrd\"}") + "{\"name\":\"eupewnwreitjz\",\"display\":{\"provider\":\"usarhmofc\",\"resource\":\"smy\",\"operation\":\"kdtmlxhekuk\",\"description\":\"txukcdmp\"},\"origin\":\"cryuan\",\"isDataAction\":false,\"properties\":\"\\\"datazdxtayrlhmwhf\\\"\"}") .toObject(OperationInner.class); - Assertions.assertEquals("dg", model.name()); - Assertions.assertEquals("sjkmnwqj", model.display().provider()); - Assertions.assertEquals("baiyhddviaceg", model.display().resource()); - Assertions.assertEquals("m", model.display().operation()); - Assertions.assertEquals("fpmvmemfnczd", model.display().description()); - Assertions.assertEquals("vbalxlllc", model.origin()); - Assertions.assertTrue(model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("dg") - .withDisplay(new OperationInfo().withProvider("sjkmnwqj") - .withResource("baiyhddviaceg") - .withOperation("m") - .withDescription("fpmvmemfnczd")) - .withOrigin("vbalxlllc") - .withIsDataAction(true) - .withProperties("databzevwrd"); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("dg", model.name()); - Assertions.assertEquals("sjkmnwqj", model.display().provider()); - Assertions.assertEquals("baiyhddviaceg", model.display().resource()); - Assertions.assertEquals("m", model.display().operation()); - Assertions.assertEquals("fpmvmemfnczd", model.display().description()); - Assertions.assertEquals("vbalxlllc", model.origin()); - Assertions.assertTrue(model.isDataAction()); + Assertions.assertEquals("eupewnwreitjz", model.name()); + Assertions.assertEquals("usarhmofc", model.display().provider()); + Assertions.assertEquals("smy", model.display().resource()); + Assertions.assertEquals("kdtmlxhekuk", model.display().operation()); + Assertions.assertEquals("txukcdmp", model.display().description()); + Assertions.assertEquals("cryuan", model.origin()); + Assertions.assertFalse(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 index 4858b47d917fc..e7cfba725a0de 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"awrdt\",\"display\":{\"provider\":\"zl\",\"resource\":\"yaixihzqj\",\"operation\":\"smuydqfttk\",\"description\":\"ybd\"},\"origin\":\"urgmcdcp\",\"isDataAction\":false,\"properties\":\"dataojermhzicsbfdjhy\"}]}"; + = "{\"value\":[{\"name\":\"al\",\"display\":{\"provider\":\"huzgfxo\",\"resource\":\"tpusllywp\",\"operation\":\"iotzbpdbollgryfq\",\"description\":\"asigrowsocne\"},\"origin\":\"ygdjboqgrmtqjk\",\"isDataAction\":false,\"properties\":\"\\\"datadrmmwiuawvcmjz\\\"\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("awrdt", response.iterator().next().name()); - Assertions.assertEquals("zl", response.iterator().next().display().provider()); - Assertions.assertEquals("yaixihzqj", response.iterator().next().display().resource()); - Assertions.assertEquals("smuydqfttk", response.iterator().next().display().operation()); - Assertions.assertEquals("ybd", response.iterator().next().display().description()); - Assertions.assertEquals("urgmcdcp", response.iterator().next().origin()); + Assertions.assertEquals("al", response.iterator().next().name()); + Assertions.assertEquals("huzgfxo", response.iterator().next().display().provider()); + Assertions.assertEquals("tpusllywp", response.iterator().next().display().resource()); + Assertions.assertEquals("iotzbpdbollgryfq", response.iterator().next().display().operation()); + Assertions.assertEquals("asigrowsocne", response.iterator().next().display().description()); + Assertions.assertEquals("ygdjboqgrmtqjk", response.iterator().next().origin()); Assertions.assertFalse(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 index 25c512450f2c1..e2eaacf4f4bc2 100644 --- 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 @@ -1,57 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.eventgrid.implementation.models.OperationsListResult; 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\":\"pidkqqfkuvscxkdm\",\"display\":{\"provider\":\"ovibrxkp\",\"resource\":\"oaz\",\"operation\":\"u\",\"description\":\"bgo\"},\"origin\":\"bteoybf\",\"isDataAction\":true,\"properties\":\"datakvvjgslordilmyww\"},{\"name\":\"gkxnyedabg\",\"display\":{\"provider\":\"dtj\",\"resource\":\"wbcihxuuwh\",\"operation\":\"yxccyb\",\"description\":\"ayakkudzpx\"},\"origin\":\"jplmagstcy\",\"isDataAction\":true,\"properties\":\"datakyrk\"}]}") + "{\"value\":[{\"name\":\"hq\",\"display\":{\"provider\":\"jxpybczmeh\",\"resource\":\"zopbsphrupidgs\",\"operation\":\"bejhphoycmsxa\",\"description\":\"hdxbmtqio\"},\"origin\":\"zehtbmu\",\"isDataAction\":false,\"properties\":\"\\\"datanoi\\\"\"},{\"name\":\"wlrxyb\",\"display\":{\"provider\":\"qijgkd\",\"resource\":\"pazlobcufpdz\",\"operation\":\"btcqq\",\"description\":\"qglhq\"},\"origin\":\"ufo\",\"isDataAction\":false,\"properties\":\"\\\"datawifsq\\\"\"},{\"name\":\"aagdfmg\",\"display\":{\"provider\":\"hjxri\",\"resource\":\"wmrvktsizntocipa\",\"operation\":\"ajpsquc\",\"description\":\"o\"},\"origin\":\"dkfo\",\"isDataAction\":false,\"properties\":\"\\\"datagjofjd\\\"\"}],\"nextLink\":\"qs\"}") .toObject(OperationsListResult.class); - Assertions.assertEquals("pidkqqfkuvscxkdm", model.value().get(0).name()); - Assertions.assertEquals("ovibrxkp", model.value().get(0).display().provider()); - Assertions.assertEquals("oaz", model.value().get(0).display().resource()); - Assertions.assertEquals("u", model.value().get(0).display().operation()); - Assertions.assertEquals("bgo", model.value().get(0).display().description()); - Assertions.assertEquals("bteoybf", model.value().get(0).origin()); - Assertions.assertTrue(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("pidkqqfkuvscxkdm") - .withDisplay(new OperationInfo().withProvider("ovibrxkp") - .withResource("oaz") - .withOperation("u") - .withDescription("bgo")) - .withOrigin("bteoybf") - .withIsDataAction(true) - .withProperties("datakvvjgslordilmyww"), - new OperationInner().withName("gkxnyedabg") - .withDisplay(new OperationInfo().withProvider("dtj") - .withResource("wbcihxuuwh") - .withOperation("yxccyb") - .withDescription("ayakkudzpx")) - .withOrigin("jplmagstcy") - .withIsDataAction(true) - .withProperties("datakyrk"))); - model = BinaryData.fromObject(model).toObject(OperationsListResult.class); - Assertions.assertEquals("pidkqqfkuvscxkdm", model.value().get(0).name()); - Assertions.assertEquals("ovibrxkp", model.value().get(0).display().provider()); - Assertions.assertEquals("oaz", model.value().get(0).display().resource()); - Assertions.assertEquals("u", model.value().get(0).display().operation()); - Assertions.assertEquals("bgo", model.value().get(0).display().description()); - Assertions.assertEquals("bteoybf", model.value().get(0).origin()); - Assertions.assertTrue(model.value().get(0).isDataAction()); + Assertions.assertEquals("hq", model.value().get(0).name()); + Assertions.assertEquals("jxpybczmeh", model.value().get(0).display().provider()); + Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().resource()); + Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().operation()); + Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().description()); + Assertions.assertEquals("zehtbmu", model.value().get(0).origin()); + Assertions.assertFalse(model.value().get(0).isDataAction()); + Assertions.assertEquals("qs", model.nextLink()); } } 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 index 2d4230fe3e374..8a3d610e02b4a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; 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 index 5e8cb87c25a64..26e19f8ff7fe6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,16 +12,16 @@ public final class PartnerConfigurationUpdateParameterPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerConfigurationUpdateParameterProperties model - = BinaryData.fromString("{\"defaultMaximumExpirationTimeInDays\":1157352083}") + = BinaryData.fromString("{\"defaultMaximumExpirationTimeInDays\":1541278105}") .toObject(PartnerConfigurationUpdateParameterProperties.class); - Assertions.assertEquals(1157352083, model.defaultMaximumExpirationTimeInDays()); + Assertions.assertEquals(1541278105, model.defaultMaximumExpirationTimeInDays()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerConfigurationUpdateParameterProperties model - = new PartnerConfigurationUpdateParameterProperties().withDefaultMaximumExpirationTimeInDays(1157352083); + = new PartnerConfigurationUpdateParameterProperties().withDefaultMaximumExpirationTimeInDays(1541278105); model = BinaryData.fromObject(model).toObject(PartnerConfigurationUpdateParameterProperties.class); - Assertions.assertEquals(1157352083, model.defaultMaximumExpirationTimeInDays()); + Assertions.assertEquals(1541278105, 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 index 29dfbe8fd3028..a14c8ba14ba5c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,20 +14,20 @@ public final class PartnerConfigurationUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerConfigurationUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"ajlyjtlvofqzhv\":\"gogtqxepnylbf\",\"fmo\":\"cib\",\"dwxf\":\"uxrkjp\"},\"properties\":{\"defaultMaximumExpirationTimeInDays\":299953829}}") + "{\"tags\":{\"egy\":\"rqbnjjrc\",\"oxjumvqqo\":\"cw\",\"jtlo\":\"ihrraiouaub\"},\"properties\":{\"defaultMaximumExpirationTimeInDays\":465765494}}") .toObject(PartnerConfigurationUpdateParameters.class); - Assertions.assertEquals("gogtqxepnylbf", model.tags().get("ajlyjtlvofqzhv")); - Assertions.assertEquals(299953829, model.defaultMaximumExpirationTimeInDays()); + Assertions.assertEquals("rqbnjjrc", model.tags().get("egy")); + Assertions.assertEquals(465765494, model.defaultMaximumExpirationTimeInDays()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerConfigurationUpdateParameters model = new PartnerConfigurationUpdateParameters() - .withTags(mapOf("ajlyjtlvofqzhv", "gogtqxepnylbf", "fmo", "cib", "dwxf", "uxrkjp")) - .withDefaultMaximumExpirationTimeInDays(299953829); + .withTags(mapOf("egy", "rqbnjjrc", "oxjumvqqo", "cw", "jtlo", "ihrraiouaub")) + .withDefaultMaximumExpirationTimeInDays(465765494); model = BinaryData.fromObject(model).toObject(PartnerConfigurationUpdateParameters.class); - Assertions.assertEquals("gogtqxepnylbf", model.tags().get("ajlyjtlvofqzhv")); - Assertions.assertEquals(299953829, model.defaultMaximumExpirationTimeInDays()); + Assertions.assertEquals("rqbnjjrc", model.tags().get("egy")); + Assertions.assertEquals(465765494, model.defaultMaximumExpirationTimeInDays()); } // Use "Map.of" if available 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 index 2e85f8bdf7781..3ad5b579f9e98 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.partnerConfigurations().delete("vqzrwtrd", com.azure.core.util.Context.NONE); + manager.partnerConfigurations().delete("rstvkitbfjtdy", 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 index f7cc2f3b9cd8f..d2ca2ec69fc02 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,36 +15,39 @@ 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\"}]}") + "{\"endpointType\":\"PartnerDestinationInfo\",\"azureSubscriptionId\":\"gbkdmoizpos\",\"resourceGroupName\":\"grcfb\",\"name\":\"rmfqjhhkxbpvj\",\"endpointServiceContext\":\"jhxxjyn\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"vkr\",\"resourceGroupName\":\"wbxqzvszjfau\",\"changedTimeUtc\":\"2021-09-23T21:18:01Z\"},{\"azureSubscriptionId\":\"xxivetv\",\"resourceGroupName\":\"qaqtdoqmcbxvwvxy\",\"changedTimeUtc\":\"2021-08-09T15:31:17Z\"}]}") .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"), + Assertions.assertEquals("gbkdmoizpos", model.azureSubscriptionId()); + Assertions.assertEquals("grcfb", model.resourceGroupName()); + Assertions.assertEquals("rmfqjhhkxbpvj", model.name()); + Assertions.assertEquals("jhxxjyn", model.endpointServiceContext()); + Assertions.assertEquals("vkr", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); + Assertions.assertEquals("wbxqzvszjfau", model.resourceMoveChangeHistory().get(0).resourceGroupName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T21:18:01Z"), 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")))); + PartnerDestinationInfo model = new PartnerDestinationInfo().withAzureSubscriptionId("gbkdmoizpos") + .withResourceGroupName("grcfb") + .withName("rmfqjhhkxbpvj") + .withEndpointServiceContext("jhxxjyn") + .withResourceMoveChangeHistory(Arrays.asList( + new ResourceMoveChangeHistory().withAzureSubscriptionId("vkr") + .withResourceGroupName("wbxqzvszjfau") + .withChangedTimeUtc(OffsetDateTime.parse("2021-09-23T21:18:01Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("xxivetv") + .withResourceGroupName("qaqtdoqmcbxvwvxy") + .withChangedTimeUtc(OffsetDateTime.parse("2021-08-09T15:31:17Z")))); 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"), + Assertions.assertEquals("gbkdmoizpos", model.azureSubscriptionId()); + Assertions.assertEquals("grcfb", model.resourceGroupName()); + Assertions.assertEquals("rmfqjhhkxbpvj", model.name()); + Assertions.assertEquals("jhxxjyn", model.endpointServiceContext()); + Assertions.assertEquals("vkr", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); + Assertions.assertEquals("wbxqzvszjfau", model.resourceMoveChangeHistory().get(0).resourceGroupName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T21:18:01Z"), 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 index a58942a94f380..31b9723302713 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -10,46 +10,43 @@ 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\":\"69778dbc-1c2d-4298-96f8-ffba16d8b1e2\",\"endpointServiceContext\":\"ambtrnegvm\",\"expirationTimeIfNotActivatedUtc\":\"2021-05-21T02:20:29Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"dspastjbkkdmfl\",\"messageForActivation\":\"stmjlxrri\"},\"location\":\"zapeewchpx\",\"tags\":{\"ziycslevufuztck\":\"wk\",\"wmmrq\":\"yhjtqedcgzu\",\"zgkrvqe\":\"zrrjvpgly\"},\"id\":\"vtoepryutnw\",\"name\":\"tpzdmovzvfvaawzq\",\"type\":\"dflgzuri\"}") + "{\"properties\":{\"partnerRegistrationImmutableId\":\"asccbiui\",\"endpointServiceContext\":\"dlyjdf\",\"expirationTimeIfNotActivatedUtc\":\"2021-02-14T10:16:50Z\",\"provisioningState\":\"Updating\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"fdvruz\",\"messageForActivation\":\"zojhpctfnmd\"},\"location\":\"tngfdgugeyzihgr\",\"tags\":{\"absnmfpp\":\"i\"},\"id\":\"ojeevy\",\"name\":\"yhsgz\",\"type\":\"czbgomfgbeg\"}") .toObject(PartnerDestinationInner.class); - Assertions.assertEquals("zapeewchpx", model.location()); - Assertions.assertEquals("wk", model.tags().get("ziycslevufuztck")); - Assertions.assertEquals(UUID.fromString("69778dbc-1c2d-4298-96f8-ffba16d8b1e2"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("ambtrnegvm", model.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-21T02:20:29Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("dspastjbkkdmfl", model.endpointBaseUrl()); - Assertions.assertEquals("stmjlxrri", model.messageForActivation()); + Assertions.assertEquals("tngfdgugeyzihgr", model.location()); + Assertions.assertEquals("i", model.tags().get("absnmfpp")); + Assertions.assertEquals("asccbiui", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("dlyjdf", model.endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T10:16:50Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, model.activationState()); + Assertions.assertEquals("fdvruz", model.endpointBaseUrl()); + Assertions.assertEquals("zojhpctfnmd", model.messageForActivation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerDestinationInner model = new PartnerDestinationInner().withLocation("zapeewchpx") - .withTags(mapOf("ziycslevufuztck", "wk", "wmmrq", "yhjtqedcgzu", "zgkrvqe", "zrrjvpgly")) - .withPartnerRegistrationImmutableId(UUID.fromString("69778dbc-1c2d-4298-96f8-ffba16d8b1e2")) - .withEndpointServiceContext("ambtrnegvm") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-05-21T02:20:29Z")) - .withActivationState(PartnerDestinationActivationState.NEVER_ACTIVATED) - .withEndpointBaseUrl("dspastjbkkdmfl") - .withMessageForActivation("stmjlxrri"); + PartnerDestinationInner model = new PartnerDestinationInner().withLocation("tngfdgugeyzihgr") + .withTags(mapOf("absnmfpp", "i")) + .withPartnerRegistrationImmutableId("asccbiui") + .withEndpointServiceContext("dlyjdf") + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-02-14T10:16:50Z")) + .withActivationState(PartnerDestinationActivationState.ACTIVATED) + .withEndpointBaseUrl("fdvruz") + .withMessageForActivation("zojhpctfnmd"); model = BinaryData.fromObject(model).toObject(PartnerDestinationInner.class); - Assertions.assertEquals("zapeewchpx", model.location()); - Assertions.assertEquals("wk", model.tags().get("ziycslevufuztck")); - Assertions.assertEquals(UUID.fromString("69778dbc-1c2d-4298-96f8-ffba16d8b1e2"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("ambtrnegvm", model.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-21T02:20:29Z"), model.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("dspastjbkkdmfl", model.endpointBaseUrl()); - Assertions.assertEquals("stmjlxrri", model.messageForActivation()); + Assertions.assertEquals("tngfdgugeyzihgr", model.location()); + Assertions.assertEquals("i", model.tags().get("absnmfpp")); + Assertions.assertEquals("asccbiui", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("dlyjdf", model.endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T10:16:50Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, model.activationState()); + Assertions.assertEquals("fdvruz", model.endpointBaseUrl()); + Assertions.assertEquals("zojhpctfnmd", model.messageForActivation()); } // Use "Map.of" if available 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 index 05d05f2548c1e..8ac34e7178c63 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -8,40 +8,37 @@ 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\":\"97002a9f-e01f-45b4-b30d-a3fe37a8fef7\",\"endpointServiceContext\":\"ecxn\",\"expirationTimeIfNotActivatedUtc\":\"2021-02-18T17:11:23Z\",\"provisioningState\":\"Creating\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"zmlqtmldgxo\",\"messageForActivation\":\"irclnpk\"}") + "{\"partnerRegistrationImmutableId\":\"gleohi\",\"endpointServiceContext\":\"tnluankrr\",\"expirationTimeIfNotActivatedUtc\":\"2021-01-04T09:37:39Z\",\"provisioningState\":\"Updating\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"j\",\"messageForActivation\":\"cvbmqzb\"}") .toObject(PartnerDestinationProperties.class); - Assertions.assertEquals(UUID.fromString("97002a9f-e01f-45b4-b30d-a3fe37a8fef7"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("ecxn", model.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-18T17:11:23Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals("gleohi", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("tnluankrr", model.endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T09:37:39Z"), model.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("zmlqtmldgxo", model.endpointBaseUrl()); - Assertions.assertEquals("irclnpk", model.messageForActivation()); + Assertions.assertEquals("j", model.endpointBaseUrl()); + Assertions.assertEquals("cvbmqzb", model.messageForActivation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerDestinationProperties model = new PartnerDestinationProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("97002a9f-e01f-45b4-b30d-a3fe37a8fef7")) - .withEndpointServiceContext("ecxn") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-02-18T17:11:23Z")) - .withActivationState(PartnerDestinationActivationState.NEVER_ACTIVATED) - .withEndpointBaseUrl("zmlqtmldgxo") - .withMessageForActivation("irclnpk"); + PartnerDestinationProperties model + = new PartnerDestinationProperties().withPartnerRegistrationImmutableId("gleohi") + .withEndpointServiceContext("tnluankrr") + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-01-04T09:37:39Z")) + .withActivationState(PartnerDestinationActivationState.NEVER_ACTIVATED) + .withEndpointBaseUrl("j") + .withMessageForActivation("cvbmqzb"); model = BinaryData.fromObject(model).toObject(PartnerDestinationProperties.class); - Assertions.assertEquals(UUID.fromString("97002a9f-e01f-45b4-b30d-a3fe37a8fef7"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("ecxn", model.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-18T17:11:23Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals("gleohi", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("tnluankrr", model.endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T09:37:39Z"), model.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, model.activationState()); - Assertions.assertEquals("zmlqtmldgxo", model.endpointBaseUrl()); - Assertions.assertEquals("irclnpk", model.messageForActivation()); + Assertions.assertEquals("j", model.endpointBaseUrl()); + Assertions.assertEquals("cvbmqzb", 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 index e17b785bda76c..4598043121dc1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,18 +13,17 @@ public final class PartnerDestinationUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PartnerDestinationUpdateParameters model - = BinaryData.fromString("{\"tags\":{\"wf\":\"yzriykhy\",\"xqvkjlmxhomdyn\":\"jlb\"}}") - .toObject(PartnerDestinationUpdateParameters.class); - Assertions.assertEquals("yzriykhy", model.tags().get("wf")); + PartnerDestinationUpdateParameters model = BinaryData.fromString("{\"tags\":{\"uyxoaf\":\"lajrnwxacevehj\"}}") + .toObject(PartnerDestinationUpdateParameters.class); + Assertions.assertEquals("lajrnwxacevehj", model.tags().get("uyxoaf")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerDestinationUpdateParameters model - = new PartnerDestinationUpdateParameters().withTags(mapOf("wf", "yzriykhy", "xqvkjlmxhomdyn", "jlb")); + = new PartnerDestinationUpdateParameters().withTags(mapOf("uyxoaf", "lajrnwxacevehj")); model = BinaryData.fromObject(model).toObject(PartnerDestinationUpdateParameters.class); - Assertions.assertEquals("yzriykhy", model.tags().get("wf")); + Assertions.assertEquals("lajrnwxacevehj", model.tags().get("uyxoaf")); } // Use "Map.of" if available 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 index 931afd785c726..4be71cd7ae6ef 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,7 +14,6 @@ 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; @@ -23,7 +22,7 @@ public final class PartnerDestinationsActivateWithResponseMockTests { @Test public void testActivateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"d4e3f370-e76d-414b-b5a6-9ab548aadc05\",\"endpointServiceContext\":\"mkgxqwqueuuylzt\",\"expirationTimeIfNotActivatedUtc\":\"2021-06-29T18:49:55Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"ykofvez\",\"messageForActivation\":\"k\"},\"location\":\"qt\",\"tags\":{\"zkca\":\"epj\",\"rtwzvaqkifmxa\":\"fwzcntogffjwaj\",\"kmjqncfvdsc\":\"ostfzknh\"},\"id\":\"hemvwfnqqwypvnd\",\"name\":\"wbgodtggrssg\",\"type\":\"jfkainj\"}"; + = "{\"properties\":{\"partnerRegistrationImmutableId\":\"waybfmd\",\"endpointServiceContext\":\"bgymqt\",\"expirationTimeIfNotActivatedUtc\":\"2021-03-30T15:53:08Z\",\"provisioningState\":\"Updating\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"rjnbsconxavipne\",\"messageForActivation\":\"hbjizqfsgnwdx\"},\"location\":\"dpq\",\"tags\":{\"p\":\"borx\"},\"id\":\"lnfyzav\",\"name\":\"rbypi\",\"type\":\"dbkp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,18 +32,17 @@ public void testActivateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerDestination response = manager.partnerDestinations() - .activateWithResponse("xrid", "tb", com.azure.core.util.Context.NONE) + .activateWithResponse("tvdxxhe", "gmlilwzghjhjvmab", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qt", response.location()); - Assertions.assertEquals("epj", response.tags().get("zkca")); - Assertions.assertEquals(UUID.fromString("d4e3f370-e76d-414b-b5a6-9ab548aadc05"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("mkgxqwqueuuylzt", response.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T18:49:55Z"), + Assertions.assertEquals("dpq", response.location()); + Assertions.assertEquals("borx", response.tags().get("p")); + Assertions.assertEquals("waybfmd", response.partnerRegistrationImmutableId()); + Assertions.assertEquals("bgymqt", response.endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-30T15:53:08Z"), response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, response.activationState()); - Assertions.assertEquals("ykofvez", response.endpointBaseUrl()); - Assertions.assertEquals("k", response.messageForActivation()); + Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, response.activationState()); + Assertions.assertEquals("rjnbsconxavipne", response.endpointBaseUrl()); + Assertions.assertEquals("hbjizqfsgnwdx", 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 index 9be52075df9e6..dcaced90b5ddd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,7 +16,6 @@ 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; @@ -25,7 +24,7 @@ public final class PartnerDestinationsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"29b4c2a1-7594-4a99-b057-29cfd9070c5b\",\"endpointServiceContext\":\"hzrtd\",\"expirationTimeIfNotActivatedUtc\":\"2021-09-01T09:28:44Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"fvppkeqsifj\",\"messageForActivation\":\"lng\"},\"location\":\"nhr\",\"tags\":{\"ggorwjoqt\":\"bcdtajdo\",\"fyrlmwkptskwxj\":\"otpvclp\",\"bputmgvmuyakml\":\"vhxccbmkakmkoo\",\"flzqjimejtgzjxx\":\"ktfowzkroyrdur\"},\"id\":\"fejlzuqloiw\",\"name\":\"ayyzivrmitc\",\"type\":\"qlhchwhrktjle\"}"; + = "{\"properties\":{\"partnerRegistrationImmutableId\":\"ybxvgn\",\"endpointServiceContext\":\"zpbgkzc\",\"expirationTimeIfNotActivatedUtc\":\"2021-09-22T17:36:02Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"unhdimjuk\",\"messageForActivation\":\"r\"},\"location\":\"a\",\"tags\":{\"doc\":\"u\",\"f\":\"qplwg\"},\"id\":\"hxw\",\"name\":\"jlvzklk\",\"type\":\"bgikyjtkakvlbi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,28 +34,27 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerDestination response = manager.partnerDestinations() - .define("bgmusaictd") - .withRegion("me") - .withExistingResourceGroup("uymvecvzts") - .withTags(mapOf("s", "abcreuwz")) - .withPartnerRegistrationImmutableId(UUID.fromString("004d92ec-d982-4835-a320-7cbe242be1db")) - .withEndpointServiceContext("zzohn") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-04-25T16:30:59Z")) + .define("njhx") + .withRegion("nfczmnniixyxvq") + .withExistingResourceGroup("jtaqhsmqazpdg") + .withTags(mapOf("tgirnb", "os", "dorgmynltw", "mgm", "tmfoeajogsyxwet", "p", "rvlkpzwbhnrec", "mfd")) + .withPartnerRegistrationImmutableId("hmgpczqulpt") + .withEndpointServiceContext("vcpxtzhigqqbtimp") + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-08T19:21:41Z")) .withActivationState(PartnerDestinationActivationState.ACTIVATED) - .withEndpointBaseUrl("ozrehlbzqixbnjrq") - .withMessageForActivation("yuexozonyn") + .withEndpointBaseUrl("ihqhudsmusua") + .withMessageForActivation("jakx") .create(); - Assertions.assertEquals("nhr", response.location()); - Assertions.assertEquals("bcdtajdo", response.tags().get("ggorwjoqt")); - Assertions.assertEquals(UUID.fromString("29b4c2a1-7594-4a99-b057-29cfd9070c5b"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("hzrtd", response.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T09:28:44Z"), + Assertions.assertEquals("a", response.location()); + Assertions.assertEquals("u", response.tags().get("doc")); + Assertions.assertEquals("ybxvgn", response.partnerRegistrationImmutableId()); + Assertions.assertEquals("zpbgkzc", response.endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-22T17:36:02Z"), response.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("fvppkeqsifj", response.endpointBaseUrl()); - Assertions.assertEquals("lng", response.messageForActivation()); + Assertions.assertEquals("unhdimjuk", response.endpointBaseUrl()); + Assertions.assertEquals("r", response.messageForActivation()); } // Use "Map.of" if available 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 index 54f0c2ffd34d0..583029fd44f99 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.partnerDestinations().delete("didahzl", "rqm", com.azure.core.util.Context.NONE); + manager.partnerDestinations().delete("aujegqdtadra", "gddhjkrukizyhgs", 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 index a9074c3cf9661..5a03912adee55 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,7 +14,6 @@ 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; @@ -23,7 +22,7 @@ public final class PartnerDestinationsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"4a29e904-21ce-4db3-bda3-1691ba3c6921\",\"endpointServiceContext\":\"oxznvgvd\",\"expirationTimeIfNotActivatedUtc\":\"2021-06-25T22:21:04Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"sxmrszbknimxlp\",\"messageForActivation\":\"rxrzutylcur\"},\"location\":\"q\",\"tags\":{\"jmbnvynf\":\"xqaehtd\"},\"id\":\"ooeactedc\",\"name\":\"lsk\",\"type\":\"k\"}"; + = "{\"properties\":{\"partnerRegistrationImmutableId\":\"njodfcbjqqwmtq\",\"endpointServiceContext\":\"oxsazuxejgwe\",\"expirationTimeIfNotActivatedUtc\":\"2021-06-17T15:34:56Z\",\"provisioningState\":\"Failed\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"za\",\"messageForActivation\":\"sinqbdnddbbozsyv\"},\"location\":\"kjmyitrchwudlx\",\"tags\":{\"fmsibzoyrfgxkyd\":\"htpmnoejhq\",\"hl\":\"mypgfqvmty\",\"jpewpyjlfx\":\"kxp\"},\"id\":\"m\",\"name\":\"qcrzgeuqxbpia\",\"type\":\"w\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,18 +32,17 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerDestination response = manager.partnerDestinations() - .getByResourceGroupWithResponse("x", "btplefoi", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("slejtvxj", "xvgjbfi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("q", response.location()); - Assertions.assertEquals("xqaehtd", response.tags().get("jmbnvynf")); - Assertions.assertEquals(UUID.fromString("4a29e904-21ce-4db3-bda3-1691ba3c6921"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("oxznvgvd", response.endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T22:21:04Z"), + Assertions.assertEquals("kjmyitrchwudlx", response.location()); + Assertions.assertEquals("htpmnoejhq", response.tags().get("fmsibzoyrfgxkyd")); + Assertions.assertEquals("njodfcbjqqwmtq", response.partnerRegistrationImmutableId()); + Assertions.assertEquals("oxsazuxejgwe", response.endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T15:34:56Z"), response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, response.activationState()); - Assertions.assertEquals("sxmrszbknimxlp", response.endpointBaseUrl()); - Assertions.assertEquals("rxrzutylcur", response.messageForActivation()); + Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, response.activationState()); + Assertions.assertEquals("za", response.endpointBaseUrl()); + Assertions.assertEquals("sinqbdnddbbozsyv", 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 index dfb7a71188ab4..32b2e98c0cb41 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,7 +15,6 @@ 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; @@ -24,7 +23,7 @@ public final class PartnerDestinationsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"bd39b863-2f75-4162-863d-41cd237cf0fd\",\"endpointServiceContext\":\"mcfjxokyelsy\",\"expirationTimeIfNotActivatedUtc\":\"2021-04-18T05:49:12Z\",\"provisioningState\":\"Failed\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"ygjje\",\"messageForActivation\":\"knfdr\"},\"location\":\"jqy\",\"tags\":{\"otcsu\":\"txkrdtulcrcjdk\"},\"id\":\"mzoonsvobchkxfpw\",\"name\":\"dyslbklglmnn\",\"type\":\"kwayqshwy\"}]}"; + = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"hdmncgbfz\",\"endpointServiceContext\":\"cstu\",\"expirationTimeIfNotActivatedUtc\":\"2021-07-03T20:06:36Z\",\"provisioningState\":\"Deleting\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"klciichgjsysm\",\"messageForActivation\":\"o\"},\"location\":\"wxfkzsifcuvbdujg\",\"tags\":{\"wjtrdxriza\":\"vecb\",\"b\":\"bbgiarksykpgdqxw\",\"dosqkptjqg\":\"rwiqrxhacl\"},\"id\":\"ifmmainwh\",\"name\":\"d\",\"type\":\"kp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,18 +33,17 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.partnerDestinations() - .listByResourceGroup("mczfedyuepsvplt", "dajjvywe", 452970965, com.azure.core.util.Context.NONE); + .listByResourceGroup("tnqsktx", "fpjbqggwe", 1205167221, com.azure.core.util.Context.NONE); - Assertions.assertEquals("jqy", response.iterator().next().location()); - Assertions.assertEquals("txkrdtulcrcjdk", response.iterator().next().tags().get("otcsu")); - Assertions.assertEquals(UUID.fromString("bd39b863-2f75-4162-863d-41cd237cf0fd"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("mcfjxokyelsy", response.iterator().next().endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-18T05:49:12Z"), + Assertions.assertEquals("wxfkzsifcuvbdujg", response.iterator().next().location()); + Assertions.assertEquals("vecb", response.iterator().next().tags().get("wjtrdxriza")); + Assertions.assertEquals("hdmncgbfz", response.iterator().next().partnerRegistrationImmutableId()); + Assertions.assertEquals("cstu", response.iterator().next().endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T20:06:36Z"), response.iterator().next().expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, + Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, response.iterator().next().activationState()); - Assertions.assertEquals("ygjje", response.iterator().next().endpointBaseUrl()); - Assertions.assertEquals("knfdr", response.iterator().next().messageForActivation()); + Assertions.assertEquals("klciichgjsysm", response.iterator().next().endpointBaseUrl()); + Assertions.assertEquals("o", 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 index 1fa86d731c944..f13fbe056710a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,7 +15,6 @@ 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; @@ -24,7 +23,7 @@ public final class PartnerDestinationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"e0084fbe-45ed-44cb-8e26-e158abc6b33b\",\"endpointServiceContext\":\"noiicsu\",\"expirationTimeIfNotActivatedUtc\":\"2021-10-22T07:29:32Z\",\"provisioningState\":\"Deleting\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"a\",\"messageForActivation\":\"rdsjrho\"},\"location\":\"qwgusxxhdo\",\"tags\":{\"bdmvsby\":\"wyblv\",\"kmkwjfbo\":\"daelqpv\",\"v\":\"loggdusxursu\",\"qrizfwihvaan\":\"xcjkcoqwczsy\"},\"id\":\"qtnhjrfd\",\"name\":\"fdvbbaexxjfwtg\",\"type\":\"fkkauigvmua\"}]}"; + = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"zz\",\"endpointServiceContext\":\"wgvydjufb\",\"expirationTimeIfNotActivatedUtc\":\"2021-02-13T16:28:56Z\",\"provisioningState\":\"Creating\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"egjwdabalfdxaglz\",\"messageForActivation\":\"tlbtlqho\"},\"location\":\"ouvmrsiflik\",\"tags\":{\"fxfmyrqsdb\":\"zkg\",\"nm\":\"oksz\",\"i\":\"wgpterdiuw\",\"tsdetjygowifcq\":\"kskw\"},\"id\":\"olzkgys\",\"name\":\"gzyy\",\"type\":\"zoxlvoc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,18 +33,17 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.partnerDestinations().list("lpbyxroiduyq", 2088682801, com.azure.core.util.Context.NONE); + = manager.partnerDestinations().list("qwuntob", 1108518672, com.azure.core.util.Context.NONE); - Assertions.assertEquals("qwgusxxhdo", response.iterator().next().location()); - Assertions.assertEquals("wyblv", response.iterator().next().tags().get("bdmvsby")); - Assertions.assertEquals(UUID.fromString("e0084fbe-45ed-44cb-8e26-e158abc6b33b"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("noiicsu", response.iterator().next().endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T07:29:32Z"), + Assertions.assertEquals("ouvmrsiflik", response.iterator().next().location()); + Assertions.assertEquals("zkg", response.iterator().next().tags().get("fxfmyrqsdb")); + Assertions.assertEquals("zz", response.iterator().next().partnerRegistrationImmutableId()); + Assertions.assertEquals("wgvydjufb", response.iterator().next().endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T16:28:56Z"), response.iterator().next().expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, + Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, response.iterator().next().activationState()); - Assertions.assertEquals("a", response.iterator().next().endpointBaseUrl()); - Assertions.assertEquals("rdsjrho", response.iterator().next().messageForActivation()); + Assertions.assertEquals("egjwdabalfdxaglz", response.iterator().next().endpointBaseUrl()); + Assertions.assertEquals("tlbtlqho", 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 index 3c5695ce74e3c..fce17097cb1cc 100644 --- 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 @@ -1,101 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.PartnerDestinationsListResult; 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\":\"a9770cea-2fed-4c8e-a337-036477bbe2cf\",\"endpointServiceContext\":\"umbnraauzzp\",\"expirationTimeIfNotActivatedUtc\":\"2021-02-18T00:50:05Z\",\"provisioningState\":\"Updating\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"hezwwvaiq\",\"messageForActivation\":\"vv\"},\"location\":\"nk\",\"tags\":{\"auy\":\"qyikvy\",\"y\":\"vluwmncsttij\"},\"id\":\"vpo\",\"name\":\"krsgsgb\",\"type\":\"huzqgn\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"31b53cc4-c759-4379-92fc-ea9d95ba615d\",\"endpointServiceContext\":\"ynscl\",\"expirationTimeIfNotActivatedUtc\":\"2021-10-10T10:14:10Z\",\"provisioningState\":\"Updating\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"komtkubotppn\",\"messageForActivation\":\"xz\"},\"location\":\"ihfrbbcevqa\",\"tags\":{\"py\":\"tdhlfkqo\"},\"id\":\"vgtrdcnifmzzs\",\"name\":\"ymbrnysuxmpraf\",\"type\":\"g\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"5c2bdf21-b5fa-4df9-84c9-002ace5a40f4\",\"endpointServiceContext\":\"cxvdfffwafqrouda\",\"expirationTimeIfNotActivatedUtc\":\"2021-09-22T08:28:07Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"vkbunzozudh\",\"messageForActivation\":\"gkmoyxcdyuibhmfd\"},\"location\":\"zydvfvf\",\"tags\":{\"gorf\":\"aeoisrvh\"},\"id\":\"ukiscvwmzhw\",\"name\":\"lefaxvxilcbtgn\",\"type\":\"nzeyqxtjj\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"2b26d2b9-0897-4517-88b3-95e809c034b6\",\"endpointServiceContext\":\"qhycavodggxdbees\",\"expirationTimeIfNotActivatedUtc\":\"2021-02-12T22:39:40Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"riaa\",\"messageForActivation\":\"uagydwqfbylyrf\"},\"location\":\"agt\",\"tags\":{\"zldmozuxy\":\"ocqwogfnzjvus\",\"ysownbtgkbug\":\"fsbtkad\",\"pe\":\"jqctojcmisofie\",\"hihihlhzdsqtzbsr\":\"ojyqdhcuplcplcw\"},\"id\":\"nowc\",\"name\":\"hfgmvecactxm\",\"type\":\"oteyowc\"}],\"nextLink\":\"qovekqvgqou\"}") + "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"lt\",\"endpointServiceContext\":\"eyl\",\"expirationTimeIfNotActivatedUtc\":\"2021-07-29T21:35:31Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"r\",\"messageForActivation\":\"hriypoqeyhlqhy\"},\"location\":\"rlpyznuciqdsmexi\",\"tags\":{\"stgnl\":\"fuxtyasiibmiybnn\",\"vmqfoud\":\"hnmgixhcm\"},\"id\":\"rhc\",\"name\":\"yyprotwyp\",\"type\":\"ndm\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"ugcmjkavlgorb\",\"endpointServiceContext\":\"tp\",\"expirationTimeIfNotActivatedUtc\":\"2021-04-24T03:15:03Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"NeverActivated\",\"endpointBaseUrl\":\"fvnz\",\"messageForActivation\":\"jtotpvopvpbd\"},\"location\":\"qgqqihedsvqwthmk\",\"tags\":{\"qcwdhoh\":\"cysihs\",\"sufco\":\"dtmcd\"},\"id\":\"dxbzlmcmuap\",\"name\":\"vhdbevwqqxey\",\"type\":\"ko\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"inkfkbgbz\",\"endpointServiceContext\":\"wxeqocljmygvkzqk\",\"expirationTimeIfNotActivatedUtc\":\"2021-11-02T08:39:43Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"Activated\",\"endpointBaseUrl\":\"fezrx\",\"messageForActivation\":\"zurtleipqxbkwvz\"},\"location\":\"zvd\",\"tags\":{\"xzmqpnodawop\":\"d\"},\"id\":\"hewjptmcgsbost\",\"name\":\"eln\",\"type\":\"la\"}],\"nextLink\":\"tmzlbiojlv\"}") .toObject(PartnerDestinationsListResult.class); - Assertions.assertEquals("nk", model.value().get(0).location()); - Assertions.assertEquals("qyikvy", model.value().get(0).tags().get("auy")); - Assertions.assertEquals(UUID.fromString("a9770cea-2fed-4c8e-a337-036477bbe2cf"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("umbnraauzzp", model.value().get(0).endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-18T00:50:05Z"), + Assertions.assertEquals("rlpyznuciqdsmexi", model.value().get(0).location()); + Assertions.assertEquals("fuxtyasiibmiybnn", model.value().get(0).tags().get("stgnl")); + Assertions.assertEquals("lt", model.value().get(0).partnerRegistrationImmutableId()); + Assertions.assertEquals("eyl", model.value().get(0).endpointServiceContext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T21:35:31Z"), model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, - model.value().get(0).activationState()); - Assertions.assertEquals("hezwwvaiq", model.value().get(0).endpointBaseUrl()); - Assertions.assertEquals("vv", model.value().get(0).messageForActivation()); - Assertions.assertEquals("qovekqvgqou", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerDestinationsListResult model = new PartnerDestinationsListResult().withValue(Arrays.asList( - new PartnerDestinationInner().withLocation("nk") - .withTags(mapOf("auy", "qyikvy", "y", "vluwmncsttij")) - .withPartnerRegistrationImmutableId(UUID.fromString("a9770cea-2fed-4c8e-a337-036477bbe2cf")) - .withEndpointServiceContext("umbnraauzzp") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-02-18T00:50:05Z")) - .withActivationState(PartnerDestinationActivationState.NEVER_ACTIVATED) - .withEndpointBaseUrl("hezwwvaiq") - .withMessageForActivation("vv"), - new PartnerDestinationInner().withLocation("ihfrbbcevqa") - .withTags(mapOf("py", "tdhlfkqo")) - .withPartnerRegistrationImmutableId(UUID.fromString("31b53cc4-c759-4379-92fc-ea9d95ba615d")) - .withEndpointServiceContext("ynscl") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-10-10T10:14:10Z")) - .withActivationState(PartnerDestinationActivationState.ACTIVATED) - .withEndpointBaseUrl("komtkubotppn") - .withMessageForActivation("xz"), - new PartnerDestinationInner().withLocation("zydvfvf") - .withTags(mapOf("gorf", "aeoisrvh")) - .withPartnerRegistrationImmutableId(UUID.fromString("5c2bdf21-b5fa-4df9-84c9-002ace5a40f4")) - .withEndpointServiceContext("cxvdfffwafqrouda") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-09-22T08:28:07Z")) - .withActivationState(PartnerDestinationActivationState.NEVER_ACTIVATED) - .withEndpointBaseUrl("vkbunzozudh") - .withMessageForActivation("gkmoyxcdyuibhmfd"), - new PartnerDestinationInner().withLocation("agt") - .withTags(mapOf("zldmozuxy", "ocqwogfnzjvus", "ysownbtgkbug", "fsbtkad", "pe", "jqctojcmisofie", - "hihihlhzdsqtzbsr", "ojyqdhcuplcplcw")) - .withPartnerRegistrationImmutableId(UUID.fromString("2b26d2b9-0897-4517-88b3-95e809c034b6")) - .withEndpointServiceContext("qhycavodggxdbees") - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-02-12T22:39:40Z")) - .withActivationState(PartnerDestinationActivationState.NEVER_ACTIVATED) - .withEndpointBaseUrl("riaa") - .withMessageForActivation("uagydwqfbylyrf"))) - .withNextLink("qovekqvgqou"); - model = BinaryData.fromObject(model).toObject(PartnerDestinationsListResult.class); - Assertions.assertEquals("nk", model.value().get(0).location()); - Assertions.assertEquals("qyikvy", model.value().get(0).tags().get("auy")); - Assertions.assertEquals(UUID.fromString("a9770cea-2fed-4c8e-a337-036477bbe2cf"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("umbnraauzzp", model.value().get(0).endpointServiceContext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-18T00:50:05Z"), - model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerDestinationActivationState.NEVER_ACTIVATED, - model.value().get(0).activationState()); - Assertions.assertEquals("hezwwvaiq", model.value().get(0).endpointBaseUrl()); - Assertions.assertEquals("vv", model.value().get(0).messageForActivation()); - Assertions.assertEquals("qovekqvgqou", 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; + Assertions.assertEquals(PartnerDestinationActivationState.ACTIVATED, model.value().get(0).activationState()); + Assertions.assertEquals("r", model.value().get(0).endpointBaseUrl()); + Assertions.assertEquals("hriypoqeyhlqhy", model.value().get(0).messageForActivation()); + Assertions.assertEquals("tmzlbiojlv", model.nextLink()); } } 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 index 21d9f79971c31..fa598867a0929 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,20 +12,11 @@ public final class PartnerDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerDetails model = BinaryData - .fromString("{\"description\":\"uqqoaj\",\"longDescription\":\"iygle\",\"setupUri\":\"wvaexhdctr\"}") + .fromString( + "{\"description\":\"pdxphlkksnmgzvyf\",\"longDescription\":\"dkz\",\"setupUri\":\"nwsithuqolyahluq\"}") .toObject(PartnerDetails.class); - Assertions.assertEquals("uqqoaj", model.description()); - Assertions.assertEquals("iygle", model.longDescription()); - Assertions.assertEquals("wvaexhdctr", model.setupUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerDetails model - = new PartnerDetails().withDescription("uqqoaj").withLongDescription("iygle").withSetupUri("wvaexhdctr"); - model = BinaryData.fromObject(model).toObject(PartnerDetails.class); - Assertions.assertEquals("uqqoaj", model.description()); - Assertions.assertEquals("iygle", model.longDescription()); - Assertions.assertEquals("wvaexhdctr", model.setupUri()); + Assertions.assertEquals("pdxphlkksnmgzvyf", model.description()); + Assertions.assertEquals("dkz", model.longDescription()); + Assertions.assertEquals("nwsithuqolyahluq", 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 index 9c11c8aafecdb..ab1502eea5a5a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,16 +11,16 @@ public final class PartnerEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PartnerEventSubscriptionDestinationProperties model = BinaryData.fromString("{\"resourceId\":\"zqauxzan\"}") + PartnerEventSubscriptionDestinationProperties model = BinaryData.fromString("{\"resourceId\":\"ddrtkgdojb\"}") .toObject(PartnerEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("zqauxzan", model.resourceId()); + Assertions.assertEquals("ddrtkgdojb", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerEventSubscriptionDestinationProperties model - = new PartnerEventSubscriptionDestinationProperties().withResourceId("zqauxzan"); + = new PartnerEventSubscriptionDestinationProperties().withResourceId("ddrtkgdojb"); model = BinaryData.fromObject(model).toObject(PartnerEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("zqauxzan", model.resourceId()); + Assertions.assertEquals("ddrtkgdojb", 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 index b3ca2b895faaf..8e9f3642c3f5d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,16 +12,16 @@ public final class PartnerEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerEventSubscriptionDestination model = BinaryData - .fromString("{\"endpointType\":\"PartnerDestination\",\"properties\":{\"resourceId\":\"vfruwkudrbcpft\"}}") + .fromString("{\"endpointType\":\"PartnerDestination\",\"properties\":{\"resourceId\":\"erteeammxqiekk\"}}") .toObject(PartnerEventSubscriptionDestination.class); - Assertions.assertEquals("vfruwkudrbcpft", model.resourceId()); + Assertions.assertEquals("erteeammxqiekk", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerEventSubscriptionDestination model - = new PartnerEventSubscriptionDestination().withResourceId("vfruwkudrbcpft"); + = new PartnerEventSubscriptionDestination().withResourceId("erteeammxqiekk"); model = BinaryData.fromObject(model).toObject(PartnerEventSubscriptionDestination.class); - Assertions.assertEquals("vfruwkudrbcpft", model.resourceId()); + Assertions.assertEquals("erteeammxqiekk", 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 index 1f070a2fe3eb3..67269ac466667 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,14 +20,14 @@ public final class PartnerNamespaceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerNamespaceInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"wyivqikf\"},\"groupIds\":[\"hrfsphuagrtti\",\"teusqczkvyklxu\",\"yja\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bl\",\"actionsRequired\":\"cuubgq\"},\"provisioningState\":\"Succeeded\"},\"id\":\"talmett\",\"name\":\"wgdsl\",\"type\":\"xih\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"oi\"},\"groupIds\":[\"eypxiutcxapzhyr\",\"etoge\",\"joxslhvnhla\",\"rqnkkzjcjbtr\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"vibr\",\"actionsRequired\":\"jsto\"},\"provisioningState\":\"Failed\"},\"id\":\"it\",\"name\":\"kxzt\",\"type\":\"oobklftidgfcwq\"}],\"provisioningState\":\"Failed\",\"partnerRegistrationFullyQualifiedId\":\"aqxzhemjyho\",\"minimumTlsVersionAllowed\":\"1.2\",\"endpoint\":\"wtwko\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"kb\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"wltlwtjjguktalh\",\"tags\":{\"iaaomylweazul\":\"kcdmxzrpoaimln\",\"jhlfzswpchwahf\":\"sethwwn\"},\"id\":\"ousnfepgfewe\",\"name\":\"wlyxgncxyk\",\"type\":\"hdjhlimmbcx\"}") + "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"fjhdg\"},\"groupIds\":[\"ebdunyg\",\"eqidbqfatpx\",\"lr\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"oadsuvar\",\"actionsRequired\":\"wdmjsjqbjhhyx\"},\"provisioningState\":\"Failed\"},\"id\":\"yc\",\"name\":\"duhpk\",\"type\":\"kgymareqnajxqug\"}],\"provisioningState\":\"Succeeded\",\"partnerRegistrationFullyQualifiedId\":\"cubeddgssofw\",\"minimumTlsVersionAllowed\":\"1.3\",\"endpoint\":\"alkrmn\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"cqqudf\",\"action\":\"Allow\"},{\"ipMask\":\"baaa\",\"action\":\"Allow\"},{\"ipMask\":\"ayffim\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"gsexne\",\"tags\":{\"zsyyceuzso\":\"nwnwme\"},\"id\":\"bjudpfrxtrthzv\",\"name\":\"ytdw\",\"type\":\"qbrqubpaxhexiili\"}") .toObject(PartnerNamespaceInner.class); - Assertions.assertEquals("wltlwtjjguktalh", model.location()); - Assertions.assertEquals("kcdmxzrpoaimln", model.tags().get("iaaomylweazul")); - Assertions.assertEquals("aqxzhemjyho", model.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("kb", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("gsexne", model.location()); + Assertions.assertEquals("nwnwme", model.tags().get("zsyyceuzso")); + Assertions.assertEquals("cubeddgssofw", model.partnerRegistrationFullyQualifiedId()); + Assertions.assertEquals(TlsVersion.ONE_THREE, model.minimumTlsVersionAllowed()); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); + Assertions.assertEquals("cqqudf", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertTrue(model.disableLocalAuth()); Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, model.partnerTopicRoutingMode()); @@ -35,21 +35,23 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerNamespaceInner model = new PartnerNamespaceInner().withLocation("wltlwtjjguktalh") - .withTags(mapOf("iaaomylweazul", "kcdmxzrpoaimln", "jhlfzswpchwahf", "sethwwn")) - .withPartnerRegistrationFullyQualifiedId("aqxzhemjyho") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("kb").withAction(IpActionType.ALLOW))) + PartnerNamespaceInner model = new PartnerNamespaceInner().withLocation("gsexne") + .withTags(mapOf("zsyyceuzso", "nwnwme")) + .withPartnerRegistrationFullyQualifiedId("cubeddgssofw") + .withMinimumTlsVersionAllowed(TlsVersion.ONE_THREE) + .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) + .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("cqqudf").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("baaa").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("ayffim").withAction(IpActionType.ALLOW))) .withDisableLocalAuth(true) .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER); model = BinaryData.fromObject(model).toObject(PartnerNamespaceInner.class); - Assertions.assertEquals("wltlwtjjguktalh", model.location()); - Assertions.assertEquals("kcdmxzrpoaimln", model.tags().get("iaaomylweazul")); - Assertions.assertEquals("aqxzhemjyho", model.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("kb", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("gsexne", model.location()); + Assertions.assertEquals("nwnwme", model.tags().get("zsyyceuzso")); + Assertions.assertEquals("cubeddgssofw", model.partnerRegistrationFullyQualifiedId()); + Assertions.assertEquals(TlsVersion.ONE_THREE, model.minimumTlsVersionAllowed()); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); + Assertions.assertEquals("cqqudf", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertTrue(model.disableLocalAuth()); Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, model.partnerTopicRoutingMode()); 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 index b7857193e8342..121fc8d2e5358 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -18,33 +18,32 @@ public final class PartnerNamespacePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerNamespaceProperties model = BinaryData.fromString( - "{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"rxvxcjzh\"},\"groupIds\":[\"xfpxtgqscja\",\"ftjuh\",\"qaz\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"uwpijr\",\"actionsRequired\":\"civmmg\"},\"provisioningState\":\"Updating\"},\"id\":\"fiwrxgkn\",\"name\":\"uvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"bqvgaqv\"},\"groupIds\":[\"fcq\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"etnwsdtutnw\",\"actionsRequired\":\"uycvuzhyrmewip\"},\"provisioningState\":\"Failed\"},\"id\":\"k\",\"name\":\"xukuqgsj\",\"type\":\"xundxgk\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"hhzjhfj\"},\"groupIds\":[\"vmuvgpmu\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"vmhfbuz\",\"actionsRequired\":\"ihsasb\"},\"provisioningState\":\"Canceled\"},\"id\":\"ypoh\",\"name\":\"uemsly\",\"type\":\"sqy\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"obrltt\"},\"groupIds\":[\"jnygq\",\"nfwqzdzgtilaxhn\",\"hqlyvijo\",\"wivkxo\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ixxrtikvcpw\",\"actionsRequired\":\"clrcivtsox\"},\"provisioningState\":\"Succeeded\"},\"id\":\"enxpmyyefr\",\"name\":\"mpdnqqskawa\",\"type\":\"qvmmbn\"}],\"provisioningState\":\"Canceled\",\"partnerRegistrationFullyQualifiedId\":\"tqlkz\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"itgvkx\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"fegcea\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"}") + "{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"r\"},\"groupIds\":[\"qoaxoruzfgs\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"rxxle\",\"actionsRequired\":\"ramxjezwlwnw\"},\"provisioningState\":\"Canceled\"},\"id\":\"cvydypatdoo\",\"name\":\"ojknio\",\"type\":\"kooebwnu\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"msbvdkcrodtjinf\"},\"groupIds\":[\"fltkacjv\",\"f\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"akggkfpag\",\"actionsRequired\":\"wpu\"},\"provisioningState\":\"Succeeded\"},\"id\":\"lyls\",\"name\":\"xkqjnsjervt\",\"type\":\"agxsdszuemps\"}],\"provisioningState\":\"Updating\",\"partnerRegistrationFullyQualifiedId\":\"z\",\"minimumTlsVersionAllowed\":\"1.3\",\"endpoint\":\"pnqi\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"jjxd\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"}") .toObject(PartnerNamespaceProperties.class); - Assertions.assertEquals("tqlkz", model.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("fegcea", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("z", model.partnerRegistrationFullyQualifiedId()); + Assertions.assertEquals(TlsVersion.ONE_THREE, model.minimumTlsVersionAllowed()); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); + Assertions.assertEquals("jjxd", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertFalse(model.disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, model.partnerTopicRoutingMode()); + Assertions.assertTrue(model.disableLocalAuth()); + Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, model.partnerTopicRoutingMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerNamespaceProperties model = new PartnerNamespaceProperties() - .withPartnerRegistrationFullyQualifiedId("tqlkz") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("fegcea").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE); + PartnerNamespaceProperties model = new PartnerNamespaceProperties().withPartnerRegistrationFullyQualifiedId("z") + .withMinimumTlsVersionAllowed(TlsVersion.ONE_THREE) + .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) + .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("jjxd").withAction(IpActionType.ALLOW))) + .withDisableLocalAuth(true) + .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER); model = BinaryData.fromObject(model).toObject(PartnerNamespaceProperties.class); - Assertions.assertEquals("tqlkz", model.partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("fegcea", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("z", model.partnerRegistrationFullyQualifiedId()); + Assertions.assertEquals(TlsVersion.ONE_THREE, model.minimumTlsVersionAllowed()); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); + Assertions.assertEquals("jjxd", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertFalse(model.disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, model.partnerTopicRoutingMode()); + Assertions.assertTrue(model.disableLocalAuth()); + Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, 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 index 16b05fdde112f..34651fb681bf7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,31 +17,30 @@ public final class PartnerNamespaceUpdateParameterPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerNamespaceUpdateParameterProperties model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"qgatjeaahhvjhhn\",\"action\":\"Allow\"},{\"ipMask\":\"bbjjidjksyxk\",\"action\":\"Allow\"},{\"ipMask\":\"evblbje\",\"action\":\"Allow\"},{\"ipMask\":\"lageuaulxun\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.2\",\"disableLocalAuth\":true}") + "{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"vsaznqntorudsg\",\"action\":\"Allow\"},{\"ipMask\":\"kycgrauwj\",\"action\":\"Allow\"},{\"ipMask\":\"eburu\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.2\",\"disableLocalAuth\":false}") .toObject(PartnerNamespaceUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("qgatjeaahhvjhhn", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); + Assertions.assertEquals("vsaznqntorudsg", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertTrue(model.disableLocalAuth()); + Assertions.assertFalse(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("qgatjeaahhvjhhn").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("bbjjidjksyxk").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("evblbje").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("lageuaulxun").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withDisableLocalAuth(true); + PartnerNamespaceUpdateParameterProperties model = new PartnerNamespaceUpdateParameterProperties() + .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) + .withInboundIpRules( + Arrays.asList(new InboundIpRule().withIpMask("vsaznqntorudsg").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("kycgrauwj").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("eburu").withAction(IpActionType.ALLOW))) + .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) + .withDisableLocalAuth(false); model = BinaryData.fromObject(model).toObject(PartnerNamespaceUpdateParameterProperties.class); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("qgatjeaahhvjhhn", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); + Assertions.assertEquals("vsaznqntorudsg", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertTrue(model.disableLocalAuth()); + Assertions.assertFalse(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 index 1f77045065e40..8495d469f0663 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -19,11 +19,11 @@ public final class PartnerNamespaceUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerNamespaceUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"qhlwigdivbkbxgo\":\"ymo\",\"vdaeyyguxakjsq\":\"fajuwas\"},\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"gims\",\"action\":\"Allow\"},{\"ipMask\":\"sicddyvv\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.0\",\"disableLocalAuth\":false}}") + "{\"tags\":{\"paztzpofncck\":\"ewyhml\",\"qa\":\"yfzqwhxxbu\",\"lxorjaltolmncws\":\"zfeqztppri\"},\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"bnwdcfh\",\"action\":\"Allow\"},{\"ipMask\":\"pfuvglsbjjca\",\"action\":\"Allow\"},{\"ipMask\":\"vtvudutncormr\",\"action\":\"Allow\"},{\"ipMask\":\"vcofudfl\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.0\",\"disableLocalAuth\":false}}") .toObject(PartnerNamespaceUpdateParameters.class); - Assertions.assertEquals("ymo", model.tags().get("qhlwigdivbkbxgo")); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("gims", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("ewyhml", model.tags().get("paztzpofncck")); + Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals("bnwdcfh", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); Assertions.assertFalse(model.disableLocalAuth()); @@ -32,16 +32,18 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerNamespaceUpdateParameters model = new PartnerNamespaceUpdateParameters() - .withTags(mapOf("qhlwigdivbkbxgo", "ymo", "vdaeyyguxakjsq", "fajuwas")) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("gims").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("sicddyvv").withAction(IpActionType.ALLOW))) + .withTags(mapOf("paztzpofncck", "ewyhml", "qa", "yfzqwhxxbu", "lxorjaltolmncws", "zfeqztppri")) + .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("bnwdcfh").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("pfuvglsbjjca").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("vtvudutncormr").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("vcofudfl").withAction(IpActionType.ALLOW))) .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) .withDisableLocalAuth(false); model = BinaryData.fromObject(model).toObject(PartnerNamespaceUpdateParameters.class); - Assertions.assertEquals("ymo", model.tags().get("qhlwigdivbkbxgo")); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("gims", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("ewyhml", model.tags().get("paztzpofncck")); + Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals("bnwdcfh", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); Assertions.assertFalse(model.disableLocalAuth()); 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 index 1a2de9261d5fa..24be5feea2112 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.partnerNamespaces().delete("vt", "o", com.azure.core.util.Context.NONE); + manager.partnerNamespaces().delete("rwjiyew", "fj", 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 index 5520d2718d4d2..6b8169aab1ac8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -25,7 +25,7 @@ public final class PartnerNamespacesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"zmudsqcm\",\"nxlzbuwodmach\",\"kvnrpbjrmvgoqpl\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"mkzdllczdprwnhk\",\"name\":\"qggoxsst\",\"type\":\"ivrakfrryn\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"lymg\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"rkemjpequlrlza\",\"name\":\"dgjtfbcla\",\"type\":\"kucddwnhczbutouc\"}],\"provisioningState\":\"Succeeded\",\"partnerRegistrationFullyQualifiedId\":\"rjwayhicqq\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"wkslvlized\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"n\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"xadyfhb\",\"tags\":{\"aqjsgyzstujr\":\"hojqttbspvkhg\",\"sf\":\"xrk\",\"qwrldaxur\":\"rlduyehiiittugy\"},\"id\":\"qa\",\"name\":\"csozjv\",\"type\":\"dzciggb\"}"; + = "{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"xrztiochlu\",\"ixmqrudjizcbf\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Canceled\"},\"id\":\"nfhiucnmfbcp\",\"name\":\"qktkrumzuedkyzbf\",\"type\":\"xo\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"uxqggvqrnhyhl\",\"cjsqggjhffbxr\",\"rkijpeuqlsdxeqz\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"wwmjs\",\"name\":\"en\",\"type\":\"wwa\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"qioulndhzyoeojht\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"vidmytzl\",\"name\":\"glxpnovyoanfbcsw\",\"type\":\"agyw\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"vjrktpgaeukyawoh\",\"mwhqnucsklh\",\"i\",\"sjt\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"injgazlsvbzfcpuo\",\"name\":\"e\",\"type\":\"wjcciklhsy\"}],\"provisioningState\":\"Creating\",\"partnerRegistrationFullyQualifiedId\":\"renxolriyehqbe\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"hydwbdbfgrlp\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"k\",\"action\":\"Allow\"},{\"ipMask\":\"pathubt\",\"action\":\"Allow\"},{\"ipMask\":\"an\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"wzsfftedousnktjt\",\"tags\":{\"btxxwpfhnjzud\":\"vaqogfkbebauzl\",\"qrhm\":\"tpzkgmeboywhcz\",\"rzwnyk\":\"gqbedygi\",\"chl\":\"id\"},\"id\":\"mpwctoflds\",\"name\":\"acdhztxkbr\",\"type\":\"g\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,17 +35,17 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerNamespace response = manager.partnerNamespaces() - .getByResourceGroupWithResponse("fibfiplhx", "nsmy", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("svvoqsbpkflanfk", "xsyaowuzowpuoh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xadyfhb", response.location()); - Assertions.assertEquals("hojqttbspvkhg", response.tags().get("aqjsgyzstujr")); - Assertions.assertEquals("rjwayhicqq", response.partnerRegistrationFullyQualifiedId()); + Assertions.assertEquals("wzsfftedousnktjt", response.location()); + Assertions.assertEquals("vaqogfkbebauzl", response.tags().get("btxxwpfhnjzud")); + Assertions.assertEquals("renxolriyehqbe", response.partnerRegistrationFullyQualifiedId()); Assertions.assertEquals(TlsVersion.ONE_ZERO, response.minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.publicNetworkAccess()); - Assertions.assertEquals("n", response.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, response.publicNetworkAccess()); + Assertions.assertEquals("k", response.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, response.inboundIpRules().get(0).action()); - Assertions.assertTrue(response.disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, response.partnerTopicRoutingMode()); + Assertions.assertFalse(response.disableLocalAuth()); + Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, 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 index bea1c6801ead8..a2fdc2f6ef2b6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -26,7 +26,7 @@ public final class PartnerNamespacesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"uqy\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"cwwmejjqh\",\"name\":\"dwvmqxiyookyfo\",\"type\":\"kbnzxbypfq\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"wrgr\",\"kderf\",\"swqi\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"w\",\"name\":\"g\",\"type\":\"gicwnxhtfmcqbs\"}],\"provisioningState\":\"Failed\",\"partnerRegistrationFullyQualifiedId\":\"gchzpgfqumj\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"zg\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"nrceqavfdbdfmmx\",\"action\":\"Allow\"},{\"ipMask\":\"juopjyyqm\",\"action\":\"Allow\"},{\"ipMask\":\"vcwloqd\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"wzobu\",\"tags\":{\"tdtkwppthuz\":\"xga\",\"imrljdp\":\"pr\",\"mhk\":\"qfxy\"},\"id\":\"tbaewhte\",\"name\":\"loamfmxtllfltym\",\"type\":\"cn\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"qnt\",\"cnawth\",\"maxgnuyeamcmhudf\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Canceled\"},\"id\":\"okwcpqtwl\",\"name\":\"esq\",\"type\":\"ggvrbnyrukoilaci\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"e\",\"pjlh\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"ruzythqkkwhbg\",\"name\":\"vellvulnxdmnitm\",\"type\":\"jdtvmclyymffhmj\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"xfzuvrzmzqmzj\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"vnmdyfoeboj\",\"name\":\"jpp\",\"type\":\"laohoqkp\"}],\"provisioningState\":\"Updating\",\"partnerRegistrationFullyQualifiedId\":\"jilaywkdcwmqsyri\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"dqaolfylnkk\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"ywltmfwobbjwhlwy\",\"action\":\"Allow\"},{\"ipMask\":\"zocrdzgczeu\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"q\",\"tags\":{\"gyrihlgm\":\"ekoifuvnyttzgi\",\"lkndrndpgfjodh\":\"behlqtxnr\"},\"id\":\"aqotwfhipxwgsabv\",\"name\":\"ipowza\",\"type\":\"czuumljcir\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,16 +36,16 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.partnerNamespaces() - .listByResourceGroup("lslekcttgzkj", "yqpdwadeghztld", 1838673940, com.azure.core.util.Context.NONE); + .listByResourceGroup("rwq", "xet", 1800883070, com.azure.core.util.Context.NONE); - Assertions.assertEquals("wzobu", response.iterator().next().location()); - Assertions.assertEquals("xga", response.iterator().next().tags().get("tdtkwppthuz")); - Assertions.assertEquals("gchzpgfqumj", response.iterator().next().partnerRegistrationFullyQualifiedId()); + Assertions.assertEquals("q", response.iterator().next().location()); + Assertions.assertEquals("ekoifuvnyttzgi", response.iterator().next().tags().get("gyrihlgm")); + Assertions.assertEquals("jilaywkdcwmqsyri", response.iterator().next().partnerRegistrationFullyQualifiedId()); Assertions.assertEquals(TlsVersion.ONE_ONE, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("nrceqavfdbdfmmx", response.iterator().next().inboundIpRules().get(0).ipMask()); + Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.iterator().next().publicNetworkAccess()); + Assertions.assertEquals("ywltmfwobbjwhlwy", response.iterator().next().inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertTrue(response.iterator().next().disableLocalAuth()); + Assertions.assertFalse(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 index 1cecffa5f0186..9c612cc788fab 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -26,7 +26,7 @@ public final class PartnerNamespacesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"imtwuuhau\",\"gnkwm\",\"feu\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"yrkwfugiph\",\"name\":\"rkuumn\",\"type\":\"durhzzfopueoqus\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"opwnib\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"zt\",\"name\":\"dqumqvfm\",\"type\":\"caddtgc\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"vgwy\",\"rbelfnzz\",\"yizwbxgdebxla\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"mirhpfabenq\",\"name\":\"am\",\"type\":\"mgewayxf\"}],\"provisioningState\":\"Succeeded\",\"partnerRegistrationFullyQualifiedId\":\"pjs\",\"minimumTlsVersionAllowed\":\"1.2\",\"endpoint\":\"mhcucsqsnxf\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"pdr\",\"action\":\"Allow\"},{\"ipMask\":\"bsuadulpodkaxp\",\"action\":\"Allow\"},{\"ipMask\":\"zh\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"eluqr\",\"tags\":{\"srkgz\":\"dhfztlra\",\"dbkuwpzqxlcwe\":\"yh\",\"qufqizj\":\"kfecjvxf\"},\"id\":\"ppwooaj\",\"name\":\"yyjmjjxiz\",\"type\":\"pxhn\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"s\",\"zaj\",\"nsjhwjuyxxb\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"uaytuadxk\",\"name\":\"eqbw\",\"type\":\"ntghyksarcdr\"}],\"provisioningState\":\"Succeeded\",\"partnerRegistrationFullyQualifiedId\":\"u\",\"minimumTlsVersionAllowed\":\"1.2\",\"endpoint\":\"adltxkpbqhvfdq\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"wzdanojisgglmvo\",\"action\":\"Allow\"},{\"ipMask\":\"ztjctibpvbkae\",\"action\":\"Allow\"},{\"ipMask\":\"zygdfwa\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"kxh\",\"tags\":{\"j\":\"wljuxlkbectvt\",\"wp\":\"skdchmaiubavl\",\"jqafkmkro\":\"gmfalkzazmgoked\",\"pqrtvaoznqni\":\"zrthqet\"},\"id\":\"iezeagm\",\"name\":\"eituugedhfpjs\",\"type\":\"lzmb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,17 +36,17 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.partnerNamespaces().list("walzyxwhoeamoeo", 847665522, com.azure.core.util.Context.NONE); + = manager.partnerNamespaces().list("pefyc", 1365265571, com.azure.core.util.Context.NONE); - Assertions.assertEquals("eluqr", response.iterator().next().location()); - Assertions.assertEquals("dhfztlra", response.iterator().next().tags().get("srkgz")); - Assertions.assertEquals("pjs", response.iterator().next().partnerRegistrationFullyQualifiedId()); + Assertions.assertEquals("kxh", response.iterator().next().location()); + Assertions.assertEquals("wljuxlkbectvt", response.iterator().next().tags().get("j")); + Assertions.assertEquals("u", response.iterator().next().partnerRegistrationFullyQualifiedId()); Assertions.assertEquals(TlsVersion.ONE_TWO, response.iterator().next().minimumTlsVersionAllowed()); Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("pdr", response.iterator().next().inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("wzdanojisgglmvo", response.iterator().next().inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); Assertions.assertFalse(response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, + 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 index a296fae46c8c5..dd18bb471b034 100644 --- 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 @@ -1,94 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.PartnerNamespacesListResult; 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\":\"lsvxeizz\",\"name\":\"wklnsrmffeyc\",\"type\":\"ckt\"},{\"properties\":{},\"id\":\"ymerteeammxq\",\"name\":\"ekkkzd\",\"type\":\"rtkgdojbmxvavref\"},{\"properties\":{},\"id\":\"esvecuijpx\",\"name\":\"xs\",\"type\":\"wprtu\"},{\"properties\":{},\"id\":\"sawddjibabxvi\",\"name\":\"itvtzeexavo\",\"type\":\"tfgle\"}],\"provisioningState\":\"Updating\",\"partnerRegistrationFullyQualifiedId\":\"qbw\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"tgsfja\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"xudb\",\"action\":\"Allow\"},{\"ipMask\":\"htnsi\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"sckdlp\",\"tags\":{\"xdfgsftufqobr\":\"rcxfailcfxwmdb\",\"knh\":\"lnacgcc\",\"zvulj\":\"kizvytn\",\"qnvb\":\"aaeranokqgukk\"},\"id\":\"oylaxxul\",\"name\":\"disdosfjbjsvgj\",\"type\":\"whryvycytdcl\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"nfnw\",\"name\":\"btmvpdvjdhttza\",\"type\":\"fedxihchrphkm\"},{\"properties\":{},\"id\":\"jdqnsdfzpbgt\",\"name\":\"kylkdghrj\",\"type\":\"uutlwxezwzhok\"},{\"properties\":{},\"id\":\"wnhhtqlgehgppip\",\"name\":\"fhpfeoajvgcxtx\",\"type\":\"csheafidltugsr\"},{\"properties\":{},\"id\":\"mks\",\"name\":\"jhoiftxfkfweg\",\"type\":\"rhptilluc\"}],\"provisioningState\":\"Deleting\",\"partnerRegistrationFullyQualifiedId\":\"gdqoh\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"ldrizetpwbra\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"hbqzmizakakankjp\",\"action\":\"Allow\"},{\"ipMask\":\"ha\",\"action\":\"Allow\"},{\"ipMask\":\"hjlmu\",\"action\":\"Allow\"},{\"ipMask\":\"rimrs\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"SourceEventAttribute\"},\"location\":\"eislstvasylwx\",\"tags\":{\"athwt\":\"umweoohguufuzboy\",\"ebwjscjpahlxvea\":\"olbaemwmdx\",\"xnmwmqtibxyijddt\":\"f\",\"ekpndzaapmudq\":\"qcttadijaeukmrsi\"},\"id\":\"eqw\",\"name\":\"gp\",\"type\":\"bu\"}],\"nextLink\":\"wyxebeybpmzz\"}") + "{\"value\":[{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"mqoefkifrvtpuqu\",\"name\":\"mqlgk\",\"type\":\"btndo\"}],\"provisioningState\":\"Canceled\",\"partnerRegistrationFullyQualifiedId\":\"bjcntujitc\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"twwaezkojvdcpzf\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"ybxarzgszu\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"idoamciodhkha\",\"tags\":{\"ntoe\":\"hnzbonl\",\"hksz\":\"okdwb\",\"bt\":\"cmrvexzt\"},\"id\":\"gsfraoyzkoow\",\"name\":\"lmnguxaw\",\"type\":\"aldsy\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"rqf\",\"name\":\"bw\",\"type\":\"znkbykutwpfhpagm\"},{\"properties\":{},\"id\":\"kdsnfdsdoakgtdl\",\"name\":\"kkze\",\"type\":\"dlhewp\"},{\"properties\":{},\"id\":\"sttwvogvbbe\",\"name\":\"dcngqqmoakufgmj\",\"type\":\"rwr\"},{\"properties\":{},\"id\":\"twaenuuzko\",\"name\":\"bminrfdwoyuhhzi\",\"type\":\"iefozbhdmsml\"}],\"provisioningState\":\"Failed\",\"partnerRegistrationFullyQualifiedId\":\"oftrmaequia\",\"minimumTlsVersionAllowed\":\"1.1\",\"endpoint\":\"slfaoqzpiyyl\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"hc\",\"action\":\"Allow\"},{\"ipMask\":\"kaivwit\",\"action\":\"Allow\"},{\"ipMask\":\"wuggwolu\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"ai\",\"tags\":{\"w\":\"rgzdwmsweyp\"},\"id\":\"xggicccnxqhuexmk\",\"name\":\"tlstvlzywem\",\"type\":\"zrncsdt\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"pbsfgytgu\",\"name\":\"lfeadcygq\",\"type\":\"kyhejhzisxgf\"},{\"properties\":{},\"id\":\"olppvksrpqvujz\",\"name\":\"aehtwd\",\"type\":\"r\"}],\"provisioningState\":\"Failed\",\"partnerRegistrationFullyQualifiedId\":\"iby\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"bhshfwpracstwity\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"cedcpnmdy\",\"action\":\"Allow\"},{\"ipMask\":\"zxltjcvn\",\"action\":\"Allow\"},{\"ipMask\":\"ugcxnavvwxq\",\"action\":\"Allow\"},{\"ipMask\":\"unyowxwl\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"bvfvpdbod\",\"tags\":{\"rribd\":\"zsjqlh\",\"vxndz\":\"ibqipqkg\",\"yhgbijtjivfx\":\"mkrefajpjorwkq\"},\"id\":\"sjabibs\",\"name\":\"stawfsdjpvkv\",\"type\":\"bjxbkzbzk\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"budurgkakmo\",\"name\":\"zhjjklffhmouwq\",\"type\":\"gzrf\"},{\"properties\":{},\"id\":\"yebizikayuh\",\"name\":\"lbjbsyb\",\"type\":\"qwrvtldgmfp\"},{\"properties\":{},\"id\":\"pip\",\"name\":\"slthaq\",\"type\":\"x\"},{\"properties\":{},\"id\":\"wutwbdsre\",\"name\":\"pdrhne\",\"type\":\"yowqkdwytisibir\"}],\"provisioningState\":\"Deleting\",\"partnerRegistrationFullyQualifiedId\":\"kpzi\",\"minimumTlsVersionAllowed\":\"1.0\",\"endpoint\":\"anlfzxiavrmbz\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"rjqc\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"partnerTopicRoutingMode\":\"ChannelNameHeader\"},\"location\":\"azszrnwoiindfpw\",\"tags\":{\"sj\":\"lwbtlhf\",\"bgofeljag\":\"dhszfjv\",\"jnalghf\":\"qmqhldvriii\",\"hahhxvrhmzkwpj\":\"vtvsexsowueluq\"},\"id\":\"wws\",\"name\":\"ughftqsx\",\"type\":\"qxujxukndxd\"}],\"nextLink\":\"rjguufzdmsyqtf\"}") .toObject(PartnerNamespacesListResult.class); - Assertions.assertEquals("sckdlp", model.value().get(0).location()); - Assertions.assertEquals("rcxfailcfxwmdb", model.value().get(0).tags().get("xdfgsftufqobr")); - Assertions.assertEquals("qbw", model.value().get(0).partnerRegistrationFullyQualifiedId()); + Assertions.assertEquals("idoamciodhkha", model.value().get(0).location()); + Assertions.assertEquals("hnzbonl", model.value().get(0).tags().get("ntoe")); + Assertions.assertEquals("bjcntujitc", model.value().get(0).partnerRegistrationFullyQualifiedId()); Assertions.assertEquals(TlsVersion.ONE_ZERO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("xudb", model.value().get(0).inboundIpRules().get(0).ipMask()); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.value().get(0).publicNetworkAccess()); + Assertions.assertEquals("ybxarzgszu", model.value().get(0).inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertFalse(model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, + Assertions.assertTrue(model.value().get(0).disableLocalAuth()); + Assertions.assertEquals(PartnerTopicRoutingMode.CHANNEL_NAME_HEADER, model.value().get(0).partnerTopicRoutingMode()); - Assertions.assertEquals("wyxebeybpmzz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerNamespacesListResult model - = new PartnerNamespacesListResult() - .withValue(Arrays.asList( - new PartnerNamespaceInner().withLocation("sckdlp") - .withTags(mapOf("xdfgsftufqobr", "rcxfailcfxwmdb", "knh", "lnacgcc", "zvulj", "kizvytn", "qnvb", - "aaeranokqgukk")) - .withPartnerRegistrationFullyQualifiedId("qbw") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("xudb").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("htnsi").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE), - new PartnerNamespaceInner().withLocation("eislstvasylwx") - .withTags(mapOf("athwt", "umweoohguufuzboy", "ebwjscjpahlxvea", "olbaemwmdx", - "xnmwmqtibxyijddt", "f", "ekpndzaapmudq", "qcttadijaeukmrsi")) - .withPartnerRegistrationFullyQualifiedId("gdqoh") - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules(Arrays.asList( - new InboundIpRule().withIpMask("hbqzmizakakankjp").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ha").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("hjlmu").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("rimrs").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withPartnerTopicRoutingMode(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE))) - .withNextLink("wyxebeybpmzz"); - model = BinaryData.fromObject(model).toObject(PartnerNamespacesListResult.class); - Assertions.assertEquals("sckdlp", model.value().get(0).location()); - Assertions.assertEquals("rcxfailcfxwmdb", model.value().get(0).tags().get("xdfgsftufqobr")); - Assertions.assertEquals("qbw", model.value().get(0).partnerRegistrationFullyQualifiedId()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.value().get(0).minimumTlsVersionAllowed()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("xudb", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertFalse(model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(PartnerTopicRoutingMode.SOURCE_EVENT_ATTRIBUTE, - model.value().get(0).partnerTopicRoutingMode()); - Assertions.assertEquals("wyxebeybpmzz", 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; + Assertions.assertEquals("rjguufzdmsyqtf", model.nextLink()); } } 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 index 3c7dd73d83f20..734b8842d6fc1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -8,32 +8,28 @@ 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\":\"Creating\",\"partnerRegistrationImmutableId\":\"9004a622-fc50-4436-9b23-8657bd9adc4f\"},\"location\":\"dlcgqlsismjqfr\",\"tags\":{\"iosrsjuivfcdis\":\"amqu\",\"czexrxzbujrtrhqv\":\"irnxz\",\"zlrpiqywncvj\":\"revkhgnlnzo\",\"hgbjkvrelje\":\"szcofizeht\"},\"id\":\"murvzm\",\"name\":\"ov\",\"type\":\"anashc\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"partnerRegistrationImmutableId\":\"pn\"},\"location\":\"vcwwyyurmochppr\",\"tags\":{\"bzpcpiljhahzvec\":\"nmokayzejnhlbk\",\"lewjwiuubwef\":\"ndbnwieh\",\"ex\":\"sfapaqtferrq\"},\"id\":\"kmfx\",\"name\":\"pjwogqqno\",\"type\":\"pud\"}") .toObject(PartnerRegistrationInner.class); - Assertions.assertEquals("dlcgqlsismjqfr", model.location()); - Assertions.assertEquals("amqu", model.tags().get("iosrsjuivfcdis")); - Assertions.assertEquals(UUID.fromString("9004a622-fc50-4436-9b23-8657bd9adc4f"), - model.partnerRegistrationImmutableId()); + Assertions.assertEquals("vcwwyyurmochppr", model.location()); + Assertions.assertEquals("nmokayzejnhlbk", model.tags().get("bzpcpiljhahzvec")); + Assertions.assertEquals("pn", model.partnerRegistrationImmutableId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerRegistrationInner model = new PartnerRegistrationInner().withLocation("dlcgqlsismjqfr") - .withTags(mapOf("iosrsjuivfcdis", "amqu", "czexrxzbujrtrhqv", "irnxz", "zlrpiqywncvj", "revkhgnlnzo", - "hgbjkvrelje", "szcofizeht")) - .withPartnerRegistrationImmutableId(UUID.fromString("9004a622-fc50-4436-9b23-8657bd9adc4f")); + PartnerRegistrationInner model = new PartnerRegistrationInner().withLocation("vcwwyyurmochppr") + .withTags(mapOf("bzpcpiljhahzvec", "nmokayzejnhlbk", "lewjwiuubwef", "ndbnwieh", "ex", "sfapaqtferrq")) + .withPartnerRegistrationImmutableId("pn"); model = BinaryData.fromObject(model).toObject(PartnerRegistrationInner.class); - Assertions.assertEquals("dlcgqlsismjqfr", model.location()); - Assertions.assertEquals("amqu", model.tags().get("iosrsjuivfcdis")); - Assertions.assertEquals(UUID.fromString("9004a622-fc50-4436-9b23-8657bd9adc4f"), - model.partnerRegistrationImmutableId()); + Assertions.assertEquals("vcwwyyurmochppr", model.location()); + Assertions.assertEquals("nmokayzejnhlbk", model.tags().get("bzpcpiljhahzvec")); + Assertions.assertEquals("pn", model.partnerRegistrationImmutableId()); } // Use "Map.of" if available 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 index fd7c928a88a0e..f4f5d5732f035 100644 --- 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 @@ -1,30 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"Succeeded\",\"partnerRegistrationImmutableId\":\"919503fa-b152-4fac-828a-d4001f5cbd60\"}") + PartnerRegistrationProperties model = BinaryData + .fromString("{\"provisioningState\":\"Succeeded\",\"partnerRegistrationImmutableId\":\"tqwpwya\"}") .toObject(PartnerRegistrationProperties.class); - Assertions.assertEquals(UUID.fromString("919503fa-b152-4fac-828a-d4001f5cbd60"), - model.partnerRegistrationImmutableId()); + Assertions.assertEquals("tqwpwya", model.partnerRegistrationImmutableId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerRegistrationProperties model = new PartnerRegistrationProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("919503fa-b152-4fac-828a-d4001f5cbd60")); + PartnerRegistrationProperties model + = new PartnerRegistrationProperties().withPartnerRegistrationImmutableId("tqwpwya"); model = BinaryData.fromObject(model).toObject(PartnerRegistrationProperties.class); - Assertions.assertEquals(UUID.fromString("919503fa-b152-4fac-828a-d4001f5cbd60"), - model.partnerRegistrationImmutableId()); + Assertions.assertEquals("tqwpwya", 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 index ce0a8f17aba5d..3aad9bbfa488a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,18 +13,18 @@ public final class PartnerRegistrationUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PartnerRegistrationUpdateParameters model - = BinaryData.fromString("{\"tags\":{\"zsdbccxjmon\":\"rbdkelvidiz\",\"uqj\":\"dgnwncypuuwwlt\"}}") - .toObject(PartnerRegistrationUpdateParameters.class); - Assertions.assertEquals("rbdkelvidiz", model.tags().get("zsdbccxjmon")); + PartnerRegistrationUpdateParameters model = BinaryData.fromString( + "{\"tags\":{\"oguyaip\":\"asqbucljgkyex\",\"waz\":\"dsdaultxijjumf\",\"jng\":\"nqnm\",\"bjwgnyfus\":\"qdqx\"}}") + .toObject(PartnerRegistrationUpdateParameters.class); + Assertions.assertEquals("asqbucljgkyex", model.tags().get("oguyaip")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerRegistrationUpdateParameters model = new PartnerRegistrationUpdateParameters() - .withTags(mapOf("zsdbccxjmon", "rbdkelvidiz", "uqj", "dgnwncypuuwwlt")); + .withTags(mapOf("oguyaip", "asqbucljgkyex", "waz", "dsdaultxijjumf", "jng", "nqnm", "bjwgnyfus", "qdqx")); model = BinaryData.fromObject(model).toObject(PartnerRegistrationUpdateParameters.class); - Assertions.assertEquals("rbdkelvidiz", model.tags().get("zsdbccxjmon")); + Assertions.assertEquals("asqbucljgkyex", model.tags().get("oguyaip")); } // Use "Map.of" if available 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 index 9f50acd4ae2da..a86874cde1b08 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,7 +15,6 @@ 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; @@ -24,7 +23,7 @@ public final class PartnerRegistrationsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerRegistrationImmutableId\":\"80a1a863-33c0-47fa-bbe0-77609c768b00\"},\"location\":\"zo\",\"tags\":{\"oxfaxdtn\":\"mfmvsmc\"},\"id\":\"i\",\"name\":\"bsat\",\"type\":\"oiauesugmocpcj\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerRegistrationImmutableId\":\"dtzxsoe\"},\"location\":\"lwglihezomucmqg\",\"tags\":{\"tlzlmtrlxcznnhz\":\"ionetbzdrdpuenxk\",\"tygeqzus\":\"bnbmxlxm\"},\"id\":\"toqcahfsgbjm\",\"name\":\"reesrfwsszvl\",\"type\":\"wliso\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,17 +33,16 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerRegistration response = manager.partnerRegistrations() - .define("phmdzxplgtp") - .withRegion("zmgschnzrsbkkzov") - .withExistingResourceGroup("mbzayspzvrietv") - .withTags(mapOf("rimm", "mnfmfwsxafofuw", "nyrvaprtgelg", "vzwdehkkmvhzfov")) - .withPartnerRegistrationImmutableId(UUID.fromString("841fbb2c-1661-46dd-bc10-71f292ce68d0")) + .define("zlgzawkgyepey") + .withRegion("tdhuo") + .withExistingResourceGroup("fpcfjf") + .withTags(mapOf("qazihqodvqgcnb", "qp", "mfmeftvhkmoo", "cbmjkztibniyntsx")) + .withPartnerRegistrationImmutableId("dmdiawpzxkzrntm") .create(); - Assertions.assertEquals("zo", response.location()); - Assertions.assertEquals("mfmvsmc", response.tags().get("oxfaxdtn")); - Assertions.assertEquals(UUID.fromString("80a1a863-33c0-47fa-bbe0-77609c768b00"), - response.partnerRegistrationImmutableId()); + Assertions.assertEquals("lwglihezomucmqg", response.location()); + Assertions.assertEquals("ionetbzdrdpuenxk", response.tags().get("tlzlmtrlxcznnhz")); + Assertions.assertEquals("dtzxsoe", response.partnerRegistrationImmutableId()); } // Use "Map.of" if available 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 index e2efac079f2f0..3c3f8f7191a8a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.partnerRegistrations().delete("btsertoxa", "hxuvjhxm", com.azure.core.util.Context.NONE); + manager.partnerRegistrations().delete("guzbuw", "orbalkj", 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 index 27743dc7bb59c..56a9e0e412aa0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,7 +13,6 @@ 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; @@ -22,7 +21,7 @@ public final class PartnerRegistrationsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"partnerRegistrationImmutableId\":\"b0df1bff-fd49-4454-8c10-96b8e84f438d\"},\"location\":\"ifleimixlmd\",\"tags\":{\"rjuqbpxtokl\":\"cehfgsm\",\"rcltungbsoljckm\":\"mtznpaxwfqtyyqi\",\"zbkuckgkdsksw\":\"i\",\"woykdnonaaxwm\":\"iiqqcqikclsmalns\"},\"id\":\"zrujlqcwnyn\",\"name\":\"lei\",\"type\":\"bcbgv\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"partnerRegistrationImmutableId\":\"kkcxwnujvqynvav\"},\"location\":\"mdmuqoh\",\"tags\":{\"ddrwjcljbrhlhpvz\":\"raxq\",\"inafhxrzfrm\":\"dbwen\",\"ukhk\":\"ztiucwviql\",\"cbvzarmqcb\":\"cqx\"},\"id\":\"okstsinvagovjyh\",\"name\":\"rxbrdv\",\"type\":\"ehqwhitxnmxgn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +31,11 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerRegistration response = manager.partnerRegistrations() - .getByResourceGroupWithResponse("dtullygtavczcxdf", "eapyfmlxrlj", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("hjvpzaptu", "skaoizjixwf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ifleimixlmd", response.location()); - Assertions.assertEquals("cehfgsm", response.tags().get("rjuqbpxtokl")); - Assertions.assertEquals(UUID.fromString("b0df1bff-fd49-4454-8c10-96b8e84f438d"), - response.partnerRegistrationImmutableId()); + Assertions.assertEquals("mdmuqoh", response.location()); + Assertions.assertEquals("raxq", response.tags().get("ddrwjcljbrhlhpvz")); + Assertions.assertEquals("kkcxwnujvqynvav", 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 index 5baeba8eaf25c..2ca8ead6dee27 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,7 +14,6 @@ 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; @@ -23,7 +22,7 @@ public final class PartnerRegistrationsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"partnerRegistrationImmutableId\":\"af441071-a7bb-4098-a142-6e889907420c\"},\"location\":\"dccgndjgdpriggqq\",\"tags\":{\"buu\":\"f\",\"igi\":\"pyuflqjfshtujcyo\"},\"id\":\"wdcsk\",\"name\":\"kqnqvkixnmbzme\",\"type\":\"uyrzw\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"partnerRegistrationImmutableId\":\"lxu\"},\"location\":\"qcckqiawzlz\",\"tags\":{\"izuxlrarwpewsaud\":\"slga\",\"sx\":\"ejtig\",\"qbalahovuuwxhme\":\"pytn\",\"oti\":\"jnhj\"},\"id\":\"fbbcngkegxcypxbb\",\"name\":\"etwilyrzoxpd\",\"type\":\"qlf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +32,10 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.partnerRegistrations() - .listByResourceGroup("ryfmxmdu", "zf", 1040410248, com.azure.core.util.Context.NONE); + .listByResourceGroup("bkbdhlltqstqkqs", "gxiynecovagzk", 1277450138, com.azure.core.util.Context.NONE); - Assertions.assertEquals("dccgndjgdpriggqq", response.iterator().next().location()); - Assertions.assertEquals("f", response.iterator().next().tags().get("buu")); - Assertions.assertEquals(UUID.fromString("af441071-a7bb-4098-a142-6e889907420c"), - response.iterator().next().partnerRegistrationImmutableId()); + Assertions.assertEquals("qcckqiawzlz", response.iterator().next().location()); + Assertions.assertEquals("slga", response.iterator().next().tags().get("izuxlrarwpewsaud")); + Assertions.assertEquals("lxu", 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 index 6e573c17e76de..d7ee8f927de87 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,7 +14,6 @@ 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; @@ -23,7 +22,7 @@ public final class PartnerRegistrationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"partnerRegistrationImmutableId\":\"d1d7ac97-0466-42e4-a656-64577a127766\"},\"location\":\"vnpvvd\",\"tags\":{\"mwbitekdtfo\":\"naqyqipslzmvcds\",\"zdqekivycpzcvd\":\"vfiybxqichgyb\"},\"id\":\"zulrqt\",\"name\":\"htre\",\"type\":\"pzl\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"partnerRegistrationImmutableId\":\"ahwkxjjm\"},\"location\":\"nlmsoo\",\"tags\":{\"veajczxvlgsrg\":\"vecdhdyswcrp\",\"ywlptyuqh\":\"rfizr\",\"fuofixcnpcfykkp\":\"lmcskyk\"},\"id\":\"ycpawm\",\"name\":\"jp\",\"type\":\"dpwrp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +32,10 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.partnerRegistrations().list("rqstjcme", 349818575, com.azure.core.util.Context.NONE); + = manager.partnerRegistrations().list("olqownki", 1490254156, com.azure.core.util.Context.NONE); - Assertions.assertEquals("vnpvvd", response.iterator().next().location()); - Assertions.assertEquals("naqyqipslzmvcds", response.iterator().next().tags().get("mwbitekdtfo")); - Assertions.assertEquals(UUID.fromString("d1d7ac97-0466-42e4-a656-64577a127766"), - response.iterator().next().partnerRegistrationImmutableId()); + Assertions.assertEquals("nlmsoo", response.iterator().next().location()); + Assertions.assertEquals("vecdhdyswcrp", response.iterator().next().tags().get("veajczxvlgsrg")); + Assertions.assertEquals("ahwkxjjm", 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 index 67b18715f3cf9..25ca8bad79714 100644 --- 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 @@ -1,68 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.eventgrid.implementation.models.PartnerRegistrationsListResult; 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\":\"Updating\",\"partnerRegistrationImmutableId\":\"9d5780a1-fac8-4194-a6a1-cf7488dec59d\"},\"location\":\"fzzhmkdasv\",\"tags\":{\"chxgs\":\"hbxcu\",\"vizbfhfo\":\"boldforobwj\",\"bbelawumuaslzk\":\"vacqpbtuodxesz\"},\"id\":\"rrwoycqucwyhahn\",\"name\":\"mdr\",\"type\":\"ywuhpsvfuur\"},{\"properties\":{\"provisioningState\":\"Updating\",\"partnerRegistrationImmutableId\":\"fd27ccbd-9552-4468-ad85-0e0eedcf2883\"},\"location\":\"xwlalniexzsrzpg\",\"tags\":{\"chzyvlixqnrk\":\"tybbwwpgda\"},\"id\":\"xkjibnxmy\",\"name\":\"uxswqrntvl\",\"type\":\"ijpstte\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"partnerRegistrationImmutableId\":\"5250a29d-3710-4f22-8e9d-dd505cf743bf\"},\"location\":\"cyyufmh\",\"tags\":{\"cdqzhlctddu\":\"cuwmqsp\"},\"id\":\"qn\",\"name\":\"yfp\",\"type\":\"hrqbnjjrcg\"},{\"properties\":{\"provisioningState\":\"Creating\",\"partnerRegistrationImmutableId\":\"5c146287-85cc-4b79-a13d-99a0b517991f\"},\"location\":\"boxjumvq\",\"tags\":{\"jtlo\":\"ihrraiouaub\",\"iflrzpasccbiu\":\"xfuojrn\",\"ufdvruz\":\"mzdlyjdfqwmkyo\",\"hpc\":\"lzo\"},\"id\":\"fnmdxotn\",\"name\":\"fdgugeyzi\",\"type\":\"grkyuizabsnmfpph\"}],\"nextLink\":\"eevy\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"partnerRegistrationImmutableId\":\"ikzhajqglcfhmlrq\"},\"location\":\"xynqnz\",\"tags\":{\"abpfhvfs\":\"sovwxznptgoeiyb\"},\"id\":\"kvntjlrigjkskyri\",\"name\":\"ovzidsx\",\"type\":\"aabzmif\"},{\"properties\":{\"provisioningState\":\"Creating\",\"partnerRegistrationImmutableId\":\"mmaxrizkzobgo\"},\"location\":\"lhslnelxieixyn\",\"tags\":{\"tifdwfmvi\":\"ecwcrojphslhcawj\",\"bttzhraglkafhonq\":\"orq\"},\"id\":\"ujeickp\",\"name\":\"vcpopmxe\",\"type\":\"nwcl\"},{\"properties\":{\"provisioningState\":\"Updating\",\"partnerRegistrationImmutableId\":\"ex\"},\"location\":\"lfmk\",\"tags\":{\"z\":\"azuawx\",\"xcushs\":\"puamwabzxr\"},\"id\":\"haivm\",\"name\":\"yasflvgsgzwy\",\"type\":\"akoi\"},{\"properties\":{\"provisioningState\":\"Failed\",\"partnerRegistrationImmutableId\":\"jblmljhlnymz\"},\"location\":\"qyryuzcbmqqvxm\",\"tags\":{\"nh\":\"gtayxonsupeujlz\",\"xfyqonmpqoxwdo\":\"vsqltnzoibgsxg\",\"iiqbi\":\"dbxiqx\"},\"id\":\"htmwwinh\",\"name\":\"hfqpofv\",\"type\":\"bcblemb\"}],\"nextLink\":\"bwvqvxkdi\"}") .toObject(PartnerRegistrationsListResult.class); - Assertions.assertEquals("fzzhmkdasv", model.value().get(0).location()); - Assertions.assertEquals("hbxcu", model.value().get(0).tags().get("chxgs")); - Assertions.assertEquals(UUID.fromString("9d5780a1-fac8-4194-a6a1-cf7488dec59d"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("eevy", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerRegistrationsListResult model - = new PartnerRegistrationsListResult() - .withValue(Arrays.asList( - new PartnerRegistrationInner().withLocation("fzzhmkdasv") - .withTags( - mapOf("chxgs", "hbxcu", "vizbfhfo", "boldforobwj", "bbelawumuaslzk", "vacqpbtuodxesz")) - .withPartnerRegistrationImmutableId(UUID.fromString("9d5780a1-fac8-4194-a6a1-cf7488dec59d")), - new PartnerRegistrationInner().withLocation("xwlalniexzsrzpg") - .withTags(mapOf("chzyvlixqnrk", "tybbwwpgda")) - .withPartnerRegistrationImmutableId(UUID.fromString("fd27ccbd-9552-4468-ad85-0e0eedcf2883")), - new PartnerRegistrationInner().withLocation("cyyufmh") - .withTags(mapOf("cdqzhlctddu", "cuwmqsp")) - .withPartnerRegistrationImmutableId(UUID.fromString("5250a29d-3710-4f22-8e9d-dd505cf743bf")), - new PartnerRegistrationInner().withLocation("boxjumvq") - .withTags(mapOf("jtlo", "ihrraiouaub", "iflrzpasccbiu", "xfuojrn", "ufdvruz", "mzdlyjdfqwmkyo", - "hpc", "lzo")) - .withPartnerRegistrationImmutableId(UUID.fromString("5c146287-85cc-4b79-a13d-99a0b517991f")))) - .withNextLink("eevy"); - model = BinaryData.fromObject(model).toObject(PartnerRegistrationsListResult.class); - Assertions.assertEquals("fzzhmkdasv", model.value().get(0).location()); - Assertions.assertEquals("hbxcu", model.value().get(0).tags().get("chxgs")); - Assertions.assertEquals(UUID.fromString("9d5780a1-fac8-4194-a6a1-cf7488dec59d"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("eevy", 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; + Assertions.assertEquals("xynqnz", model.value().get(0).location()); + Assertions.assertEquals("sovwxznptgoeiyb", model.value().get(0).tags().get("abpfhvfs")); + Assertions.assertEquals("ikzhajqglcfhmlrq", model.value().get(0).partnerRegistrationImmutableId()); + Assertions.assertEquals("bwvqvxkdi", model.nextLink()); } } 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 index 9f3561d1318cc..36bc74c5f03fc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.partnerTopicEventSubscriptions() - .delete("qirvtk", "yhhmvfxl", "pjajodmkrrwe", com.azure.core.util.Context.NONE); + manager.partnerTopicEventSubscriptions().delete("ymxymu", "wi", "qtow", 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 index 806062f86e923..8d94d5bedc0df 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesWithRespon @Test public void testGetDeliveryAttributesWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"aeqjzmhkd\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"acroczfmu\"}]}"; + = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"gecpwgoljtzx\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xsdobygoogxqapjx\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"zyjfuc\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"odjnos\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,9 @@ public void testGetDeliveryAttributesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeliveryAttributeListResult response = manager.partnerTopicEventSubscriptions() - .getDeliveryAttributesWithResponse("emexmnvkvmuwr", "lniwmcpmrrd", "hvdvmi", - com.azure.core.util.Context.NONE) + .getDeliveryAttributesWithResponse("kajlcyizy", "dcvxodkrvfsxxby", "e", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("aeqjzmhkd", response.value().get(0).name()); + Assertions.assertEquals("gecpwgoljtzx", 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 index 3a50b65597f1b..679ad47d8d0f4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class PartnerTopicEventSubscriptionsGetFullUrlWithResponseMockTests { @Test public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"chpqvctsfaeuhww\"}"; + String responseStr = "{\"endpointUrl\":\"ekewnazeaj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testGetFullUrlWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EventSubscriptionFullUrl response = manager.partnerTopicEventSubscriptions() - .getFullUrlWithResponse("gqvqokqluj", "gira", "wly", com.azure.core.util.Context.NONE) + .getFullUrlWithResponse("pwdlvwti", "smosaonhqnam", "pultas", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("chpqvctsfaeuhww", response.endpointUrl()); + Assertions.assertEquals("ekewnazeaj", 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 index ef95d7d886e00..5763dfa7faa02 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,58 +17,55 @@ 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\"}") + "{\"azureSubscriptionId\":\"mhtxongmtsavjcb\",\"resourceGroupName\":\"xqpsrknftguv\",\"name\":\"uhprwmdyvxqt\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"qzcjrvxdj\":{\"description\":\"oyq\",\"displayName\":\"xrmcqibycnojvk\",\"documentationUrl\":\"e\",\"dataSchemaUrl\":\"sgzvahapjyzhpv\"},\"jzuaejxdultskzbb\":{\"description\":\"mwlxk\",\"displayName\":\"gfhzovawjvzunlut\",\"documentationUrl\":\"n\",\"dataSchemaUrl\":\"nxipeil\"},\"oekqvk\":{\"description\":\"zumveekgpwo\",\"displayName\":\"hkfpbs\",\"documentationUrl\":\"ofd\",\"dataSchemaUrl\":\"uusdttouwa\"}}},\"source\":\"nsmvbxwyj\"}") .toObject(PartnerTopicInfo.class); - Assertions.assertEquals("qtrgqjbpfzfsinzg", model.azureSubscriptionId()); - Assertions.assertEquals("cjrwzoxxjtfellu", model.resourceGroupName()); - Assertions.assertEquals("zitonpeqfpjkjl", model.name()); + Assertions.assertEquals("mhtxongmtsavjcb", model.azureSubscriptionId()); + Assertions.assertEquals("xqpsrknftguv", model.resourceGroupName()); + Assertions.assertEquals("uhprwmdyvxqt", 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()); + Assertions.assertEquals("oyq", model.eventTypeInfo().inlineEventTypes().get("qzcjrvxdj").description()); + Assertions.assertEquals("xrmcqibycnojvk", + model.eventTypeInfo().inlineEventTypes().get("qzcjrvxdj").displayName()); + Assertions.assertEquals("e", model.eventTypeInfo().inlineEventTypes().get("qzcjrvxdj").documentationUrl()); + Assertions.assertEquals("sgzvahapjyzhpv", + model.eventTypeInfo().inlineEventTypes().get("qzcjrvxdj").dataSchemaUrl()); + Assertions.assertEquals("nsmvbxwyj", model.source()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerTopicInfo model = new PartnerTopicInfo().withAzureSubscriptionId("qtrgqjbpfzfsinzg") - .withResourceGroupName("cjrwzoxxjtfellu") - .withName("zitonpeqfpjkjl") + PartnerTopicInfo model = new PartnerTopicInfo().withAzureSubscriptionId("mhtxongmtsavjcb") + .withResourceGroupName("xqpsrknftguv") + .withName("uhprwmdyvxqt") .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"); + .withInlineEventTypes(mapOf("qzcjrvxdj", + new InlineEventProperties().withDescription("oyq") + .withDisplayName("xrmcqibycnojvk") + .withDocumentationUrl("e") + .withDataSchemaUrl("sgzvahapjyzhpv"), + "jzuaejxdultskzbb", + new InlineEventProperties().withDescription("mwlxk") + .withDisplayName("gfhzovawjvzunlut") + .withDocumentationUrl("n") + .withDataSchemaUrl("nxipeil"), + "oekqvk", + new InlineEventProperties().withDescription("zumveekgpwo") + .withDisplayName("hkfpbs") + .withDocumentationUrl("ofd") + .withDataSchemaUrl("uusdttouwa")))) + .withSource("nsmvbxwyj"); model = BinaryData.fromObject(model).toObject(PartnerTopicInfo.class); - Assertions.assertEquals("qtrgqjbpfzfsinzg", model.azureSubscriptionId()); - Assertions.assertEquals("cjrwzoxxjtfellu", model.resourceGroupName()); - Assertions.assertEquals("zitonpeqfpjkjl", model.name()); + Assertions.assertEquals("mhtxongmtsavjcb", model.azureSubscriptionId()); + Assertions.assertEquals("xqpsrknftguv", model.resourceGroupName()); + Assertions.assertEquals("uhprwmdyvxqt", 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()); + Assertions.assertEquals("oyq", model.eventTypeInfo().inlineEventTypes().get("qzcjrvxdj").description()); + Assertions.assertEquals("xrmcqibycnojvk", + model.eventTypeInfo().inlineEventTypes().get("qzcjrvxdj").displayName()); + Assertions.assertEquals("e", model.eventTypeInfo().inlineEventTypes().get("qzcjrvxdj").documentationUrl()); + Assertions.assertEquals("sgzvahapjyzhpv", + model.eventTypeInfo().inlineEventTypes().get("qzcjrvxdj").dataSchemaUrl()); + Assertions.assertEquals("nsmvbxwyj", model.source()); } // Use "Map.of" if available 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 index 36dca7ba8d32b..6a8495b990464 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,88 +16,91 @@ 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\":\"1ee3f132-51bf-4f2b-b174-a840d8794ef8\",\"source\":\"gzfc\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"cvbmqzb\":{\"description\":\"beglqg\",\"displayName\":\"o\",\"documentationUrl\":\"betnluankrrfxee\",\"dataSchemaUrl\":\"tijv\"},\"gv\":{\"description\":\"xl\",\"displayName\":\"rnwxacevehjkuyxo\",\"documentationUrl\":\"gaoql\",\"dataSchemaUrl\":\"aeylinm\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-11-02T13:56:44Z\",\"provisioningState\":\"Updating\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"ypoq\",\"messageForActivation\":\"hlqhykprlpy\"},\"identity\":{\"type\":\"None\",\"principalId\":\"dsmexiitdfux\",\"tenantId\":\"asiibmiybnnust\",\"userAssignedIdentities\":{\"gyyprotwy\":{\"principalId\":\"hnmgixhcm\",\"clientId\":\"mqfoudorh\"},\"cmjkavlgorbmftpm\":{\"principalId\":\"ndm\",\"clientId\":\"hu\"},\"dbzqgqqihed\":{\"principalId\":\"zfjltfvnzcyjto\",\"clientId\":\"vopvp\"},\"qcwdhoh\":{\"principalId\":\"qwthmky\",\"clientId\":\"cysihs\"}}},\"location\":\"dtmcd\",\"tags\":{\"pcvhdbevwqqxeys\":\"fcohdxbzlmcmu\",\"eqocljmygvk\":\"onqzinkfkbgbzbow\",\"fezrx\":\"qkjjeokbz\"},\"id\":\"czurtlei\",\"name\":\"q\",\"type\":\"bkwvzg\"}") + "{\"properties\":{\"partnerRegistrationImmutableId\":\"heb\",\"source\":\"swbzuwfmdurage\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"ni\":{\"description\":\"elisdjub\",\"displayName\":\"bqigkx\",\"documentationUrl\":\"sazgakgacyrcmj\",\"dataSchemaUrl\":\"spofapvuhry\"},\"wfansnvpdi\":{\"description\":\"rz\",\"displayName\":\"zjedmstkvnlv\",\"documentationUrl\":\"c\",\"dataSchemaUrl\":\"iznk\"},\"psihcla\":{\"description\":\"ikostbzbkiwbuqny\",\"displayName\":\"hzfylsgcrpfbc\",\"documentationUrl\":\"ezzcez\",\"dataSchemaUrl\":\"fwyfwlwxjwet\"},\"kchcxwa\":{\"description\":\"va\",\"displayName\":\"pt\",\"documentationUrl\":\"qqwzt\",\"dataSchemaUrl\":\"w\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-11-07T11:14:01Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"exfdeqvhpsylk\",\"messageForActivation\":\"hkbffmbm\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"ywwpgjxsnptfuj\",\"tenantId\":\"cg\",\"userAssignedIdentities\":{\"zzjgehkfki\":{\"principalId\":\"pttaqutd\",\"clientId\":\"emxswvruu\"}}},\"location\":\"tixo\",\"tags\":{\"qepqwhixmon\":\"qyinl\",\"xgvelfclduccbird\":\"tshi\",\"jizcilnghgs\":\"vuwcobiegstmnin\"},\"id\":\"ejjtbxqmul\",\"name\":\"xlxqzvn\",\"type\":\"rsbycucrwn\"}") .toObject(PartnerTopicInner.class); - Assertions.assertEquals("dtmcd", model.location()); - Assertions.assertEquals("fcohdxbzlmcmu", model.tags().get("pcvhdbevwqqxeys")); - Assertions.assertEquals(IdentityType.NONE, model.identity().type()); - Assertions.assertEquals("dsmexiitdfux", model.identity().principalId()); - Assertions.assertEquals("asiibmiybnnust", model.identity().tenantId()); - Assertions.assertEquals("hnmgixhcm", model.identity().userAssignedIdentities().get("gyyprotwy").principalId()); - Assertions.assertEquals("mqfoudorh", model.identity().userAssignedIdentities().get("gyyprotwy").clientId()); - Assertions.assertEquals(UUID.fromString("1ee3f132-51bf-4f2b-b174-a840d8794ef8"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("gzfc", model.source()); + Assertions.assertEquals("tixo", model.location()); + Assertions.assertEquals("qyinl", model.tags().get("qepqwhixmon")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("ywwpgjxsnptfuj", model.identity().principalId()); + Assertions.assertEquals("cg", model.identity().tenantId()); + Assertions.assertEquals("pttaqutd", model.identity().userAssignedIdentities().get("zzjgehkfki").principalId()); + Assertions.assertEquals("emxswvruu", model.identity().userAssignedIdentities().get("zzjgehkfki").clientId()); + Assertions.assertEquals("heb", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("swbzuwfmdurage", model.source()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("beglqg", model.eventTypeInfo().inlineEventTypes().get("cvbmqzb").description()); - Assertions.assertEquals("o", model.eventTypeInfo().inlineEventTypes().get("cvbmqzb").displayName()); - Assertions.assertEquals("betnluankrrfxee", - model.eventTypeInfo().inlineEventTypes().get("cvbmqzb").documentationUrl()); - Assertions.assertEquals("tijv", model.eventTypeInfo().inlineEventTypes().get("cvbmqzb").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T13:56:44Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals("elisdjub", model.eventTypeInfo().inlineEventTypes().get("ni").description()); + Assertions.assertEquals("bqigkx", model.eventTypeInfo().inlineEventTypes().get("ni").displayName()); + Assertions.assertEquals("sazgakgacyrcmj", + model.eventTypeInfo().inlineEventTypes().get("ni").documentationUrl()); + Assertions.assertEquals("spofapvuhry", model.eventTypeInfo().inlineEventTypes().get("ni").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T11:14:01Z"), model.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, model.activationState()); - Assertions.assertEquals("ypoq", model.partnerTopicFriendlyDescription()); - Assertions.assertEquals("hlqhykprlpy", model.messageForActivation()); + Assertions.assertEquals("exfdeqvhpsylk", model.partnerTopicFriendlyDescription()); + Assertions.assertEquals("hkbffmbm", model.messageForActivation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerTopicInner model = new PartnerTopicInner().withLocation("dtmcd") - .withTags( - mapOf("pcvhdbevwqqxeys", "fcohdxbzlmcmu", "eqocljmygvk", "onqzinkfkbgbzbow", "fezrx", "qkjjeokbz")) - .withIdentity(new IdentityInfo().withType(IdentityType.NONE) - .withPrincipalId("dsmexiitdfux") - .withTenantId("asiibmiybnnust") - .withUserAssignedIdentities(mapOf("gyyprotwy", - new UserIdentityProperties().withPrincipalId("hnmgixhcm").withClientId("mqfoudorh"), - "cmjkavlgorbmftpm", new UserIdentityProperties().withPrincipalId("ndm").withClientId("hu"), - "dbzqgqqihed", new UserIdentityProperties().withPrincipalId("zfjltfvnzcyjto").withClientId("vopvp"), - "qcwdhoh", new UserIdentityProperties().withPrincipalId("qwthmky").withClientId("cysihs")))) - .withPartnerRegistrationImmutableId(UUID.fromString("1ee3f132-51bf-4f2b-b174-a840d8794ef8")) - .withSource("gzfc") + PartnerTopicInner model = new PartnerTopicInner().withLocation("tixo") + .withTags(mapOf("qepqwhixmon", "qyinl", "xgvelfclduccbird", "tshi", "jizcilnghgs", "vuwcobiegstmnin")) + .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) + .withPrincipalId("ywwpgjxsnptfuj") + .withTenantId("cg") + .withUserAssignedIdentities(mapOf("zzjgehkfki", + new UserIdentityProperties().withPrincipalId("pttaqutd").withClientId("emxswvruu")))) + .withPartnerRegistrationImmutableId("heb") + .withSource("swbzuwfmdurage") .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("cvbmqzb", - new InlineEventProperties().withDescription("beglqg") - .withDisplayName("o") - .withDocumentationUrl("betnluankrrfxee") - .withDataSchemaUrl("tijv"), - "gv", - new InlineEventProperties().withDescription("xl") - .withDisplayName("rnwxacevehjkuyxo") - .withDocumentationUrl("gaoql") - .withDataSchemaUrl("aeylinm")))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-02T13:56:44Z")) + .withInlineEventTypes(mapOf("ni", + new InlineEventProperties().withDescription("elisdjub") + .withDisplayName("bqigkx") + .withDocumentationUrl("sazgakgacyrcmj") + .withDataSchemaUrl("spofapvuhry"), + "wfansnvpdi", + new InlineEventProperties().withDescription("rz") + .withDisplayName("zjedmstkvnlv") + .withDocumentationUrl("c") + .withDataSchemaUrl("iznk"), + "psihcla", + new InlineEventProperties().withDescription("ikostbzbkiwbuqny") + .withDisplayName("hzfylsgcrpfbc") + .withDocumentationUrl("ezzcez") + .withDataSchemaUrl("fwyfwlwxjwet"), + "kchcxwa", + new InlineEventProperties().withDescription("va") + .withDisplayName("pt") + .withDocumentationUrl("qqwzt") + .withDataSchemaUrl("w")))) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-07T11:14:01Z")) .withActivationState(PartnerTopicActivationState.DEACTIVATED) - .withPartnerTopicFriendlyDescription("ypoq") - .withMessageForActivation("hlqhykprlpy"); + .withPartnerTopicFriendlyDescription("exfdeqvhpsylk") + .withMessageForActivation("hkbffmbm"); model = BinaryData.fromObject(model).toObject(PartnerTopicInner.class); - Assertions.assertEquals("dtmcd", model.location()); - Assertions.assertEquals("fcohdxbzlmcmu", model.tags().get("pcvhdbevwqqxeys")); - Assertions.assertEquals(IdentityType.NONE, model.identity().type()); - Assertions.assertEquals("dsmexiitdfux", model.identity().principalId()); - Assertions.assertEquals("asiibmiybnnust", model.identity().tenantId()); - Assertions.assertEquals("hnmgixhcm", model.identity().userAssignedIdentities().get("gyyprotwy").principalId()); - Assertions.assertEquals("mqfoudorh", model.identity().userAssignedIdentities().get("gyyprotwy").clientId()); - Assertions.assertEquals(UUID.fromString("1ee3f132-51bf-4f2b-b174-a840d8794ef8"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("gzfc", model.source()); + Assertions.assertEquals("tixo", model.location()); + Assertions.assertEquals("qyinl", model.tags().get("qepqwhixmon")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("ywwpgjxsnptfuj", model.identity().principalId()); + Assertions.assertEquals("cg", model.identity().tenantId()); + Assertions.assertEquals("pttaqutd", model.identity().userAssignedIdentities().get("zzjgehkfki").principalId()); + Assertions.assertEquals("emxswvruu", model.identity().userAssignedIdentities().get("zzjgehkfki").clientId()); + Assertions.assertEquals("heb", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("swbzuwfmdurage", model.source()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("beglqg", model.eventTypeInfo().inlineEventTypes().get("cvbmqzb").description()); - Assertions.assertEquals("o", model.eventTypeInfo().inlineEventTypes().get("cvbmqzb").displayName()); - Assertions.assertEquals("betnluankrrfxee", - model.eventTypeInfo().inlineEventTypes().get("cvbmqzb").documentationUrl()); - Assertions.assertEquals("tijv", model.eventTypeInfo().inlineEventTypes().get("cvbmqzb").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T13:56:44Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals("elisdjub", model.eventTypeInfo().inlineEventTypes().get("ni").description()); + Assertions.assertEquals("bqigkx", model.eventTypeInfo().inlineEventTypes().get("ni").displayName()); + Assertions.assertEquals("sazgakgacyrcmj", + model.eventTypeInfo().inlineEventTypes().get("ni").documentationUrl()); + Assertions.assertEquals("spofapvuhry", model.eventTypeInfo().inlineEventTypes().get("ni").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T11:14:01Z"), model.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, model.activationState()); - Assertions.assertEquals("ypoq", model.partnerTopicFriendlyDescription()); - Assertions.assertEquals("hlqhykprlpy", model.messageForActivation()); + Assertions.assertEquals("exfdeqvhpsylk", model.partnerTopicFriendlyDescription()); + Assertions.assertEquals("hkbffmbm", model.messageForActivation()); } // Use "Map.of" if available 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 index 4c16029c472ca..34bd427a333bd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,74 +13,68 @@ 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\":\"262e3c0c-1c5a-4271-bea9-06b822fc1cef\",\"source\":\"dfbzdixzmq\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"wyyu\":{\"description\":\"pqhe\",\"displayName\":\"ptmcgsbostzelnd\",\"documentationUrl\":\"tutmzl\",\"dataSchemaUrl\":\"ojlvfhrbbpneqvc\"},\"cpilj\":{\"description\":\"ochpprpr\",\"displayName\":\"mo\",\"documentationUrl\":\"yzejnhlbk\",\"dataSchemaUrl\":\"z\"},\"apjwogqqnobpudcd\":{\"description\":\"hzvechndbnwieho\",\"displayName\":\"wjwiuub\",\"documentationUrl\":\"fqsfa\",\"dataSchemaUrl\":\"qtferrqwexjkmf\"},\"jjum\":{\"description\":\"tqwpwya\",\"displayName\":\"zasqbucljgkyexao\",\"documentationUrl\":\"yaipidsda\",\"dataSchemaUrl\":\"tx\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-10-13T05:25:34Z\",\"provisioningState\":\"Deleting\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"nm\",\"messageForActivation\":\"ngz\"}") + "{\"partnerRegistrationImmutableId\":\"ikzebr\",\"source\":\"smswziqgfuh\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"umwmxqhnd\":{\"description\":\"hvhcz\",\"displayName\":\"vfbyc\",\"documentationUrl\":\"xjww\",\"dataSchemaUrl\":\"z\"},\"ftgz\":{\"description\":\"oamld\",\"displayName\":\"haohdjhhflzokxc\",\"documentationUrl\":\"pelnjetag\",\"dataSchemaUrl\":\"sxoa\"},\"oxuztrksx\":{\"description\":\"pbswvefloccsrm\",\"displayName\":\"ihmipgawtxxpk\",\"documentationUrl\":\"cxcjxgry\",\"dataSchemaUrl\":\"mpcycilrmcaykgg\"},\"zah\":{\"description\":\"ndfcpfn\",\"displayName\":\"thjtwk\",\"documentationUrl\":\"osrxuzvoa\",\"dataSchemaUrl\":\"tcqiosmg\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-11-27T13:04:41Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"ltlaprltzkatbhj\",\"messageForActivation\":\"nnbsoqeqa\"}") .toObject(PartnerTopicProperties.class); - Assertions.assertEquals(UUID.fromString("262e3c0c-1c5a-4271-bea9-06b822fc1cef"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("dfbzdixzmq", model.source()); + Assertions.assertEquals("ikzebr", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("smswziqgfuh", model.source()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("pqhe", model.eventTypeInfo().inlineEventTypes().get("wyyu").description()); - Assertions.assertEquals("ptmcgsbostzelnd", model.eventTypeInfo().inlineEventTypes().get("wyyu").displayName()); - Assertions.assertEquals("tutmzl", model.eventTypeInfo().inlineEventTypes().get("wyyu").documentationUrl()); - Assertions.assertEquals("ojlvfhrbbpneqvc", - model.eventTypeInfo().inlineEventTypes().get("wyyu").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T05:25:34Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals("hvhcz", model.eventTypeInfo().inlineEventTypes().get("umwmxqhnd").description()); + Assertions.assertEquals("vfbyc", model.eventTypeInfo().inlineEventTypes().get("umwmxqhnd").displayName()); + Assertions.assertEquals("xjww", model.eventTypeInfo().inlineEventTypes().get("umwmxqhnd").documentationUrl()); + Assertions.assertEquals("z", model.eventTypeInfo().inlineEventTypes().get("umwmxqhnd").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T13:04:41Z"), model.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, model.activationState()); - Assertions.assertEquals("nm", model.partnerTopicFriendlyDescription()); - Assertions.assertEquals("ngz", model.messageForActivation()); + Assertions.assertEquals("ltlaprltzkatbhj", model.partnerTopicFriendlyDescription()); + Assertions.assertEquals("nnbsoqeqa", model.messageForActivation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerTopicProperties model = new PartnerTopicProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("262e3c0c-1c5a-4271-bea9-06b822fc1cef")) - .withSource("dfbzdixzmq") + PartnerTopicProperties model = new PartnerTopicProperties().withPartnerRegistrationImmutableId("ikzebr") + .withSource("smswziqgfuh") .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("wyyu", - new InlineEventProperties().withDescription("pqhe") - .withDisplayName("ptmcgsbostzelnd") - .withDocumentationUrl("tutmzl") - .withDataSchemaUrl("ojlvfhrbbpneqvc"), - "cpilj", - new InlineEventProperties().withDescription("ochpprpr") - .withDisplayName("mo") - .withDocumentationUrl("yzejnhlbk") + .withInlineEventTypes(mapOf("umwmxqhnd", + new InlineEventProperties().withDescription("hvhcz") + .withDisplayName("vfbyc") + .withDocumentationUrl("xjww") .withDataSchemaUrl("z"), - "apjwogqqnobpudcd", - new InlineEventProperties().withDescription("hzvechndbnwieho") - .withDisplayName("wjwiuub") - .withDocumentationUrl("fqsfa") - .withDataSchemaUrl("qtferrqwexjkmf"), - "jjum", - new InlineEventProperties().withDescription("tqwpwya") - .withDisplayName("zasqbucljgkyexao") - .withDocumentationUrl("yaipidsda") - .withDataSchemaUrl("tx")))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-10-13T05:25:34Z")) + "ftgz", + new InlineEventProperties().withDescription("oamld") + .withDisplayName("haohdjhhflzokxc") + .withDocumentationUrl("pelnjetag") + .withDataSchemaUrl("sxoa"), + "oxuztrksx", + new InlineEventProperties().withDescription("pbswvefloccsrm") + .withDisplayName("ihmipgawtxxpk") + .withDocumentationUrl("cxcjxgry") + .withDataSchemaUrl("mpcycilrmcaykgg"), + "zah", + new InlineEventProperties().withDescription("ndfcpfn") + .withDisplayName("thjtwk") + .withDocumentationUrl("osrxuzvoa") + .withDataSchemaUrl("tcqiosmg")))) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-11-27T13:04:41Z")) .withActivationState(PartnerTopicActivationState.DEACTIVATED) - .withPartnerTopicFriendlyDescription("nm") - .withMessageForActivation("ngz"); + .withPartnerTopicFriendlyDescription("ltlaprltzkatbhj") + .withMessageForActivation("nnbsoqeqa"); model = BinaryData.fromObject(model).toObject(PartnerTopicProperties.class); - Assertions.assertEquals(UUID.fromString("262e3c0c-1c5a-4271-bea9-06b822fc1cef"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("dfbzdixzmq", model.source()); + Assertions.assertEquals("ikzebr", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("smswziqgfuh", model.source()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("pqhe", model.eventTypeInfo().inlineEventTypes().get("wyyu").description()); - Assertions.assertEquals("ptmcgsbostzelnd", model.eventTypeInfo().inlineEventTypes().get("wyyu").displayName()); - Assertions.assertEquals("tutmzl", model.eventTypeInfo().inlineEventTypes().get("wyyu").documentationUrl()); - Assertions.assertEquals("ojlvfhrbbpneqvc", - model.eventTypeInfo().inlineEventTypes().get("wyyu").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T05:25:34Z"), model.expirationTimeIfNotActivatedUtc()); + Assertions.assertEquals("hvhcz", model.eventTypeInfo().inlineEventTypes().get("umwmxqhnd").description()); + Assertions.assertEquals("vfbyc", model.eventTypeInfo().inlineEventTypes().get("umwmxqhnd").displayName()); + Assertions.assertEquals("xjww", model.eventTypeInfo().inlineEventTypes().get("umwmxqhnd").documentationUrl()); + Assertions.assertEquals("z", model.eventTypeInfo().inlineEventTypes().get("umwmxqhnd").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T13:04:41Z"), model.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, model.activationState()); - Assertions.assertEquals("nm", model.partnerTopicFriendlyDescription()); - Assertions.assertEquals("ngz", model.messageForActivation()); + Assertions.assertEquals("ltlaprltzkatbhj", model.partnerTopicFriendlyDescription()); + Assertions.assertEquals("nnbsoqeqa", model.messageForActivation()); } // Use "Map.of" if available 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 index 4aa7910d42244..347180ec196eb 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,34 +17,36 @@ public final class PartnerTopicUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerTopicUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"uik\":\"xtbjwgnyfusfzsv\",\"l\":\"hajqglcfh\",\"nzrdpsovwxz\":\"qryxyn\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"eiybbabpfhvfsl\",\"tenantId\":\"ntjlr\",\"userAssignedIdentities\":{\"idsxwaabzmifry\":{\"principalId\":\"s\",\"clientId\":\"rioov\"},\"slnelx\":{\"principalId\":\"nmmaxrizkzob\",\"clientId\":\"pxl\"}}}}") + "{\"tags\":{\"tgfebwln\":\"vlagun\",\"av\":\"mhyreeudz\",\"lmjjyuo\":\"pdqmjxlyyzglgouw\",\"nlb\":\"qtobaxkjeyt\"},\"identity\":{\"type\":\"None\",\"principalId\":\"u\",\"tenantId\":\"kqbh\",\"userAssignedIdentities\":{\"akdkifmjnnawtqab\":{\"principalId\":\"unjqh\",\"clientId\":\"nxaulk\"},\"wfl\":{\"principalId\":\"uckpggqoweyir\",\"clientId\":\"lisn\"}}}}") .toObject(PartnerTopicUpdateParameters.class); - Assertions.assertEquals("xtbjwgnyfusfzsv", model.tags().get("uik")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("eiybbabpfhvfsl", model.identity().principalId()); - Assertions.assertEquals("ntjlr", model.identity().tenantId()); - Assertions.assertEquals("s", model.identity().userAssignedIdentities().get("idsxwaabzmifry").principalId()); - Assertions.assertEquals("rioov", model.identity().userAssignedIdentities().get("idsxwaabzmifry").clientId()); + Assertions.assertEquals("vlagun", model.tags().get("tgfebwln")); + Assertions.assertEquals(IdentityType.NONE, model.identity().type()); + Assertions.assertEquals("u", model.identity().principalId()); + Assertions.assertEquals("kqbh", model.identity().tenantId()); + Assertions.assertEquals("unjqh", + model.identity().userAssignedIdentities().get("akdkifmjnnawtqab").principalId()); + Assertions.assertEquals("nxaulk", model.identity().userAssignedIdentities().get("akdkifmjnnawtqab").clientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartnerTopicUpdateParameters model - = new PartnerTopicUpdateParameters() - .withTags(mapOf("uik", "xtbjwgnyfusfzsv", "l", "hajqglcfh", "nzrdpsovwxz", "qryxyn")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("eiybbabpfhvfsl") - .withTenantId("ntjlr") - .withUserAssignedIdentities(mapOf("idsxwaabzmifry", - new UserIdentityProperties().withPrincipalId("s").withClientId("rioov"), "slnelx", - new UserIdentityProperties().withPrincipalId("nmmaxrizkzob").withClientId("pxl")))); + PartnerTopicUpdateParameters model = new PartnerTopicUpdateParameters() + .withTags( + mapOf("tgfebwln", "vlagun", "av", "mhyreeudz", "lmjjyuo", "pdqmjxlyyzglgouw", "nlb", "qtobaxkjeyt")) + .withIdentity(new IdentityInfo().withType(IdentityType.NONE) + .withPrincipalId("u") + .withTenantId("kqbh") + .withUserAssignedIdentities(mapOf("akdkifmjnnawtqab", + new UserIdentityProperties().withPrincipalId("unjqh").withClientId("nxaulk"), "wfl", + new UserIdentityProperties().withPrincipalId("uckpggqoweyir").withClientId("lisn")))); model = BinaryData.fromObject(model).toObject(PartnerTopicUpdateParameters.class); - Assertions.assertEquals("xtbjwgnyfusfzsv", model.tags().get("uik")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("eiybbabpfhvfsl", model.identity().principalId()); - Assertions.assertEquals("ntjlr", model.identity().tenantId()); - Assertions.assertEquals("s", model.identity().userAssignedIdentities().get("idsxwaabzmifry").principalId()); - Assertions.assertEquals("rioov", model.identity().userAssignedIdentities().get("idsxwaabzmifry").clientId()); + Assertions.assertEquals("vlagun", model.tags().get("tgfebwln")); + Assertions.assertEquals(IdentityType.NONE, model.identity().type()); + Assertions.assertEquals("u", model.identity().principalId()); + Assertions.assertEquals("kqbh", model.identity().tenantId()); + Assertions.assertEquals("unjqh", + model.identity().userAssignedIdentities().get("akdkifmjnnawtqab").principalId()); + Assertions.assertEquals("nxaulk", model.identity().userAssignedIdentities().get("akdkifmjnnawtqab").clientId()); } // Use "Map.of" if available 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 index c44163458badf..9c29ddea758bc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,7 +16,6 @@ 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; @@ -25,7 +24,7 @@ public final class PartnerTopicsActivateWithResponseMockTests { @Test public void testActivateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"47babc85-534e-4f52-9b96-b841109b1da4\",\"source\":\"xeezwyhjmbjiqe\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"vnensmuffiw\":{\"description\":\"hc\",\"displayName\":\"pyvdkgdets\",\"documentationUrl\":\"canzb\",\"dataSchemaUrl\":\"kwuyck\"},\"dxjxdu\":{\"description\":\"ctvbpzujqjtotdx\",\"displayName\":\"scsl\",\"documentationUrl\":\"uusiecktybh\",\"dataSchemaUrl\":\"xidhhxomil\"},\"qqy\":{\"description\":\"wjwi\",\"displayName\":\"qrslaate\",\"documentationUrl\":\"wuj\",\"dataSchemaUrl\":\"gxqgqwlxrhgtvhv\"},\"tyalh\":{\"description\":\"kkt\",\"displayName\":\"zejogmkorvvmvm\",\"documentationUrl\":\"fnqh\",\"dataSchemaUrl\":\"snosnqliwkmzojf\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-10-17T04:22:16Z\",\"provisioningState\":\"Creating\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"bjbhrpgiqsttc\",\"messageForActivation\":\"rcmmaixpqj\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"ksldttohqclnaih\",\"tenantId\":\"siqikvllrht\",\"userAssignedIdentities\":{\"bun\":{\"principalId\":\"xkoi\",\"clientId\":\"trawrqkza\"},\"bduxapgrcq\":{\"principalId\":\"aklwzlwee\",\"clientId\":\"nejzltkaszfjsxs\"},\"esdfedsb\":{\"principalId\":\"mvrdjomlnwsbv\",\"clientId\":\"lsflxk\"},\"i\":{\"principalId\":\"ancoinmphymcqid\",\"clientId\":\"tvdhqnufbxwe\"}}},\"location\":\"ntojovfnybydhuih\",\"tags\":{\"uaorhjk\":\"wud\",\"amqprlo\":\"hwvumosqir\",\"zcmtagelajdyolj\":\"rugejcvjkjy\"},\"id\":\"qy\",\"name\":\"qfmzsizzhravrc\",\"type\":\"kjymgqbgcxh\"}"; + = "{\"properties\":{\"partnerRegistrationImmutableId\":\"gfcvcewbwq\",\"source\":\"gsjs\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"xzlh\":{\"description\":\"azdfsqxhyqmrej\",\"displayName\":\"r\",\"documentationUrl\":\"vgrszr\",\"dataSchemaUrl\":\"tdrcwgzwl\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-05-04T15:49:23Z\",\"provisioningState\":\"Updating\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"ulz\",\"messageForActivation\":\"mhpfywvy\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"fzxsoxinunjlzkd\",\"tenantId\":\"cqsxytqqtcmiw\",\"userAssignedIdentities\":{\"ajyhftpzc\":{\"principalId\":\"vn\",\"clientId\":\"ylajam\"}}},\"location\":\"yklleynqanhkiggl\",\"tags\":{\"ubhg\":\"alh\",\"yctajqz\":\"phetxdqc\"},\"id\":\"vale\",\"name\":\"xb\",\"type\":\"biwksde\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,31 +34,28 @@ public void testActivateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerTopic response = manager.partnerTopics() - .activateWithResponse("wosstfjxtvlxx", "qfcwr", com.azure.core.util.Context.NONE) + .activateWithResponse("ouhbq", "zkqxsalu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ntojovfnybydhuih", response.location()); - Assertions.assertEquals("wud", response.tags().get("uaorhjk")); + Assertions.assertEquals("yklleynqanhkiggl", response.location()); + Assertions.assertEquals("alh", response.tags().get("ubhg")); Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("ksldttohqclnaih", response.identity().principalId()); - Assertions.assertEquals("siqikvllrht", response.identity().tenantId()); - Assertions.assertEquals("xkoi", response.identity().userAssignedIdentities().get("bun").principalId()); - Assertions.assertEquals("trawrqkza", response.identity().userAssignedIdentities().get("bun").clientId()); - Assertions.assertEquals(UUID.fromString("47babc85-534e-4f52-9b96-b841109b1da4"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("xeezwyhjmbjiqe", response.source()); + Assertions.assertEquals("fzxsoxinunjlzkd", response.identity().principalId()); + Assertions.assertEquals("cqsxytqqtcmiw", response.identity().tenantId()); + Assertions.assertEquals("vn", response.identity().userAssignedIdentities().get("ajyhftpzc").principalId()); + Assertions.assertEquals("ylajam", response.identity().userAssignedIdentities().get("ajyhftpzc").clientId()); + Assertions.assertEquals("gfcvcewbwq", response.partnerRegistrationImmutableId()); + Assertions.assertEquals("gsjs", response.source()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("hc", response.eventTypeInfo().inlineEventTypes().get("vnensmuffiw").description()); - Assertions.assertEquals("pyvdkgdets", - response.eventTypeInfo().inlineEventTypes().get("vnensmuffiw").displayName()); - Assertions.assertEquals("canzb", - response.eventTypeInfo().inlineEventTypes().get("vnensmuffiw").documentationUrl()); - Assertions.assertEquals("kwuyck", - response.eventTypeInfo().inlineEventTypes().get("vnensmuffiw").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T04:22:16Z"), + Assertions.assertEquals("azdfsqxhyqmrej", + response.eventTypeInfo().inlineEventTypes().get("xzlh").description()); + Assertions.assertEquals("r", response.eventTypeInfo().inlineEventTypes().get("xzlh").displayName()); + Assertions.assertEquals("vgrszr", response.eventTypeInfo().inlineEventTypes().get("xzlh").documentationUrl()); + Assertions.assertEquals("tdrcwgzwl", response.eventTypeInfo().inlineEventTypes().get("xzlh").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T15:49:23Z"), response.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, response.activationState()); - Assertions.assertEquals("bjbhrpgiqsttc", response.partnerTopicFriendlyDescription()); - Assertions.assertEquals("rcmmaixpqj", response.messageForActivation()); + Assertions.assertEquals("ulz", response.partnerTopicFriendlyDescription()); + Assertions.assertEquals("mhpfywvy", 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 index 66d1a0d665dd3..1d9da10cea816 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,6 @@ 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; @@ -31,7 +30,7 @@ public final class PartnerTopicsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"1bab9ce3-d0b8-4178-a354-9540353b07cb\",\"source\":\"gtkihonikzsr\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"lykhkg\":{\"description\":\"z\",\"displayName\":\"pntogkensckh\",\"documentationUrl\":\"carmoyfx\",\"dataSchemaUrl\":\"wykuqdnd\"},\"qmlfv\":{\"description\":\"pvd\",\"displayName\":\"fpeerscdxrnr\",\"documentationUrl\":\"rcufmbgacnrgfdtn\",\"dataSchemaUrl\":\"spsanmameubkq\"},\"e\":{\"description\":\"qcs\",\"displayName\":\"qjmxpt\",\"documentationUrl\":\"ipuugkwdrqmr\",\"dataSchemaUrl\":\"huuonjkkxukg\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-11-04T15:53:15Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"gcjojlleui\",\"messageForActivation\":\"mt\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"htmep\",\"tenantId\":\"bpjbapm\",\"userAssignedIdentities\":{\"mnuf\":{\"principalId\":\"kvavucgj\",\"clientId\":\"aiq\"},\"scotyx\":{\"principalId\":\"rchxwwuzdmhvwl\",\"clientId\":\"vjmxmlitqdsjipdv\"}}},\"location\":\"riifefn\",\"tags\":{\"eailwdqmqf\":\"vrqoemwsi\",\"kd\":\"deotmfx\"},\"id\":\"g\",\"name\":\"gnamkuuyiu\",\"type\":\"uafixlxicwgp\"}"; + = "{\"properties\":{\"partnerRegistrationImmutableId\":\"hg\",\"source\":\"hx\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"juypwyiulaynosu\":{\"description\":\"q\",\"displayName\":\"yqmarxneib\",\"documentationUrl\":\"brhbjdqknhqn\",\"dataSchemaUrl\":\"tpuwnnohmmzngocf\"},\"rigrjdljlkq\":{\"description\":\"fhaxttpf\",\"displayName\":\"wgsghqucumldd\",\"documentationUrl\":\"qm\",\"dataSchemaUrl\":\"feothxu\"},\"gltoizwxvscksgf\":{\"description\":\"krbzkuas\",\"displayName\":\"xk\",\"documentationUrl\":\"r\",\"dataSchemaUrl\":\"l\"},\"njfmbbfnvjxit\":{\"description\":\"skyekgafxczv\",\"displayName\":\"ckwrtw\",\"documentationUrl\":\"tyveszrtl\",\"dataSchemaUrl\":\"dhwynctacz\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-12-03T14:45:06Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"kls\",\"messageForActivation\":\"ihqlcoqks\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"yxwb\",\"tenantId\":\"ud\",\"userAssignedIdentities\":{\"sawrdtn\":{\"principalId\":\"orbccqcdhth\",\"clientId\":\"vlirknuc\"}}},\"location\":\"zl\",\"tags\":{\"fttkacybdueu\":\"aixihzqjjtsmuyd\",\"jermhzic\":\"gmcdcpkshl\",\"glhphzwx\":\"bfdjhyaaknyukibx\"},\"id\":\"tej\",\"name\":\"iilhvtozyagj\",\"type\":\"nxkbylhyyxgf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,68 +39,58 @@ public void testCreateOrUpdateWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PartnerTopic response - = manager.partnerTopics() - .define("b") - .withRegion("svbxxyjisskob") - .withExistingResourceGroup("fwkztsms") - .withTags(mapOf("rkdpsqeqfb", "lflioewyhxessm", "ses", "xm")) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("gnuywezygva") - .withTenantId("aaqwvkg") - .withUserAssignedIdentities(mapOf("ortbnukkfax", - new UserIdentityProperties().withPrincipalId("pmpv").withClientId("ogehluf")))) - .withPartnerRegistrationImmutableId(UUID.fromString("eef2c77b-fa9e-4067-96ec-73bd9796abb7")) - .withSource("lznfhkqytkztado") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("pnfdbgsosciene", - new InlineEventProperties().withDescription("fcycrsvlo") - .withDisplayName("h") - .withDocumentationUrl("qkzjuqwqaj") - .withDataSchemaUrl("zxpixhyo"), - "urz", - new InlineEventProperties().withDescription("vbennmfkbpjnrt") - .withDisplayName("w") - .withDocumentationUrl("thr") - .withDataSchemaUrl("mdudsy"), - "yehhfdyldhg", - new InlineEventProperties().withDescription("ktjhffe") - .withDisplayName("koqyouer") - .withDocumentationUrl("g") - .withDataSchemaUrl("uzxk"), - "zwhpjlwyxedz", - new InlineEventProperties().withDescription("d") - .withDisplayName("zqiyuqhtder") - .withDocumentationUrl("n") - .withDataSchemaUrl("a")))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-07-11T01:48:14Z")) - .withActivationState(PartnerTopicActivationState.ACTIVATED) - .withPartnerTopicFriendlyDescription("kewvmyifopxfj") - .withMessageForActivation("pdyzoutx") - .create(); + PartnerTopic response = manager.partnerTopics() + .define("lxvhhyqqegatxgrz") + .withRegion("yfaofdf") + .withExistingResourceGroup("qb") + .withTags(mapOf("rf", "ncwmhjob", "dc", "ri", "f", "h", "oorssatfy", "cvbzwgwhgkgsoa")) + .withIdentity(new IdentityInfo().withType(IdentityType.NONE) + .withPrincipalId("clmgdtw") + .withTenantId("bd") + .withUserAssignedIdentities(mapOf("cdqhftz", + new UserIdentityProperties().withPrincipalId("zbwjecooyvht").withClientId("bpelniibncgagd")))) + .withPartnerRegistrationImmutableId("inmtsdixchwkibm") + .withSource("ymncjc") + .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) + .withInlineEventTypes(mapOf("owkdnjr", + new InlineEventProperties().withDescription("qzoof") + .withDisplayName("qjsvep") + .withDocumentationUrl("htleberpyljek") + .withDataSchemaUrl("qnwjjq"), + "rmxkbcjwwdxom", + new InlineEventProperties().withDescription("krhwieh") + .withDisplayName("pnowawonoehrguql") + .withDocumentationUrl("wafbjzmp") + .withDataSchemaUrl("guyfazbkocbygvt")))) + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-07-21T01:13Z")) + .withActivationState(PartnerTopicActivationState.ACTIVATED) + .withPartnerTopicFriendlyDescription("ooz") + .withMessageForActivation("yacagae") + .create(); - Assertions.assertEquals("riifefn", response.location()); - Assertions.assertEquals("vrqoemwsi", response.tags().get("eailwdqmqf")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("htmep", response.identity().principalId()); - Assertions.assertEquals("bpjbapm", response.identity().tenantId()); - Assertions.assertEquals("kvavucgj", response.identity().userAssignedIdentities().get("mnuf").principalId()); - Assertions.assertEquals("aiq", response.identity().userAssignedIdentities().get("mnuf").clientId()); - Assertions.assertEquals(UUID.fromString("1bab9ce3-d0b8-4178-a354-9540353b07cb"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("gtkihonikzsr", response.source()); + Assertions.assertEquals("zl", response.location()); + Assertions.assertEquals("aixihzqjjtsmuyd", response.tags().get("fttkacybdueu")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("yxwb", response.identity().principalId()); + Assertions.assertEquals("ud", response.identity().tenantId()); + Assertions.assertEquals("orbccqcdhth", + response.identity().userAssignedIdentities().get("sawrdtn").principalId()); + Assertions.assertEquals("vlirknuc", response.identity().userAssignedIdentities().get("sawrdtn").clientId()); + Assertions.assertEquals("hg", response.partnerRegistrationImmutableId()); + Assertions.assertEquals("hx", response.source()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("z", response.eventTypeInfo().inlineEventTypes().get("lykhkg").description()); - Assertions.assertEquals("pntogkensckh", - response.eventTypeInfo().inlineEventTypes().get("lykhkg").displayName()); - Assertions.assertEquals("carmoyfx", - response.eventTypeInfo().inlineEventTypes().get("lykhkg").documentationUrl()); - Assertions.assertEquals("wykuqdnd", response.eventTypeInfo().inlineEventTypes().get("lykhkg").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T15:53:15Z"), + Assertions.assertEquals("q", response.eventTypeInfo().inlineEventTypes().get("juypwyiulaynosu").description()); + Assertions.assertEquals("yqmarxneib", + response.eventTypeInfo().inlineEventTypes().get("juypwyiulaynosu").displayName()); + Assertions.assertEquals("brhbjdqknhqn", + response.eventTypeInfo().inlineEventTypes().get("juypwyiulaynosu").documentationUrl()); + Assertions.assertEquals("tpuwnnohmmzngocf", + response.eventTypeInfo().inlineEventTypes().get("juypwyiulaynosu").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T14:45:06Z"), response.expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("gcjojlleui", response.partnerTopicFriendlyDescription()); - Assertions.assertEquals("mt", response.messageForActivation()); + Assertions.assertEquals("kls", response.partnerTopicFriendlyDescription()); + Assertions.assertEquals("ihqlcoqks", response.messageForActivation()); } // Use "Map.of" if available 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 index da6b743ab055e..9a194133c3492 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,7 +16,6 @@ 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; @@ -25,7 +24,7 @@ public final class PartnerTopicsDeactivateWithResponseMockTests { @Test public void testDeactivateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"af407455-1aab-43ad-9e86-f0b7ba120487\",\"source\":\"skirhn\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"dkqiyv\":{\"description\":\"fukdljqnvtsdyd\",\"displayName\":\"kpafyaloowwziz\",\"documentationUrl\":\"yuf\",\"dataSchemaUrl\":\"zstifgufyj\"},\"lueaujqbbgsim\":{\"description\":\"jokgwesymzqh\",\"displayName\":\"p\",\"documentationUrl\":\"lpe\",\"dataSchemaUrl\":\"zn\"},\"cumecsaaqg\":{\"description\":\"jlw\",\"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\"}"; + = "{\"properties\":{\"partnerRegistrationImmutableId\":\"ushlcxpblalh\",\"source\":\"zpfkis\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"wyil\":{\"description\":\"aaoqdsg\",\"displayName\":\"otxjqfiafcnlrtbf\",\"documentationUrl\":\"zzcaoijolbuauk\",\"dataSchemaUrl\":\"ieopexelxqdwr\"},\"gpwb\":{\"description\":\"ibkgxyxyau\",\"displayName\":\"eddobmcnltm\",\"documentationUrl\":\"tkujsqycm\",\"dataSchemaUrl\":\"xfabl\"},\"bticuhqv\":{\"description\":\"hr\",\"displayName\":\"li\",\"documentationUrl\":\"ycgnwplrrbphc\",\"dataSchemaUrl\":\"bb\"},\"ouujxdiikmoxre\":{\"description\":\"spbfsfeqbbewfc\",\"displayName\":\"fpyyxmzrmtm\",\"documentationUrl\":\"ituweyyj\",\"dataSchemaUrl\":\"cybwfuppoxprcm\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-07-01T20:48:48Z\",\"provisioningState\":\"Creating\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"ikj\",\"messageForActivation\":\"ywlunpipcwybs\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"patpf\",\"tenantId\":\"aebwfwhxorpwa\",\"userAssignedIdentities\":{\"xcdrzprobzzxezm\":{\"principalId\":\"ugexojfccylht\",\"clientId\":\"thvazjpw\"},\"cgnrglaqrwy\":{\"principalId\":\"kjgpjeuxsphlokfp\",\"clientId\":\"jpdvzvfbhwbdquf\"}}},\"location\":\"bhbafebzx\",\"tags\":{\"nntrvrkps\":\"qutibhl\"},\"id\":\"bduxvzmlghnys\",\"name\":\"lpyeu\",\"type\":\"kppdi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,32 +34,32 @@ public void testDeactivateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerTopic response = manager.partnerTopics() - .deactivateWithResponse("qxgzxler", "km", com.azure.core.util.Context.NONE) + .deactivateWithResponse("yxsbfpz", "oikvntwcz", com.azure.core.util.Context.NONE) .getValue(); - 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("af407455-1aab-43ad-9e86-f0b7ba120487"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("skirhn", response.source()); + Assertions.assertEquals("bhbafebzx", response.location()); + Assertions.assertEquals("qutibhl", response.tags().get("nntrvrkps")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("patpf", response.identity().principalId()); + Assertions.assertEquals("aebwfwhxorpwa", response.identity().tenantId()); + Assertions.assertEquals("ugexojfccylht", + response.identity().userAssignedIdentities().get("xcdrzprobzzxezm").principalId()); + Assertions.assertEquals("thvazjpw", + response.identity().userAssignedIdentities().get("xcdrzprobzzxezm").clientId()); + Assertions.assertEquals("ushlcxpblalh", response.partnerRegistrationImmutableId()); + Assertions.assertEquals("zpfkis", response.source()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("fukdljqnvtsdyd", - response.eventTypeInfo().inlineEventTypes().get("dkqiyv").description()); - Assertions.assertEquals("kpafyaloowwziz", - response.eventTypeInfo().inlineEventTypes().get("dkqiyv").displayName()); - Assertions.assertEquals("yuf", response.eventTypeInfo().inlineEventTypes().get("dkqiyv").documentationUrl()); - Assertions.assertEquals("zstifgufyj", - response.eventTypeInfo().inlineEventTypes().get("dkqiyv").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-11T10:28:46Z"), + Assertions.assertEquals("aaoqdsg", response.eventTypeInfo().inlineEventTypes().get("wyil").description()); + Assertions.assertEquals("otxjqfiafcnlrtbf", + response.eventTypeInfo().inlineEventTypes().get("wyil").displayName()); + Assertions.assertEquals("zzcaoijolbuauk", + response.eventTypeInfo().inlineEventTypes().get("wyil").documentationUrl()); + Assertions.assertEquals("ieopexelxqdwr", + response.eventTypeInfo().inlineEventTypes().get("wyil").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-01T20:48:48Z"), response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("sbskowkrbhz", response.partnerTopicFriendlyDescription()); - Assertions.assertEquals("bkhtmqowiu", response.messageForActivation()); + Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, response.activationState()); + Assertions.assertEquals("ikj", response.partnerTopicFriendlyDescription()); + Assertions.assertEquals("ywlunpipcwybs", 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 index 8f73a90cf9e12..06e2e0d2b60bf 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.partnerTopics().delete("wiygmgsevmdmzenl", "stgfczl", com.azure.core.util.Context.NONE); + manager.partnerTopics().delete("rwqirvtktyhhmvf", "lapjajod", 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 index 6a6edfc2d599f..75d1a985fe5bc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,7 +16,6 @@ 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; @@ -25,7 +24,7 @@ public final class PartnerTopicsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"4c37bfc0-60f2-4e7a-abbc-18fce01bbcbd\",\"source\":\"iuorinikc\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"nupoyryefqmwovyz\":{\"description\":\"wmmtmqrxrzq\",\"displayName\":\"yczyayubtgm\",\"documentationUrl\":\"iqahragpx\",\"dataSchemaUrl\":\"bp\"},\"dui\":{\"description\":\"lnomfpb\",\"displayName\":\"eegvyieztkutnj\",\"documentationUrl\":\"l\",\"dataSchemaUrl\":\"krehyhtmj\"},\"oqbmdqrx\":{\"description\":\"ulxfaryrvjl\",\"displayName\":\"ezvjq\",\"documentationUrl\":\"hoyiyaxqvjweiw\",\"dataSchemaUrl\":\"zkddnvovb\"},\"omehx\":{\"description\":\"laetscflwtjdtlr\",\"displayName\":\"fooy\",\"documentationUrl\":\"uxdtzcq\",\"dataSchemaUrl\":\"sdudgcoz\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-08-28T06:18:18Z\",\"provisioningState\":\"Creating\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"lbij\",\"messageForActivation\":\"kqllczipvwdt\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"iqdlratrkw\",\"tenantId\":\"auwxsuykznhrfgsl\",\"userAssignedIdentities\":{\"pajtfeyvkbd\":{\"principalId\":\"ry\",\"clientId\":\"zihuioaeo\"},\"ijcxfno\":{\"principalId\":\"dkrhdccxbe\",\"clientId\":\"qutkzwtjwwguzy\"},\"a\":{\"principalId\":\"egjdydhqkk\",\"clientId\":\"juck\"},\"idtoakat\":{\"principalId\":\"qbhpowcnx\",\"clientId\":\"zdlys\"}}},\"location\":\"rytgrhzbqfdpfawr\",\"tags\":{\"d\":\"cshtkutzcttbqgdi\",\"jf\":\"mmtzjgc\"},\"id\":\"tbwjjirmuydgftt\",\"name\":\"dofgeoagfuoftnx\",\"type\":\"dwxmda\"}"; + = "{\"properties\":{\"partnerRegistrationImmutableId\":\"gsk\",\"source\":\"o\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"mspamwbwmbnlsl\":{\"description\":\"znvhxqqmq\",\"displayName\":\"aydhf\",\"documentationUrl\":\"ocxm\",\"dataSchemaUrl\":\"shksny\"},\"p\":{\"description\":\"fi\",\"displayName\":\"ktwtk\",\"documentationUrl\":\"hlpfliw\",\"dataSchemaUrl\":\"nguuzhwvla\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-05-15T02:16:36Z\",\"provisioningState\":\"Updating\",\"activationState\":\"Activated\",\"partnerTopicFriendlyDescription\":\"ybkekym\",\"messageForActivation\":\"ztsilscvq\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"hfym\",\"tenantId\":\"uihyeseuugcig\",\"userAssignedIdentities\":{\"wrqbebjnfv\":{\"principalId\":\"smg\",\"clientId\":\"mt\"},\"izpacz\":{\"principalId\":\"labt\",\"clientId\":\"biwznhtfgficudy\"},\"dbjp\":{\"principalId\":\"hbcakznhokhoit\",\"clientId\":\"rjsdmmazdnck\"}}},\"location\":\"hzqpxzbawkikcdgf\",\"tags\":{\"jey\":\"sd\",\"cfiwhagxsurejq\":\"qxded\",\"g\":\"shzz\",\"xiqqzjkoxdupna\":\"ll\"},\"id\":\"gl\",\"name\":\"ouigdmfivjqte\",\"type\":\"dqqigdydkghpc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,33 +34,31 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PartnerTopic response = manager.partnerTopics() - .getByResourceGroupWithResponse("cboe", "rgttw", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("ntfxxcrqmipfjwfo", "gizmshxxbaizabu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rytgrhzbqfdpfawr", response.location()); - Assertions.assertEquals("cshtkutzcttbqgdi", response.tags().get("d")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("iqdlratrkw", response.identity().principalId()); - Assertions.assertEquals("auwxsuykznhrfgsl", response.identity().tenantId()); - Assertions.assertEquals("ry", response.identity().userAssignedIdentities().get("pajtfeyvkbd").principalId()); - Assertions.assertEquals("zihuioaeo", - response.identity().userAssignedIdentities().get("pajtfeyvkbd").clientId()); - Assertions.assertEquals(UUID.fromString("4c37bfc0-60f2-4e7a-abbc-18fce01bbcbd"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("iuorinikc", response.source()); + Assertions.assertEquals("hzqpxzbawkikcdgf", response.location()); + Assertions.assertEquals("sd", response.tags().get("jey")); + Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("hfym", response.identity().principalId()); + Assertions.assertEquals("uihyeseuugcig", response.identity().tenantId()); + Assertions.assertEquals("smg", response.identity().userAssignedIdentities().get("wrqbebjnfv").principalId()); + Assertions.assertEquals("mt", response.identity().userAssignedIdentities().get("wrqbebjnfv").clientId()); + Assertions.assertEquals("gsk", response.partnerRegistrationImmutableId()); + Assertions.assertEquals("o", response.source()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("wmmtmqrxrzq", - response.eventTypeInfo().inlineEventTypes().get("nupoyryefqmwovyz").description()); - Assertions.assertEquals("yczyayubtgm", - response.eventTypeInfo().inlineEventTypes().get("nupoyryefqmwovyz").displayName()); - Assertions.assertEquals("iqahragpx", - response.eventTypeInfo().inlineEventTypes().get("nupoyryefqmwovyz").documentationUrl()); - Assertions.assertEquals("bp", - response.eventTypeInfo().inlineEventTypes().get("nupoyryefqmwovyz").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T06:18:18Z"), + Assertions.assertEquals("znvhxqqmq", + response.eventTypeInfo().inlineEventTypes().get("mspamwbwmbnlsl").description()); + Assertions.assertEquals("aydhf", + response.eventTypeInfo().inlineEventTypes().get("mspamwbwmbnlsl").displayName()); + Assertions.assertEquals("ocxm", + response.eventTypeInfo().inlineEventTypes().get("mspamwbwmbnlsl").documentationUrl()); + Assertions.assertEquals("shksny", + response.eventTypeInfo().inlineEventTypes().get("mspamwbwmbnlsl").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T02:16:36Z"), response.expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, response.activationState()); - Assertions.assertEquals("lbij", response.partnerTopicFriendlyDescription()); - Assertions.assertEquals("kqllczipvwdt", response.messageForActivation()); + Assertions.assertEquals(PartnerTopicActivationState.ACTIVATED, response.activationState()); + Assertions.assertEquals("ybkekym", response.partnerTopicFriendlyDescription()); + Assertions.assertEquals("ztsilscvq", 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 index 1dee6b6549da3..166ac9624017e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,7 +17,6 @@ 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; @@ -26,7 +25,7 @@ public final class PartnerTopicsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"989c271b-e9fb-4b5d-8214-8d3c323a94f5\",\"source\":\"mzrqraz\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"gbsfsgsaenwldf\":{\"description\":\"laslksk\",\"displayName\":\"qj\",\"documentationUrl\":\"baihxjtgzg\",\"dataSchemaUrl\":\"iywbqgro\"},\"yckhefrbhseue\":{\"description\":\"ljql\",\"displayName\":\"pmrjctryl\",\"documentationUrl\":\"xebuhsxrznmg\",\"dataSchemaUrl\":\"al\"},\"s\":{\"description\":\"gpxebjludcayt\",\"displayName\":\"raxdt\",\"documentationUrl\":\"yjmgtnsewo\",\"dataSchemaUrl\":\"ly\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-09-28T10:44:47Z\",\"provisioningState\":\"Deleting\",\"activationState\":\"Activated\",\"partnerTopicFriendlyDescription\":\"e\",\"messageForActivation\":\"sehq\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"twjwdsdlzm\",\"tenantId\":\"erxxxoteehkhowgo\",\"userAssignedIdentities\":{\"wbmpspfeylqloc\":{\"principalId\":\"xowpcbapn\",\"clientId\":\"raq\"},\"avxjfiuofpiei\":{\"principalId\":\"ujexayglxrk\",\"clientId\":\"nmzpas\"},\"yhydvikmfn\":{\"principalId\":\"lvs\",\"clientId\":\"ywjopac\"},\"ydyeuy\":{\"principalId\":\"millxgjs\",\"clientId\":\"zwgsoriobije\"}}},\"location\":\"hbo\",\"tags\":{\"wybriopdwe\":\"r\",\"norwaigsio\":\"f\"},\"id\":\"tqkmvjanxvzf\",\"name\":\"f\",\"type\":\"tj\"}]}"; + = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"yvxchpqvctsfae\",\"source\":\"wwsknstvzu\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"ysc\":{\"description\":\"lppdpgz\",\"displayName\":\"qazvbkarkptgo\",\"documentationUrl\":\"ruatsyiysjqhen\",\"dataSchemaUrl\":\"beqngubabyjde\"},\"croczf\":{\"description\":\"ydzjemexm\",\"displayName\":\"kvmuwrxlniwmcp\",\"documentationUrl\":\"rdlhvdvmiphbe\",\"dataSchemaUrl\":\"qjzmhkdcl\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-08-28T14:15:40Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"uxzshxz\",\"messageForActivation\":\"bzuzu\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"skejcgwfsgq\",\"tenantId\":\"t\",\"userAssignedIdentities\":{\"qwuzvcmcokx\":{\"principalId\":\"pyuijp\",\"clientId\":\"davsjcfmazpz\"},\"idackzidgzwdyd\":{\"principalId\":\"ekuvfrjwuca\",\"clientId\":\"zvajbvbnkrdem\"},\"xuknsykdtoi\":{\"principalId\":\"isvpztdivykpxkqe\",\"clientId\":\"pjfojiunrls\"}}},\"location\":\"ancdrc\",\"tags\":{\"ldxonckb\":\"vx\",\"pzweghlwwbo\":\"lblfxlupibaqzizx\",\"sbfvdstrkzxsgtzn\":\"vgfklqiyndveqe\"},\"id\":\"vlrdsmovpi\",\"name\":\"y\",\"type\":\"dnox\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,34 +35,32 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.partnerTopics() - .listByResourceGroup("mcxqqxmyzklao", "n", 1551780859, com.azure.core.util.Context.NONE); + .listByResourceGroup("krrwepgqvqokql", "jqgir", 1838193240, com.azure.core.util.Context.NONE); - Assertions.assertEquals("hbo", response.iterator().next().location()); - Assertions.assertEquals("r", response.iterator().next().tags().get("wybriopdwe")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("twjwdsdlzm", response.iterator().next().identity().principalId()); - Assertions.assertEquals("erxxxoteehkhowgo", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("xowpcbapn", - response.iterator().next().identity().userAssignedIdentities().get("wbmpspfeylqloc").principalId()); - Assertions.assertEquals("raq", - response.iterator().next().identity().userAssignedIdentities().get("wbmpspfeylqloc").clientId()); - Assertions.assertEquals(UUID.fromString("989c271b-e9fb-4b5d-8214-8d3c323a94f5"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("mzrqraz", response.iterator().next().source()); + Assertions.assertEquals("ancdrc", response.iterator().next().location()); + Assertions.assertEquals("vx", response.iterator().next().tags().get("ldxonckb")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("skejcgwfsgq", response.iterator().next().identity().principalId()); + Assertions.assertEquals("t", response.iterator().next().identity().tenantId()); + Assertions.assertEquals("pyuijp", + response.iterator().next().identity().userAssignedIdentities().get("qwuzvcmcokx").principalId()); + Assertions.assertEquals("davsjcfmazpz", + response.iterator().next().identity().userAssignedIdentities().get("qwuzvcmcokx").clientId()); + Assertions.assertEquals("yvxchpqvctsfae", response.iterator().next().partnerRegistrationImmutableId()); + Assertions.assertEquals("wwsknstvzu", response.iterator().next().source()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("laslksk", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("gbsfsgsaenwldf").description()); - Assertions.assertEquals("qj", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("gbsfsgsaenwldf").displayName()); - Assertions.assertEquals("baihxjtgzg", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("gbsfsgsaenwldf").documentationUrl()); - Assertions.assertEquals("iywbqgro", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("gbsfsgsaenwldf").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-28T10:44:47Z"), + Assertions.assertEquals("lppdpgz", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("ysc").description()); + Assertions.assertEquals("qazvbkarkptgo", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("ysc").displayName()); + Assertions.assertEquals("ruatsyiysjqhen", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("ysc").documentationUrl()); + Assertions.assertEquals("beqngubabyjde", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("ysc").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T14:15:40Z"), response.iterator().next().expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.ACTIVATED, response.iterator().next().activationState()); - Assertions.assertEquals("e", response.iterator().next().partnerTopicFriendlyDescription()); - Assertions.assertEquals("sehq", response.iterator().next().messageForActivation()); + Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, response.iterator().next().activationState()); + Assertions.assertEquals("uxzshxz", response.iterator().next().partnerTopicFriendlyDescription()); + Assertions.assertEquals("bzuzu", 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 index 512dd75d28abd..10a0c519ba47e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,7 +17,6 @@ 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; @@ -26,7 +25,7 @@ public final class PartnerTopicsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"930961b9-5f7b-49ca-900f-47e820e86c85\",\"source\":\"jvamyyznmrgcdo\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"gvo\":{\"description\":\"to\",\"displayName\":\"whttnzqs\",\"documentationUrl\":\"mebgszplu\",\"dataSchemaUrl\":\"ekpdzzmssg\"},\"cauxuvavcpfpdofu\":{\"description\":\"ejidbdqzsq\",\"displayName\":\"y\",\"documentationUrl\":\"ztlvv\",\"dataSchemaUrl\":\"nmrkkyjtrepwpwf\"},\"wpdkktpmbmxbmb\":{\"description\":\"clbtxl\",\"displayName\":\"vsolzwil\",\"documentationUrl\":\"gojfsqe\",\"dataSchemaUrl\":\"uxjxhfxf\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-06-14T02:57:26Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"bkhxsdplaum\",\"messageForActivation\":\"mhweqjfyxyd\"},\"identity\":{\"type\":\"None\",\"principalId\":\"bvwglgwzp\",\"tenantId\":\"akglhpsesrfga\",\"userAssignedIdentities\":{\"spglq\":{\"principalId\":\"dvxcgdhyhgoqgsoy\",\"clientId\":\"xyjrcbqpb\"},\"jztivfwjlofzek\":{\"principalId\":\"xtdahneao\",\"clientId\":\"t\"}}},\"location\":\"srmau\",\"tags\":{\"pejovt\":\"jvcfoczh\",\"whhnoyrzaa\":\"wxn\",\"pmjen\":\"ee\",\"xc\":\"jeatea\"},\"id\":\"xoxdjxldnaryyi\",\"name\":\"zkdolrndwdbvxvza\",\"type\":\"edoyqxlunkft\"}]}"; + = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"otnn\",\"source\":\"olousdvrg\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"apdyarikeejdpdfh\":{\"description\":\"jdrpizfulgycts\",\"displayName\":\"tqgkujd\",\"documentationUrl\":\"oxrqw\",\"dataSchemaUrl\":\"urbti\"}}},\"expirationTimeIfNotActivatedUtc\":\"2021-07-30T17:06Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"r\",\"messageForActivation\":\"ulwwtrjmeqkvyhz\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"uohuensnaajp\",\"tenantId\":\"poejnglpwsa\",\"userAssignedIdentities\":{\"nwmywxfqzkvemy\":{\"principalId\":\"sumxpezcoioyj\",\"clientId\":\"fqzwqdnxkeed\"},\"trwtxzuisam\":{\"principalId\":\"pczaqpqif\",\"clientId\":\"m\"}}},\"location\":\"at\",\"tags\":{\"plwsttxsrgxfqp\":\"exroqsqjghrmth\",\"xyrujmt\":\"niceovxgzwh\",\"hzixyqhfnkvy\":\"kesliky\"},\"id\":\"qqqdseipnquwz\",\"name\":\"hrptyodlhkfktltd\",\"type\":\"sobjop\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,34 +35,33 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.partnerTopics().list("d", 887060590, com.azure.core.util.Context.NONE); + = manager.partnerTopics().list("xn", 1670324587, com.azure.core.util.Context.NONE); - Assertions.assertEquals("srmau", response.iterator().next().location()); - Assertions.assertEquals("jvcfoczh", response.iterator().next().tags().get("pejovt")); - Assertions.assertEquals(IdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("bvwglgwzp", response.iterator().next().identity().principalId()); - Assertions.assertEquals("akglhpsesrfga", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("dvxcgdhyhgoqgsoy", - response.iterator().next().identity().userAssignedIdentities().get("spglq").principalId()); - Assertions.assertEquals("xyjrcbqpb", - response.iterator().next().identity().userAssignedIdentities().get("spglq").clientId()); - Assertions.assertEquals(UUID.fromString("930961b9-5f7b-49ca-900f-47e820e86c85"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("jvamyyznmrgcdo", response.iterator().next().source()); + Assertions.assertEquals("at", response.iterator().next().location()); + Assertions.assertEquals("exroqsqjghrmth", response.iterator().next().tags().get("plwsttxsrgxfqp")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("uohuensnaajp", response.iterator().next().identity().principalId()); + Assertions.assertEquals("poejnglpwsa", response.iterator().next().identity().tenantId()); + Assertions.assertEquals("sumxpezcoioyj", + response.iterator().next().identity().userAssignedIdentities().get("nwmywxfqzkvemy").principalId()); + Assertions.assertEquals("fqzwqdnxkeed", + response.iterator().next().identity().userAssignedIdentities().get("nwmywxfqzkvemy").clientId()); + Assertions.assertEquals("otnn", response.iterator().next().partnerRegistrationImmutableId()); + Assertions.assertEquals("olousdvrg", response.iterator().next().source()); Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("to", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("gvo").description()); - Assertions.assertEquals("whttnzqs", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("gvo").displayName()); - Assertions.assertEquals("mebgszplu", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("gvo").documentationUrl()); - Assertions.assertEquals("ekpdzzmssg", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("gvo").dataSchemaUrl()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-14T02:57:26Z"), + Assertions.assertEquals("jdrpizfulgycts", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("apdyarikeejdpdfh").description()); + Assertions.assertEquals("tqgkujd", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("apdyarikeejdpdfh").displayName()); + Assertions.assertEquals("oxrqw", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("apdyarikeejdpdfh").documentationUrl()); + Assertions.assertEquals("urbti", + response.iterator().next().eventTypeInfo().inlineEventTypes().get("apdyarikeejdpdfh").dataSchemaUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-30T17:06Z"), response.iterator().next().expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerTopicActivationState.NEVER_ACTIVATED, response.iterator().next().activationState()); - Assertions.assertEquals("bkhxsdplaum", response.iterator().next().partnerTopicFriendlyDescription()); - Assertions.assertEquals("mhweqjfyxyd", response.iterator().next().messageForActivation()); + Assertions.assertEquals("r", response.iterator().next().partnerTopicFriendlyDescription()); + Assertions.assertEquals("ulwwtrjmeqkvyhz", 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 index 80fdddbd71c50..70cc24eda0efc 100644 --- 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 @@ -1,167 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.PartnerTopicsListResult; 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\":\"9957763c-ead0-4534-be8d-06ce73c63a6c\",\"source\":\"llxecwc\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"lhc\":{},\"wjutifdwfmv\":{},\"gorqjbttzh\":{}}},\"expirationTimeIfNotActivatedUtc\":\"2021-01-05T10:30:14Z\",\"provisioningState\":\"Updating\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"onqjujeickpzvcpo\",\"messageForActivation\":\"xelnwc\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"ex\",\"tenantId\":\"lfmk\",\"userAssignedIdentities\":{\"mxyasflvgsgzw\":{\"principalId\":\"zuawxtzxpuamwa\",\"clientId\":\"xrvxcushsphai\"},\"ljhlnymzotq\":{\"principalId\":\"akoi\",\"clientId\":\"nsmjbl\"}}},\"location\":\"ryuzcbmqqv\",\"tags\":{\"ujlzqnhcvsqltn\":\"wfgtayxonsup\"},\"id\":\"oibgsxg\",\"name\":\"xfyqonmpqoxwdo\",\"type\":\"dbxiqx\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"a702d427-fd02-484c-bf5e-40108e56fdfa\",\"source\":\"bimhtmwwinhe\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"vwbcblembnkbwv\":{},\"vxkdivqihebwtswb\":{}}},\"expirationTimeIfNotActivatedUtc\":\"2021-01-18T05:52:32Z\",\"provisioningState\":\"Succeeded\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"agegiz\",\"messageForActivation\":\"jfelisdjubggbqig\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"zgakgacyrcmj\",\"tenantId\":\"spofapvuhry\",\"userAssignedIdentities\":{\"f\":{\"principalId\":\"frzgbzjed\",\"clientId\":\"tkvnlvxbcuiiznkt\"},\"kiwbuqnyoph\":{\"principalId\":\"snvpdibmi\",\"clientId\":\"stbz\"},\"e\":{\"principalId\":\"yls\",\"clientId\":\"rpfbcunezz\"},\"ylptrsqqwztcm\":{\"principalId\":\"lfwyfwlwxjwetn\",\"clientId\":\"ihclafzv\"}}},\"location\":\"qkc\",\"tags\":{\"xfdeqvhpsyl\":\"waxfewzjkj\",\"bffmbmxz\":\"ksh\",\"jx\":\"rgywwp\"},\"id\":\"nptfujgi\",\"name\":\"gaao\",\"type\":\"pttaqutd\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"8b076c3b-3c2a-4a13-ab8a-8220bc85afe4\",\"source\":\"xswvru\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"ehkfkimrtixok\":{},\"fqyinljqepqw\":{},\"ixmonstshiyxg\":{},\"elfclducc\":{}}},\"expirationTimeIfNotActivatedUtc\":\"2021-10-18T23:01:08Z\",\"provisioningState\":\"Canceled\",\"activationState\":\"NeverActivated\",\"partnerTopicFriendlyDescription\":\"cobiegstmninwjiz\",\"messageForActivation\":\"lnghgshejjtbxqmu\"},\"identity\":{\"type\":\"None\",\"principalId\":\"zvners\",\"tenantId\":\"cucrwnamikze\",\"userAssignedIdentities\":{\"hczznvf\":{\"principalId\":\"smswziqgfuh\",\"clientId\":\"zruswh\"},\"umwmxqhnd\":{\"principalId\":\"cjsxjww\",\"clientId\":\"z\"}}},\"location\":\"noamldsehaohdj\",\"tags\":{\"coxpelnjeta\":\"lzok\",\"g\":\"ltsxoatf\"},\"id\":\"pnpbswveflocc\",\"name\":\"rmozihmipgawt\",\"type\":\"xp\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"1087f6d0-1c79-4615-b02e-ab45004f022e\",\"source\":\"xcjxgrytfmpcy\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"aykggnoxu\":{},\"t\":{},\"ksxwpnd\":{}}},\"expirationTimeIfNotActivatedUtc\":\"2021-01-21T22:39:06Z\",\"provisioningState\":\"IdleDueToMirroredChannelResourceDeletion\",\"activationState\":\"Activated\",\"partnerTopicFriendlyDescription\":\"hjtwkjaosrx\",\"messageForActivation\":\"voamktcqiosmg\"},\"identity\":{\"type\":\"None\",\"principalId\":\"qdlyrtl\",\"tenantId\":\"ap\",\"userAssignedIdentities\":{\"agunbtgfebw\":{\"principalId\":\"katbhjm\",\"clientId\":\"nbsoqeqalarv\"}}},\"location\":\"nbmhyree\",\"tags\":{\"lyyzglgouwtlmjj\":\"qavbpdqmj\",\"baxk\":\"uojqt\",\"lbfjkwr\":\"eytu\"},\"id\":\"snkq\",\"name\":\"hsyrqunj\",\"type\":\"hdenxaulk\"}],\"nextLink\":\"kdk\"}") + "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"izruwnpqxpxiwfc\",\"source\":\"jsa\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"mkzjvkviir\":{},\"gfgrwsdp\":{},\"ra\":{},\"zvzbglbyv\":{}}},\"expirationTimeIfNotActivatedUtc\":\"2021-05-26T01:46:31Z\",\"provisioningState\":\"Creating\",\"activationState\":\"Deactivated\",\"partnerTopicFriendlyDescription\":\"j\",\"messageForActivation\":\"rgxffmshkw\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"zxwopdbydpizq\",\"tenantId\":\"lnapxbiygn\",\"userAssignedIdentities\":{\"rehmr\":{\"principalId\":\"nfsm\",\"clientId\":\"ttuxuuyilflqoiqu\"}}},\"location\":\"hvsujztc\",\"tags\":{\"fprnjl\":\"qjtwhauu\",\"rpddouifamo\":\"tlxs\",\"iwhxqszdtmaajq\":\"aziynknlqwzdv\"},\"id\":\"huxy\",\"name\":\"rjvmtygjbmzyosp\",\"type\":\"p\"}],\"nextLink\":\"c\"}") .toObject(PartnerTopicsListResult.class); - Assertions.assertEquals("ryuzcbmqqv", model.value().get(0).location()); - Assertions.assertEquals("wfgtayxonsup", model.value().get(0).tags().get("ujlzqnhcvsqltn")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ex", model.value().get(0).identity().principalId()); - Assertions.assertEquals("lfmk", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("zuawxtzxpuamwa", - model.value().get(0).identity().userAssignedIdentities().get("mxyasflvgsgzw").principalId()); - Assertions.assertEquals("xrvxcushsphai", - model.value().get(0).identity().userAssignedIdentities().get("mxyasflvgsgzw").clientId()); - Assertions.assertEquals(UUID.fromString("9957763c-ead0-4534-be8d-06ce73c63a6c"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("llxecwc", model.value().get(0).source()); + Assertions.assertEquals("hvsujztc", model.value().get(0).location()); + Assertions.assertEquals("qjtwhauu", model.value().get(0).tags().get("fprnjl")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("zxwopdbydpizq", model.value().get(0).identity().principalId()); + Assertions.assertEquals("lnapxbiygn", model.value().get(0).identity().tenantId()); + Assertions.assertEquals("nfsm", + model.value().get(0).identity().userAssignedIdentities().get("rehmr").principalId()); + Assertions.assertEquals("ttuxuuyilflqoiqu", + model.value().get(0).identity().userAssignedIdentities().get("rehmr").clientId()); + Assertions.assertEquals("izruwnpqxpxiwfc", model.value().get(0).partnerRegistrationImmutableId()); + Assertions.assertEquals("jsa", model.value().get(0).source()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.value().get(0).eventTypeInfo().kind()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T10:30:14Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-05-26T01:46:31Z"), model.value().get(0).expirationTimeIfNotActivatedUtc()); Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, model.value().get(0).activationState()); - Assertions.assertEquals("onqjujeickpzvcpo", model.value().get(0).partnerTopicFriendlyDescription()); - Assertions.assertEquals("xelnwc", model.value().get(0).messageForActivation()); - Assertions.assertEquals("kdk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartnerTopicsListResult model = new PartnerTopicsListResult().withValue(Arrays - .asList( - new PartnerTopicInner() - .withLocation("ryuzcbmqqv") - .withTags(mapOf("ujlzqnhcvsqltn", "wfgtayxonsup")) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("ex") - .withTenantId("lfmk") - .withUserAssignedIdentities(mapOf("mxyasflvgsgzw", - new UserIdentityProperties().withPrincipalId("zuawxtzxpuamwa") - .withClientId("xrvxcushsphai"), - "ljhlnymzotq", - new UserIdentityProperties().withPrincipalId("akoi").withClientId("nsmjbl")))) - .withPartnerRegistrationImmutableId(UUID.fromString("9957763c-ead0-4534-be8d-06ce73c63a6c")) - .withSource("llxecwc") - .withEventTypeInfo(new EventTypeInfo() - .withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes( - mapOf( - "lhc", new InlineEventProperties(), "wjutifdwfmv", new InlineEventProperties(), - "gorqjbttzh", new InlineEventProperties()))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-01-05T10:30:14Z")) - .withActivationState(PartnerTopicActivationState.DEACTIVATED) - .withPartnerTopicFriendlyDescription("onqjujeickpzvcpo") - .withMessageForActivation("xelnwc"), - new PartnerTopicInner().withLocation("qkc") - .withTags(mapOf("xfdeqvhpsyl", "waxfewzjkj", "bffmbmxz", "ksh", "jx", "rgywwp")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("zgakgacyrcmj") - .withTenantId("spofapvuhry") - .withUserAssignedIdentities(mapOf("f", - new UserIdentityProperties().withPrincipalId("frzgbzjed").withClientId("tkvnlvxbcuiiznkt"), - "kiwbuqnyoph", - new UserIdentityProperties().withPrincipalId("snvpdibmi").withClientId("stbz"), "e", - new UserIdentityProperties().withPrincipalId("yls").withClientId("rpfbcunezz"), - "ylptrsqqwztcm", - new UserIdentityProperties().withPrincipalId("lfwyfwlwxjwetn").withClientId("ihclafzv")))) - .withPartnerRegistrationImmutableId(UUID.fromString("a702d427-fd02-484c-bf5e-40108e56fdfa")) - .withSource("bimhtmwwinhe") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("vwbcblembnkbwv", new InlineEventProperties(), "vxkdivqihebwtswb", - new InlineEventProperties()))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-01-18T05:52:32Z")) - .withActivationState(PartnerTopicActivationState.NEVER_ACTIVATED) - .withPartnerTopicFriendlyDescription("agegiz") - .withMessageForActivation("jfelisdjubggbqig"), - new PartnerTopicInner().withLocation("noamldsehaohdj") - .withTags(mapOf("coxpelnjeta", "lzok", "g", "ltsxoatf")) - .withIdentity(new IdentityInfo().withType(IdentityType.NONE) - .withPrincipalId("zvners") - .withTenantId("cucrwnamikze") - .withUserAssignedIdentities(mapOf("hczznvf", - new UserIdentityProperties().withPrincipalId("smswziqgfuh").withClientId("zruswh"), - "umwmxqhnd", new UserIdentityProperties().withPrincipalId("cjsxjww").withClientId("z")))) - .withPartnerRegistrationImmutableId(UUID.fromString("8b076c3b-3c2a-4a13-ab8a-8220bc85afe4")) - .withSource("xswvru") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("ehkfkimrtixok", new InlineEventProperties(), "fqyinljqepqw", - new InlineEventProperties(), "ixmonstshiyxg", new InlineEventProperties(), "elfclducc", - new InlineEventProperties()))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-10-18T23:01:08Z")) - .withActivationState(PartnerTopicActivationState.NEVER_ACTIVATED) - .withPartnerTopicFriendlyDescription("cobiegstmninwjiz") - .withMessageForActivation("lnghgshejjtbxqmu"), - new PartnerTopicInner().withLocation("nbmhyree") - .withTags(mapOf("lyyzglgouwtlmjj", "qavbpdqmj", "baxk", "uojqt", "lbfjkwr", "eytu")) - .withIdentity(new IdentityInfo().withType(IdentityType.NONE) - .withPrincipalId("qdlyrtl") - .withTenantId("ap") - .withUserAssignedIdentities(mapOf("agunbtgfebw", - new UserIdentityProperties().withPrincipalId("katbhjm").withClientId("nbsoqeqalarv")))) - .withPartnerRegistrationImmutableId(UUID.fromString("1087f6d0-1c79-4615-b02e-ab45004f022e")) - .withSource("xcjxgrytfmpcy") - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("aykggnoxu", new InlineEventProperties(), "t", - new InlineEventProperties(), "ksxwpnd", new InlineEventProperties()))) - .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2021-01-21T22:39:06Z")) - .withActivationState(PartnerTopicActivationState.ACTIVATED) - .withPartnerTopicFriendlyDescription("hjtwkjaosrx") - .withMessageForActivation("voamktcqiosmg"))) - .withNextLink("kdk"); - model = BinaryData.fromObject(model).toObject(PartnerTopicsListResult.class); - Assertions.assertEquals("ryuzcbmqqv", model.value().get(0).location()); - Assertions.assertEquals("wfgtayxonsup", model.value().get(0).tags().get("ujlzqnhcvsqltn")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ex", model.value().get(0).identity().principalId()); - Assertions.assertEquals("lfmk", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("zuawxtzxpuamwa", - model.value().get(0).identity().userAssignedIdentities().get("mxyasflvgsgzw").principalId()); - Assertions.assertEquals("xrvxcushsphai", - model.value().get(0).identity().userAssignedIdentities().get("mxyasflvgsgzw").clientId()); - Assertions.assertEquals(UUID.fromString("9957763c-ead0-4534-be8d-06ce73c63a6c"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("llxecwc", model.value().get(0).source()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.value().get(0).eventTypeInfo().kind()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T10:30:14Z"), - model.value().get(0).expirationTimeIfNotActivatedUtc()); - Assertions.assertEquals(PartnerTopicActivationState.DEACTIVATED, model.value().get(0).activationState()); - Assertions.assertEquals("onqjujeickpzvcpo", model.value().get(0).partnerTopicFriendlyDescription()); - Assertions.assertEquals("xelnwc", model.value().get(0).messageForActivation()); - Assertions.assertEquals("kdk", 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; + Assertions.assertEquals("j", model.value().get(0).partnerTopicFriendlyDescription()); + Assertions.assertEquals("rgxffmshkw", model.value().get(0).messageForActivation()); + Assertions.assertEquals("c", model.nextLink()); } } 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 index 3a4c4ba902076..eb94723335628 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; 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 index 5abc605570960..60a229471e0d1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,36 +17,45 @@ 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\"}}}}") + "{\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"d\":{\"description\":\"rxsagafcnihgwqa\",\"displayName\":\"edgfbcvkcvq\",\"documentationUrl\":\"keqdcvdrhvoods\",\"dataSchemaUrl\":\"bobzdopcjwvnhd\"},\"ggkzzlvmbmpa\":{\"description\":\"gx\",\"displayName\":\"rslpmutwuoeg\",\"documentationUrl\":\"khjwn\",\"dataSchemaUrl\":\"qsluicp\"},\"zvqtmnubexkp\":{\"description\":\"odfvuefywsbp\",\"displayName\":\"mwyhr\",\"documentationUrl\":\"uyfta\",\"dataSchemaUrl\":\"cpwi\"},\"cxozapvhelxp\":{\"description\":\"smond\",\"displayName\":\"quxvypomgkop\",\"documentationUrl\":\"hojvpajqgxysmocm\",\"dataSchemaUrl\":\"fqvm\"}}}}") .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()); + Assertions.assertEquals("rxsagafcnihgwqa", model.eventTypeInfo().inlineEventTypes().get("d").description()); + Assertions.assertEquals("edgfbcvkcvq", model.eventTypeInfo().inlineEventTypes().get("d").displayName()); + Assertions.assertEquals("keqdcvdrhvoods", model.eventTypeInfo().inlineEventTypes().get("d").documentationUrl()); + Assertions.assertEquals("bobzdopcjwvnhd", model.eventTypeInfo().inlineEventTypes().get("d").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")))); + .withInlineEventTypes(mapOf("d", + new InlineEventProperties().withDescription("rxsagafcnihgwqa") + .withDisplayName("edgfbcvkcvq") + .withDocumentationUrl("keqdcvdrhvoods") + .withDataSchemaUrl("bobzdopcjwvnhd"), + "ggkzzlvmbmpa", + new InlineEventProperties().withDescription("gx") + .withDisplayName("rslpmutwuoeg") + .withDocumentationUrl("khjwn") + .withDataSchemaUrl("qsluicp"), + "zvqtmnubexkp", + new InlineEventProperties().withDescription("odfvuefywsbp") + .withDisplayName("mwyhr") + .withDocumentationUrl("uyfta") + .withDataSchemaUrl("cpwi"), + "cxozapvhelxp", + new InlineEventProperties().withDescription("smond") + .withDisplayName("quxvypomgkop") + .withDocumentationUrl("hojvpajqgxysmocm") + .withDataSchemaUrl("fqvm")))); 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()); + Assertions.assertEquals("rxsagafcnihgwqa", model.eventTypeInfo().inlineEventTypes().get("d").description()); + Assertions.assertEquals("edgfbcvkcvq", model.eventTypeInfo().inlineEventTypes().get("d").displayName()); + Assertions.assertEquals("keqdcvdrhvoods", model.eventTypeInfo().inlineEventTypes().get("d").documentationUrl()); + Assertions.assertEquals("bobzdopcjwvnhd", model.eventTypeInfo().inlineEventTypes().get("d").dataSchemaUrl()); } // Use "Map.of" if available 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 index fff431a98a08a..c3f0a7020612a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,24 +13,24 @@ public final class PermissionBindingInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PermissionBindingInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"otiowlxteqd\",\"topicSpaceName\":\"jgwdtgukranbl\",\"permission\":\"Subscriber\",\"clientGroupName\":\"lkccuzgygqwa\",\"provisioningState\":\"Deleted\"},\"id\":\"lwgniiprglvawu\",\"name\":\"z\",\"type\":\"ufypiv\"}") + "{\"properties\":{\"description\":\"wvmzegjonfhjir\",\"topicSpaceName\":\"dnqzbrfkspzhzmt\",\"permission\":\"Subscriber\",\"clientGroupName\":\"itdigsxcdgljp\",\"provisioningState\":\"Creating\"},\"id\":\"acht\",\"name\":\"mflrytswfpfmdgyc\",\"type\":\"nmskwhqj\"}") .toObject(PermissionBindingInner.class); - Assertions.assertEquals("otiowlxteqd", model.description()); - Assertions.assertEquals("jgwdtgukranbl", model.topicSpaceName()); + Assertions.assertEquals("wvmzegjonfhjir", model.description()); + Assertions.assertEquals("dnqzbrfkspzhzmt", model.topicSpaceName()); Assertions.assertEquals(PermissionType.SUBSCRIBER, model.permission()); - Assertions.assertEquals("lkccuzgygqwa", model.clientGroupName()); + Assertions.assertEquals("itdigsxcdgljp", model.clientGroupName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PermissionBindingInner model = new PermissionBindingInner().withDescription("otiowlxteqd") - .withTopicSpaceName("jgwdtgukranbl") + PermissionBindingInner model = new PermissionBindingInner().withDescription("wvmzegjonfhjir") + .withTopicSpaceName("dnqzbrfkspzhzmt") .withPermission(PermissionType.SUBSCRIBER) - .withClientGroupName("lkccuzgygqwa"); + .withClientGroupName("itdigsxcdgljp"); model = BinaryData.fromObject(model).toObject(PermissionBindingInner.class); - Assertions.assertEquals("otiowlxteqd", model.description()); - Assertions.assertEquals("jgwdtgukranbl", model.topicSpaceName()); + Assertions.assertEquals("wvmzegjonfhjir", model.description()); + Assertions.assertEquals("dnqzbrfkspzhzmt", model.topicSpaceName()); Assertions.assertEquals(PermissionType.SUBSCRIBER, model.permission()); - Assertions.assertEquals("lkccuzgygqwa", model.clientGroupName()); + Assertions.assertEquals("itdigsxcdgljp", 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 index da8f6cde17f0d..b1ae15e291693 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,24 +13,24 @@ public final class PermissionBindingPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PermissionBindingProperties model = BinaryData.fromString( - "{\"description\":\"bbjpmcubkmif\",\"topicSpaceName\":\"xkubvphavpmhbrbq\",\"permission\":\"Subscriber\",\"clientGroupName\":\"vpbbt\",\"provisioningState\":\"Deleted\"}") + "{\"description\":\"slurlpshhkvpe\",\"topicSpaceName\":\"qsl\",\"permission\":\"Publisher\",\"clientGroupName\":\"pq\",\"provisioningState\":\"Deleted\"}") .toObject(PermissionBindingProperties.class); - Assertions.assertEquals("bbjpmcubkmif", model.description()); - Assertions.assertEquals("xkubvphavpmhbrbq", model.topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, model.permission()); - Assertions.assertEquals("vpbbt", model.clientGroupName()); + Assertions.assertEquals("slurlpshhkvpe", model.description()); + Assertions.assertEquals("qsl", model.topicSpaceName()); + Assertions.assertEquals(PermissionType.PUBLISHER, model.permission()); + Assertions.assertEquals("pq", model.clientGroupName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PermissionBindingProperties model = new PermissionBindingProperties().withDescription("bbjpmcubkmif") - .withTopicSpaceName("xkubvphavpmhbrbq") - .withPermission(PermissionType.SUBSCRIBER) - .withClientGroupName("vpbbt"); + PermissionBindingProperties model = new PermissionBindingProperties().withDescription("slurlpshhkvpe") + .withTopicSpaceName("qsl") + .withPermission(PermissionType.PUBLISHER) + .withClientGroupName("pq"); model = BinaryData.fromObject(model).toObject(PermissionBindingProperties.class); - Assertions.assertEquals("bbjpmcubkmif", model.description()); - Assertions.assertEquals("xkubvphavpmhbrbq", model.topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, model.permission()); - Assertions.assertEquals("vpbbt", model.clientGroupName()); + Assertions.assertEquals("slurlpshhkvpe", model.description()); + Assertions.assertEquals("qsl", model.topicSpaceName()); + Assertions.assertEquals(PermissionType.PUBLISHER, model.permission()); + Assertions.assertEquals("pq", 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 index caf9e9993db2e..0dea0fe0703dc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class PermissionBindingsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"kui\",\"topicSpaceName\":\"uftekioo\",\"permission\":\"Subscriber\",\"clientGroupName\":\"ewfhvpxjh\",\"provisioningState\":\"Succeeded\"},\"id\":\"fjz\",\"name\":\"bbwzgvzuaixcd\",\"type\":\"kixsps\"}"; + = "{\"properties\":{\"description\":\"zucwwmejjqhd\",\"topicSpaceName\":\"vmqxi\",\"permission\":\"Publisher\",\"clientGroupName\":\"yfozkbnzxbypfqp\",\"provisioningState\":\"Succeeded\"},\"id\":\"wrgr\",\"name\":\"kderf\",\"type\":\"swqi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,17 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PermissionBinding response = manager.permissionBindings() - .define("wotfcuu") - .withExistingNamespace("ifopf", "xdwdrpazqjkrfm") - .withDescription("jigpgayiawohfmh") - .withTopicSpaceName("zmecjjkmqenhai") - .withPermission(PermissionType.SUBSCRIBER) - .withClientGroupName("vs") + .define("kfecjvxf") + .withExistingNamespace("rkgzkyhudbkuw", "zqxlcwe") + .withDescription("fqi") + .withTopicSpaceName("vppwooajeyyjm") + .withPermission(PermissionType.PUBLISHER) + .withClientGroupName("zxpxhn") .create(); - Assertions.assertEquals("kui", response.description()); - Assertions.assertEquals("uftekioo", response.topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, response.permission()); - Assertions.assertEquals("ewfhvpxjh", response.clientGroupName()); + Assertions.assertEquals("zucwwmejjqhd", response.description()); + Assertions.assertEquals("vmqxi", response.topicSpaceName()); + Assertions.assertEquals(PermissionType.PUBLISHER, response.permission()); + Assertions.assertEquals("yfozkbnzxbypfqp", 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 index d66af78f5c58d..2edad655048e7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.permissionBindings().delete("zstrktgvpatrg", "jktfinf", "oksmmculwk", com.azure.core.util.Context.NONE); + manager.permissionBindings().delete("xegtvgwyur", "elfnzzryiz", "bxgde", 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 index 23b2e469baffc..bde01557b5fb0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class PermissionBindingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"ekd\",\"topicSpaceName\":\"vuftrsvjmnsvu\",\"permission\":\"Publisher\",\"clientGroupName\":\"tvolefcj\",\"provisioningState\":\"Deleting\"},\"id\":\"kdb\",\"name\":\"otfbjampqoclann\",\"type\":\"xynlsuqb\"}"; + = "{\"properties\":{\"description\":\"fugiphrrkuu\",\"topicSpaceName\":\"qdurhzzfopue\",\"permission\":\"Publisher\",\"clientGroupName\":\"vwlujopwnib\",\"provisioningState\":\"Updating\"},\"id\":\"zt\",\"name\":\"dqumqvfm\",\"type\":\"caddtgc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PermissionBinding response = manager.permissionBindings() - .getWithResponse("igfoujjcxgdqmr", "hnzkwopswnyinxu", "rrxyxwjezbfqpl", com.azure.core.util.Context.NONE) + .getWithResponse("fpnimtwuuhaueg", "kwmnfeub", "zjy", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ekd", response.description()); - Assertions.assertEquals("vuftrsvjmnsvu", response.topicSpaceName()); + Assertions.assertEquals("fugiphrrkuu", response.description()); + Assertions.assertEquals("qdurhzzfopue", response.topicSpaceName()); Assertions.assertEquals(PermissionType.PUBLISHER, response.permission()); - Assertions.assertEquals("tvolefcj", response.clientGroupName()); + Assertions.assertEquals("vwlujopwnib", 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 index c06bf78efe899..a2b7d899b6d2b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -23,7 +23,7 @@ public final class PermissionBindingsListByNamespaceMockTests { @Test public void testListByNamespace() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"cdsgxceluji\",\"topicSpaceName\":\"lluunxh\",\"permission\":\"Subscriber\",\"clientGroupName\":\"xzfwugeupcknec\",\"provisioningState\":\"Creating\"},\"id\":\"rvfp\",\"name\":\"jdmngsytqpdzfyxc\",\"type\":\"wawoxcgzbejqf\"}]}"; + = "{\"value\":[{\"properties\":{\"description\":\"xflnbcpjstbh\",\"topicSpaceName\":\"hcucsqsnx\",\"permission\":\"Publisher\",\"clientGroupName\":\"feapdrbzyvbsuadu\",\"provisioningState\":\"Canceled\"},\"id\":\"kaxpfobkzhmh\",\"name\":\"dqltdel\",\"type\":\"qrojadhfztlray\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testListByNamespace() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.permissionBindings() - .listByNamespace("icruo", "krjflsgaojb", "qpqsdoctpzpuj", 225216862, com.azure.core.util.Context.NONE); + .listByNamespace("xlayunomir", "p", "abenqlamwmg", 777848301, com.azure.core.util.Context.NONE); - Assertions.assertEquals("cdsgxceluji", response.iterator().next().description()); - Assertions.assertEquals("lluunxh", response.iterator().next().topicSpaceName()); - Assertions.assertEquals(PermissionType.SUBSCRIBER, response.iterator().next().permission()); - Assertions.assertEquals("xzfwugeupcknec", response.iterator().next().clientGroupName()); + Assertions.assertEquals("xflnbcpjstbh", response.iterator().next().description()); + Assertions.assertEquals("hcucsqsnx", response.iterator().next().topicSpaceName()); + Assertions.assertEquals(PermissionType.PUBLISHER, response.iterator().next().permission()); + Assertions.assertEquals("feapdrbzyvbsuadu", 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 index 7760ed6eb8cea..7779b719f7def 100644 --- 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 @@ -1,54 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.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\":\"ssqyzqedik\",\"topicSpaceName\":\"rdbiqmrjge\",\"permission\":\"Publisher\",\"clientGroupName\":\"lg\",\"provisioningState\":\"Updating\"},\"id\":\"wzcxmjpbyephmgt\",\"name\":\"ljvrcmyfqipgxhnp\",\"type\":\"myqwcab\"},{\"properties\":{\"description\":\"ilee\",\"topicSpaceName\":\"swlpaugmrmfj\",\"permission\":\"Subscriber\",\"clientGroupName\":\"toaukhfkvcisiz\",\"provisioningState\":\"Succeeded\"},\"id\":\"dsxjwuivedw\",\"name\":\"gyeewxeiq\",\"type\":\"psmgo\"},{\"properties\":{\"description\":\"amljdlrgmsplzgau\",\"topicSpaceName\":\"shhvnewgnxky\",\"permission\":\"Publisher\",\"clientGroupName\":\"nxrjkixtwbtaoy\",\"provisioningState\":\"Deleted\"},\"id\":\"hshxcylhkgmnsghp\",\"name\":\"ycphdrwjjkhvyo\",\"type\":\"ac\"},{\"properties\":{\"description\":\"vxnqmhrpqpd\",\"topicSpaceName\":\"mkoisqcssf\",\"permission\":\"Publisher\",\"clientGroupName\":\"fmcsypobkd\",\"provisioningState\":\"Succeeded\"},\"id\":\"zsylollgt\",\"name\":\"czzydmxzjij\",\"type\":\"vuaurk\"}],\"nextLink\":\"ci\"}") + "{\"value\":[{\"properties\":{\"description\":\"ndcbrwi\",\"topicSpaceName\":\"vqejosovy\",\"permission\":\"Publisher\",\"clientGroupName\":\"a\",\"provisioningState\":\"Deleting\"},\"id\":\"uqtljqobbpih\",\"name\":\"hcecybmrqbr\",\"type\":\"bbmpxdlvykfre\"},{\"properties\":{\"description\":\"s\",\"topicSpaceName\":\"wjksghudgzhxo\",\"permission\":\"Subscriber\",\"clientGroupName\":\"svoujkxi\",\"provisioningState\":\"Deleted\"},\"id\":\"hrkmdyomkxfbvfbh\",\"name\":\"y\",\"type\":\"rhpw\"},{\"properties\":{\"description\":\"deimawzov\",\"topicSpaceName\":\"kumuikjcjca\",\"permission\":\"Publisher\",\"clientGroupName\":\"snsqowxwcoml\",\"provisioningState\":\"Updating\"},\"id\":\"wvczcswkacve\",\"name\":\"yfdvlvhbwrnfxtgd\",\"type\":\"pqthehnmnaoya\"}],\"nextLink\":\"coeqswankltytm\"}") .toObject(PermissionBindingsListResult.class); - Assertions.assertEquals("ssqyzqedik", model.value().get(0).description()); - Assertions.assertEquals("rdbiqmrjge", model.value().get(0).topicSpaceName()); + Assertions.assertEquals("ndcbrwi", model.value().get(0).description()); + Assertions.assertEquals("vqejosovy", model.value().get(0).topicSpaceName()); Assertions.assertEquals(PermissionType.PUBLISHER, model.value().get(0).permission()); - Assertions.assertEquals("lg", model.value().get(0).clientGroupName()); - Assertions.assertEquals("ci", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PermissionBindingsListResult model = new PermissionBindingsListResult().withValue(Arrays.asList( - new PermissionBindingInner().withDescription("ssqyzqedik") - .withTopicSpaceName("rdbiqmrjge") - .withPermission(PermissionType.PUBLISHER) - .withClientGroupName("lg"), - new PermissionBindingInner().withDescription("ilee") - .withTopicSpaceName("swlpaugmrmfj") - .withPermission(PermissionType.SUBSCRIBER) - .withClientGroupName("toaukhfkvcisiz"), - new PermissionBindingInner().withDescription("amljdlrgmsplzgau") - .withTopicSpaceName("shhvnewgnxky") - .withPermission(PermissionType.PUBLISHER) - .withClientGroupName("nxrjkixtwbtaoy"), - new PermissionBindingInner().withDescription("vxnqmhrpqpd") - .withTopicSpaceName("mkoisqcssf") - .withPermission(PermissionType.PUBLISHER) - .withClientGroupName("fmcsypobkd"))) - .withNextLink("ci"); - model = BinaryData.fromObject(model).toObject(PermissionBindingsListResult.class); - Assertions.assertEquals("ssqyzqedik", model.value().get(0).description()); - Assertions.assertEquals("rdbiqmrjge", model.value().get(0).topicSpaceName()); - Assertions.assertEquals(PermissionType.PUBLISHER, model.value().get(0).permission()); - Assertions.assertEquals("lg", model.value().get(0).clientGroupName()); - Assertions.assertEquals("ci", model.nextLink()); + Assertions.assertEquals("a", model.value().get(0).clientGroupName()); + Assertions.assertEquals("coeqswankltytm", model.nextLink()); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PlatformCapabilitiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PlatformCapabilitiesTests.java new file mode 100644 index 0000000000000..079b7e9807606 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PlatformCapabilitiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.eventgrid.models.ConfidentialCompute; +import com.azure.resourcemanager.eventgrid.models.ConfidentialComputeMode; +import com.azure.resourcemanager.eventgrid.models.PlatformCapabilities; +import org.junit.jupiter.api.Assertions; + +public final class PlatformCapabilitiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformCapabilities model = BinaryData.fromString("{\"confidentialCompute\":{\"mode\":\"Enabled\"}}") + .toObject(PlatformCapabilities.class); + Assertions.assertEquals(ConfidentialComputeMode.ENABLED, model.confidentialCompute().mode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PlatformCapabilities model = new PlatformCapabilities() + .withConfidentialCompute(new ConfidentialCompute().withMode(ConfidentialComputeMode.ENABLED)); + model = BinaryData.fromObject(model).toObject(PlatformCapabilities.class); + Assertions.assertEquals(ConfidentialComputeMode.ENABLED, model.confidentialCompute().mode()); + } +} 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 index 20e193d566761..0d9807e4983ef 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,31 +17,34 @@ 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\"}") + "{\"properties\":{\"privateEndpoint\":{\"id\":\"yc\"},\"groupIds\":[\"ewmdw\",\"jeiachboosfl\",\"ro\",\"fqpte\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"ypyqrimzinp\",\"actionsRequired\":\"wjdk\"},\"provisioningState\":\"Updating\"},\"id\":\"od\",\"name\":\"xhcr\",\"type\":\"nohjt\"}") .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()); + Assertions.assertEquals("yc", model.privateEndpoint().id()); + Assertions.assertEquals("ewmdw", model.groupIds().get(0)); + Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("ypyqrimzinp", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("wjdk", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals(ResourceProvisioningState.UPDATING, 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); + PrivateEndpointConnectionInner model + = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("yc")) + .withGroupIds(Arrays.asList("ewmdw", "jeiachboosfl", "ro", "fqpte")) + .withPrivateLinkServiceConnectionState( + new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) + .withDescription("ypyqrimzinp") + .withActionsRequired("wjdk")) + .withProvisioningState(ResourceProvisioningState.UPDATING); 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()); + Assertions.assertEquals("yc", model.privateEndpoint().id()); + Assertions.assertEquals("ewmdw", model.groupIds().get(0)); + Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("ypyqrimzinp", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("wjdk", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals(ResourceProvisioningState.UPDATING, 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 index c0ced6e827806..bcdae01a5e6c8 100644 --- 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 @@ -1,66 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.PrivateEndpointConnectionListResult; 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\":\"rdcoxnbkkj\"},\"groupIds\":[\"rnnqb\",\"q\",\"pizxqltgrdogyp\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"fihwu\",\"actionsRequired\":\"ctafsrbxrblm\"},\"provisioningState\":\"Creating\"},\"id\":\"wxihs\",\"name\":\"nxw\",\"type\":\"agnepzwaklsb\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"qagwwrxaomz\"},\"groupIds\":[\"lrrcz\",\"zkhhltnjadhqo\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"yueayfbpcmsp\",\"actionsRequired\":\"yrrueqth\"},\"provisioningState\":\"Canceled\"},\"id\":\"nmbscbbx\",\"name\":\"gdhxi\",\"type\":\"d\"}],\"nextLink\":\"pedbwdpyqy\"}") + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"nnhdrl\"},\"groupIds\":[\"jcsgguxhemlwy\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"zgfbukklelssx\",\"actionsRequired\":\"ycsxzu\"},\"provisioningState\":\"Creating\"},\"id\":\"lsmdesqplpvmjc\",\"name\":\"oewbid\",\"type\":\"vteo\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"piudeugfsxzecpa\"},\"groupIds\":[\"ufykhvuhxepmru\",\"znabaobns\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ltymkmvguihywart\",\"actionsRequired\":\"phkixkykxdssjpe\"},\"provisioningState\":\"Canceled\"},\"id\":\"fxhikkflrmymyi\",\"name\":\"cqlh\",\"type\":\"isws\"}],\"nextLink\":\"iiiovgqcgxuugq\"}") .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("rdcoxnbkkj", model.value().get(0).privateEndpoint().id()); - Assertions.assertEquals("rnnqb", model.value().get(0).groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, + Assertions.assertEquals("nnhdrl", model.value().get(0).privateEndpoint().id()); + Assertions.assertEquals("jcsgguxhemlwy", model.value().get(0).groupIds().get(0)); + Assertions.assertEquals(PersistedConnectionStatus.APPROVED, model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fihwu", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ctafsrbxrblm", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("zgfbukklelssx", + model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ycsxzu", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); Assertions.assertEquals(ResourceProvisioningState.CREATING, model.value().get(0).provisioningState()); - Assertions.assertEquals("pedbwdpyqy", 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("rdcoxnbkkj")) - .withGroupIds(Arrays.asList("rnnqb", "q", "pizxqltgrdogyp")) - .withPrivateLinkServiceConnectionState( - new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) - .withDescription("fihwu") - .withActionsRequired("ctafsrbxrblm")) - .withProvisioningState(ResourceProvisioningState.CREATING), - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("qagwwrxaomz")) - .withGroupIds(Arrays.asList("lrrcz", "zkhhltnjadhqo")) - .withPrivateLinkServiceConnectionState( - new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) - .withDescription("yueayfbpcmsp") - .withActionsRequired("yrrueqth")) - .withProvisioningState(ResourceProvisioningState.CANCELED))) - .withNextLink("pedbwdpyqy"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("rdcoxnbkkj", model.value().get(0).privateEndpoint().id()); - Assertions.assertEquals("rnnqb", model.value().get(0).groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fihwu", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ctafsrbxrblm", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.CREATING, model.value().get(0).provisioningState()); - Assertions.assertEquals("pedbwdpyqy", model.nextLink()); + Assertions.assertEquals("iiiovgqcgxuugq", 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 index b33be77b03cbd..174235678cda5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,31 +17,34 @@ 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\"}") + "{\"privateEndpoint\":{\"id\":\"h\"},\"groupIds\":[\"ifiyipjxsqwpgrj\",\"znorcj\",\"vsnb\",\"xqabnmocpcysh\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"bl\",\"actionsRequired\":\"gpbtoqcjmklj\"},\"provisioningState\":\"Updating\"}") .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()); + Assertions.assertEquals("h", model.privateEndpoint().id()); + Assertions.assertEquals("ifiyipjxsqwpgrj", model.groupIds().get(0)); + Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bl", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("gpbtoqcjmklj", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals(ResourceProvisioningState.UPDATING, 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); + PrivateEndpointConnectionProperties model + = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint().withId("h")) + .withGroupIds(Arrays.asList("ifiyipjxsqwpgrj", "znorcj", "vsnb", "xqabnmocpcysh")) + .withPrivateLinkServiceConnectionState( + new ConnectionState().withStatus(PersistedConnectionStatus.DISCONNECTED) + .withDescription("bl") + .withActionsRequired("gpbtoqcjmklj")) + .withProvisioningState(ResourceProvisioningState.UPDATING); 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()); + Assertions.assertEquals("h", model.privateEndpoint().id()); + Assertions.assertEquals("ifiyipjxsqwpgrj", model.groupIds().get(0)); + Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bl", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("gpbtoqcjmklj", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals(ResourceProvisioningState.UPDATING, 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 index 7bf8ca0c68a9e..66d811cb15f27 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -24,7 +24,7 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"itwhlbecgihz\"},\"groupIds\":[\"mnrrabo\",\"rwwxywpj\",\"spboxhifp\",\"skpeswyhhmifjua\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"c\",\"actionsRequired\":\"peglyuqvcmlaexb\"},\"provisioningState\":\"Failed\"},\"id\":\"ufpnezsjzaymld\",\"name\":\"orhyogzmsimehtc\",\"type\":\"uwdhtq\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"jdjxhzghgo\"},\"groupIds\":[\"nrceqavfdbdfmmx\",\"dnajuopjyyqmkwlh\",\"cwlo\",\"dejkluxxrwzobuz\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"mtdtkwppthuzd\",\"actionsRequired\":\"mimrljdpoqfxyemh\"},\"provisioningState\":\"Succeeded\"},\"id\":\"aew\",\"name\":\"tecloamfmxtll\",\"type\":\"l\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,16 +34,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("igavk", PrivateEndpointConnectionsParentType.DOMAINS, "yxzerejr", "pzjbyetjxryo", + .getWithResponse("wepwoggg", PrivateEndpointConnectionsParentType.TOPICS, "wnxhtf", "cqbsudzpgchzpg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("itwhlbecgihz", response.privateEndpoint().id()); - Assertions.assertEquals("mnrrabo", response.groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.REJECTED, + Assertions.assertEquals("jdjxhzghgo", response.privateEndpoint().id()); + Assertions.assertEquals("nrceqavfdbdfmmx", response.groupIds().get(0)); + Assertions.assertEquals(PersistedConnectionStatus.PENDING, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("c", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("peglyuqvcmlaexb", response.privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.FAILED, response.provisioningState()); + Assertions.assertEquals("mtdtkwppthuzd", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("mimrljdpoqfxyemh", 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/PrivateEndpointConnectionsListByResourceMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceMockTests.java index 787718256ad13..c805a6a253826 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -25,7 +25,7 @@ public final class PrivateEndpointConnectionsListByResourceMockTests { @Test public void testListByResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"gkord\"},\"groupIds\":[\"jpecwzvcmb\",\"wdlu\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ldidwmtffb\",\"actionsRequired\":\"zldzchubagwnl\"},\"provisioningState\":\"Deleting\"},\"id\":\"igvlghfrbzakpjtc\",\"name\":\"raqp\",\"type\":\"jpsucmxi\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"qstjc\"},\"groupIds\":[\"wmlgicvnpv\",\"dhgjnaqyqi\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"vcdsvm\",\"actionsRequired\":\"itekdtfobvfiyb\"},\"provisioningState\":\"Creating\"},\"id\":\"hgybfzdqekivycpz\",\"name\":\"vdizulrqtbh\",\"type\":\"re\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,17 +35,16 @@ public void testListByResource() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.privateEndpointConnections() - .listByResource("lhwyykgvrccpumd", PrivateEndpointConnectionsParentType.DOMAINS, "gajkrdyddtpfcud", - "afnbfbqve", 1548823667, com.azure.core.util.Context.NONE); + .listByResource("lei", PrivateEndpointConnectionsParentType.DOMAINS, "cbgvsbt", "ertoxadhxuvj", 1018814982, + com.azure.core.util.Context.NONE); - Assertions.assertEquals("gkord", response.iterator().next().privateEndpoint().id()); - Assertions.assertEquals("jpecwzvcmb", response.iterator().next().groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.APPROVED, + Assertions.assertEquals("qstjc", response.iterator().next().privateEndpoint().id()); + Assertions.assertEquals("wmlgicvnpv", response.iterator().next().groupIds().get(0)); + Assertions.assertEquals(PersistedConnectionStatus.PENDING, response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ldidwmtffb", - response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("zldzchubagwnl", + Assertions.assertEquals("vcdsvm", response.iterator().next().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("itekdtfobvfiyb", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals(ResourceProvisioningState.DELETING, response.iterator().next().provisioningState()); + Assertions.assertEquals(ResourceProvisioningState.CREATING, 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 index 36f244ced9b73..f36ae52c7b70b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -28,7 +28,7 @@ public final class PrivateEndpointConnectionsUpdateMockTests { @Test public void testUpdate() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"rzndasdnidmjqmvy\"},\"groupIds\":[\"iqlarhqtwvcaze\",\"d\",\"dzffzjwztsmpchg\",\"ryelgfyatigfg\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"knczgorywnvojtvm\",\"actionsRequired\":\"vdlhqvbkar\"},\"provisioningState\":\"Succeeded\"},\"id\":\"hssrlvkpkp\",\"name\":\"ocm\",\"type\":\"ccebxxopyicyvspe\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"b\"},\"groupIds\":[\"kg\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"w\",\"actionsRequired\":\"iqqcq\"},\"provisioningState\":\"Succeeded\"},\"id\":\"smalns\",\"name\":\"woykdnonaaxwm\",\"type\":\"zrujlqcwnyn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,23 +38,22 @@ public void testUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .update("hyhnimxtns", PrivateEndpointConnectionsParentType.TOPICS, "isnomwnwnghoj", "vkeyymicj", - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("sfpcrtnuguefxxij")) - .withGroupIds(Arrays.asList("dveywetkrhlol", "cnw", "pfgsvbbvaqdljnp")) + .update("ymqcnrrfijhgga", PrivateEndpointConnectionsParentType.DOMAINS, "bgamklilirwd", "ffhsdpzouhk", + new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("qwqnjxrdfddt")) + .withGroupIds(Arrays.asList("ygta", "czcxdfw", "a", "yf")) .withPrivateLinkServiceConnectionState( new ConnectionState().withStatus(PersistedConnectionStatus.REJECTED) - .withDescription("rdetawevxehuekdx") - .withActionsRequired("zvdov")) - .withProvisioningState(ResourceProvisioningState.SUCCEEDED), + .withDescription("jphrasp") + .withActionsRequired("leimixlmdbgicehf")) + .withProvisioningState(ResourceProvisioningState.DELETING), com.azure.core.util.Context.NONE); - Assertions.assertEquals("rzndasdnidmjqmvy", response.privateEndpoint().id()); - Assertions.assertEquals("iqlarhqtwvcaze", response.groupIds().get(0)); - Assertions.assertEquals(PersistedConnectionStatus.DISCONNECTED, + Assertions.assertEquals("b", response.privateEndpoint().id()); + Assertions.assertEquals("kg", response.groupIds().get(0)); + Assertions.assertEquals(PersistedConnectionStatus.PENDING, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("knczgorywnvojtvm", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("vdlhqvbkar", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("w", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("iqqcq", 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 index eda5f69f89265..00588ca03eaee 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,14 +11,14 @@ 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()); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"idtqajzyu\"}").toObject(PrivateEndpoint.class); + Assertions.assertEquals("idtqajzyu", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("vlvqhjkbegi"); + PrivateEndpoint model = new PrivateEndpoint().withId("idtqajzyu"); model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("vlvqhjkbegi", model.id()); + Assertions.assertEquals("idtqajzyu", 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 index dcd9accbe39f9..4be4b8722d9a8 100644 --- 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 @@ -1,45 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"ubmdnafcbqwre\",\"displayName\":\"ela\",\"requiredMembers\":[\"igeleohd\",\"vqvwzkjopwbe\",\"nrlkwzdqy\",\"x\"],\"requiredZoneNames\":[\"kxcpt\",\"oqfyiaseqch\",\"rttzrazisgykiu\",\"mvanbwzo\"]},\"id\":\"nrxxbsojklin\",\"name\":\"dptysprqs\",\"type\":\"zxojpslsv\"}") + "{\"properties\":{\"groupId\":\"otiowlxteqd\",\"displayName\":\"jgwdtgukranbl\",\"requiredMembers\":[\"qlkccuzgygqwaho\",\"ulwgniiprglvawuw\",\"d\",\"fypiv\"],\"requiredZoneNames\":[\"bjpmcubk\",\"ifoxxkubvphav\",\"mhbrbqgvg\"]},\"id\":\"pbbttefjoknss\",\"name\":\"zqedikdfrdbi\",\"type\":\"rjgeih\"}") .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("nrxxbsojklin", model.id()); - Assertions.assertEquals("dptysprqs", model.name()); - Assertions.assertEquals("zxojpslsv", model.type()); - Assertions.assertEquals("ubmdnafcbqwre", model.groupId()); - Assertions.assertEquals("ela", model.displayName()); - Assertions.assertEquals("igeleohd", model.requiredMembers().get(0)); - Assertions.assertEquals("kxcpt", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = new PrivateLinkResourceInner().withId("nrxxbsojklin") - .withName("dptysprqs") - .withType("zxojpslsv") - .withGroupId("ubmdnafcbqwre") - .withDisplayName("ela") - .withRequiredMembers(Arrays.asList("igeleohd", "vqvwzkjopwbe", "nrlkwzdqy", "x")) - .withRequiredZoneNames(Arrays.asList("kxcpt", "oqfyiaseqch", "rttzrazisgykiu", "mvanbwzo")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("nrxxbsojklin", model.id()); - Assertions.assertEquals("dptysprqs", model.name()); - Assertions.assertEquals("zxojpslsv", model.type()); - Assertions.assertEquals("ubmdnafcbqwre", model.groupId()); - Assertions.assertEquals("ela", model.displayName()); - Assertions.assertEquals("igeleohd", model.requiredMembers().get(0)); - Assertions.assertEquals("kxcpt", model.requiredZoneNames().get(0)); + Assertions.assertEquals("pbbttefjoknss", model.id()); + Assertions.assertEquals("zqedikdfrdbi", model.name()); + Assertions.assertEquals("rjgeih", model.type()); + Assertions.assertEquals("otiowlxteqd", model.groupId()); + Assertions.assertEquals("jgwdtgukranbl", model.displayName()); + Assertions.assertEquals("qlkccuzgygqwaho", model.requiredMembers().get(0)); + Assertions.assertEquals("bjpmcubk", 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 index 9877f8bfe4fa2..17b852b81d816 100644 --- 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 @@ -1,36 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"pli\",\"displayName\":\"iqwoyxqvapcoh\",\"requiredMembers\":[\"cqpqojxcxzrzdc\",\"dzbenri\",\"cawetzqddt\",\"wflj\"],\"requiredZoneNames\":[\"amtuatmzwcjjnc\",\"tjzmi\",\"vgbgatzuuvbxng\"]}") + "{\"groupId\":\"lg\",\"displayName\":\"fiwzcxmjpbyep\",\"requiredMembers\":[\"t\"],\"requiredZoneNames\":[\"vrcmyfqipgxhnpo\"]}") .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("pli", model.groupId()); - Assertions.assertEquals("iqwoyxqvapcoh", model.displayName()); - Assertions.assertEquals("cqpqojxcxzrzdc", model.requiredMembers().get(0)); - Assertions.assertEquals("amtuatmzwcjjnc", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = new PrivateLinkResourceProperties().withGroupId("pli") - .withDisplayName("iqwoyxqvapcoh") - .withRequiredMembers(Arrays.asList("cqpqojxcxzrzdc", "dzbenri", "cawetzqddt", "wflj")) - .withRequiredZoneNames(Arrays.asList("amtuatmzwcjjnc", "tjzmi", "vgbgatzuuvbxng")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("pli", model.groupId()); - Assertions.assertEquals("iqwoyxqvapcoh", model.displayName()); - Assertions.assertEquals("cqpqojxcxzrzdc", model.requiredMembers().get(0)); - Assertions.assertEquals("amtuatmzwcjjnc", model.requiredZoneNames().get(0)); + Assertions.assertEquals("lg", model.groupId()); + Assertions.assertEquals("fiwzcxmjpbyep", model.displayName()); + Assertions.assertEquals("t", model.requiredMembers().get(0)); + Assertions.assertEquals("vrcmyfqipgxhnpo", 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 index 2d22a2861e633..425c9a58561fc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"xhirc\",\"displayName\":\"cvsvk\",\"requiredMembers\":[\"jolpyoklkvuz\",\"advhmli\",\"oi\"],\"requiredZoneNames\":[\"xxbhtpsyioq\",\"mqwtqszzgy\"]},\"id\":\"ika\",\"name\":\"nvmw\",\"type\":\"gjqcrbkompnbnfg\"}"; + = "{\"properties\":{\"groupId\":\"ccgndjgdprig\",\"displayName\":\"qyeqfcbuulpyuflq\",\"requiredMembers\":[\"htujcyohigimwdc\",\"klkqnqvkixnmb\",\"mecuyrzwim\"],\"requiredZoneNames\":[\"yspzvrie\",\"vfph\",\"dzxplgtp\"]},\"id\":\"vatlzmgsc\",\"name\":\"zr\",\"type\":\"kkzovlzdm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("cw", "xyn", "jgsatky", "scbgngc", com.azure.core.util.Context.NONE) + .getWithResponse("pzl", "ryfmxmdu", "zf", "giln", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ika", response.id()); - Assertions.assertEquals("nvmw", response.name()); - Assertions.assertEquals("gjqcrbkompnbnfg", response.type()); - Assertions.assertEquals("xhirc", response.groupId()); - Assertions.assertEquals("cvsvk", response.displayName()); - Assertions.assertEquals("jolpyoklkvuz", response.requiredMembers().get(0)); - Assertions.assertEquals("xxbhtpsyioq", response.requiredZoneNames().get(0)); + Assertions.assertEquals("vatlzmgsc", response.id()); + Assertions.assertEquals("zr", response.name()); + Assertions.assertEquals("kkzovlzdm", response.type()); + Assertions.assertEquals("ccgndjgdprig", response.groupId()); + Assertions.assertEquals("qyeqfcbuulpyuflq", response.displayName()); + Assertions.assertEquals("htujcyohigimwdc", response.requiredMembers().get(0)); + Assertions.assertEquals("yspzvrie", 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 index 64c8b1d7aea4e..a665223e99307 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class PrivateLinkResourcesListByResourceMockTests { @Test public void testListByResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"pzwhjunfdgbggc\",\"displayName\":\"zhblivw\",\"requiredMembers\":[\"udymymbhdosmbng\"],\"requiredZoneNames\":[\"gxzduvxdmxe\"]},\"id\":\"tmdm\",\"name\":\"senxoirxyd\",\"type\":\"iploisjkzsoxznnt\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"nyrvaprtgelg\",\"displayName\":\"wikfyaqandmym\",\"requiredMembers\":[\"qjumovs\",\"bpbvzopaxmf\"],\"requiredZoneNames\":[\"mcwoxfaxd\",\"nqifb\",\"atroiaue\"]},\"id\":\"gmocpcjycboelrgt\",\"name\":\"fldsiuorin\",\"type\":\"cedpksriwmmtmqrx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,14 @@ public void testListByResource() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.privateLinkResources() - .listByResource("weoj", "epgcmahiwf", "yawkch", "apitskshfyftt", 2061878224, - com.azure.core.util.Context.NONE); + .listByResource("fmfws", "afofu", "orimmo", "zwdehkkmvhz", 2002935438, com.azure.core.util.Context.NONE); - Assertions.assertEquals("tmdm", response.iterator().next().id()); - Assertions.assertEquals("senxoirxyd", response.iterator().next().name()); - Assertions.assertEquals("iploisjkzsoxznnt", response.iterator().next().type()); - Assertions.assertEquals("pzwhjunfdgbggc", response.iterator().next().groupId()); - Assertions.assertEquals("zhblivw", response.iterator().next().displayName()); - Assertions.assertEquals("udymymbhdosmbng", response.iterator().next().requiredMembers().get(0)); - Assertions.assertEquals("gxzduvxdmxe", response.iterator().next().requiredZoneNames().get(0)); + Assertions.assertEquals("gmocpcjycboelrgt", response.iterator().next().id()); + Assertions.assertEquals("fldsiuorin", response.iterator().next().name()); + Assertions.assertEquals("cedpksriwmmtmqrx", response.iterator().next().type()); + Assertions.assertEquals("nyrvaprtgelg", response.iterator().next().groupId()); + Assertions.assertEquals("wikfyaqandmym", response.iterator().next().displayName()); + Assertions.assertEquals("qjumovs", response.iterator().next().requiredMembers().get(0)); + Assertions.assertEquals("mcwoxfaxd", 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 index c419901135e23..aaa5462919b5f 100644 --- 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 @@ -1,59 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.eventgrid.implementation.models.PrivateLinkResourcesListResult; 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\":\"gahttzlswvaj\",\"displayName\":\"utlxjoqzasunwqrj\",\"requiredMembers\":[\"gqhaohcmbuocn\"],\"requiredZoneNames\":[\"hmbpyryxamebly\",\"yvk\"]},\"id\":\"m\",\"name\":\"cxneh\",\"type\":\"mtodl\"},{\"properties\":{\"groupId\":\"apucygvo\",\"displayName\":\"yunssx\",\"requiredMembers\":[\"ieegjl\"],\"requiredZoneNames\":[\"paseksgb\",\"xantuygdhg\",\"qipir\"]},\"id\":\"wrq\",\"name\":\"ulopmjnlexwhcb\",\"type\":\"ibkeph\"}],\"nextLink\":\"uerct\"}") + "{\"value\":[{\"properties\":{\"groupId\":\"cabvnuil\",\"displayName\":\"yaswlpaugmr\",\"requiredMembers\":[\"lrxw\",\"oauk\",\"fkvcisi\",\"moaedsxj\"],\"requiredZoneNames\":[\"vedwcgyeewx\"]},\"id\":\"qbpsmg\",\"name\":\"guamlj\",\"type\":\"rgmsplzga\"},{\"properties\":{\"groupId\":\"shhvnewgnxky\",\"displayName\":\"q\",\"requiredMembers\":[\"rjkixtw\",\"taoypnyghshxc\",\"lhkgmnsghp\"],\"requiredZoneNames\":[\"phdrw\",\"jkhvyomacluzvxnq\",\"hrpq\",\"df\"]},\"id\":\"kois\",\"name\":\"ssffxuifmc\",\"type\":\"p\"},{\"properties\":{\"groupId\":\"dqzrdzsyloll\",\"displayName\":\"rc\",\"requiredMembers\":[\"dmxzjijpv\",\"aurkihcirlde\"],\"requiredZoneNames\":[\"dcoxnbk\",\"ja\",\"urnnqbnqbpiz\"]},\"id\":\"ltgrdogypxrxv\",\"name\":\"ihwuhvctafsrbxrb\",\"type\":\"li\"}],\"nextLink\":\"xihspnxwq\"}") .toObject(PrivateLinkResourcesListResult.class); - Assertions.assertEquals("m", model.value().get(0).id()); - Assertions.assertEquals("cxneh", model.value().get(0).name()); - Assertions.assertEquals("mtodl", model.value().get(0).type()); - Assertions.assertEquals("gahttzlswvaj", model.value().get(0).groupId()); - Assertions.assertEquals("utlxjoqzasunwqrj", model.value().get(0).displayName()); - Assertions.assertEquals("gqhaohcmbuocn", model.value().get(0).requiredMembers().get(0)); - Assertions.assertEquals("hmbpyryxamebly", model.value().get(0).requiredZoneNames().get(0)); - Assertions.assertEquals("uerct", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourcesListResult model - = new PrivateLinkResourcesListResult() - .withValue(Arrays.asList( - new PrivateLinkResourceInner().withId("m") - .withName("cxneh") - .withType("mtodl") - .withGroupId("gahttzlswvaj") - .withDisplayName("utlxjoqzasunwqrj") - .withRequiredMembers(Arrays.asList("gqhaohcmbuocn")) - .withRequiredZoneNames(Arrays.asList("hmbpyryxamebly", "yvk")), - new PrivateLinkResourceInner().withId("wrq") - .withName("ulopmjnlexwhcb") - .withType("ibkeph") - .withGroupId("apucygvo") - .withDisplayName("yunssx") - .withRequiredMembers(Arrays.asList("ieegjl")) - .withRequiredZoneNames(Arrays.asList("paseksgb", "xantuygdhg", "qipir")))) - .withNextLink("uerct"); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourcesListResult.class); - Assertions.assertEquals("m", model.value().get(0).id()); - Assertions.assertEquals("cxneh", model.value().get(0).name()); - Assertions.assertEquals("mtodl", model.value().get(0).type()); - Assertions.assertEquals("gahttzlswvaj", model.value().get(0).groupId()); - Assertions.assertEquals("utlxjoqzasunwqrj", model.value().get(0).displayName()); - Assertions.assertEquals("gqhaohcmbuocn", model.value().get(0).requiredMembers().get(0)); - Assertions.assertEquals("hmbpyryxamebly", model.value().get(0).requiredZoneNames().get(0)); - Assertions.assertEquals("uerct", model.nextLink()); + Assertions.assertEquals("qbpsmg", model.value().get(0).id()); + Assertions.assertEquals("guamlj", model.value().get(0).name()); + Assertions.assertEquals("rgmsplzga", model.value().get(0).type()); + Assertions.assertEquals("cabvnuil", model.value().get(0).groupId()); + Assertions.assertEquals("yaswlpaugmr", model.value().get(0).displayName()); + Assertions.assertEquals("lrxw", model.value().get(0).requiredMembers().get(0)); + Assertions.assertEquals("vedwcgyeewx", model.value().get(0).requiredZoneNames().get(0)); + Assertions.assertEquals("xihspnxwq", model.nextLink()); } } 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 index 2077f043dae05..4a9891783c937 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,18 +12,9 @@ public final class ResourceAssociationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceAssociation model = BinaryData.fromString("{\"name\":\"gxqbawpcb\",\"accessMode\":\"Enforced\"}") + ResourceAssociation model = BinaryData.fromString("{\"name\":\"gwxhnsduugwbsreu\",\"accessMode\":\"Learning\"}") .toObject(ResourceAssociation.class); - Assertions.assertEquals("gxqbawpcb", model.name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED, model.accessMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceAssociation model = new ResourceAssociation().withName("gxqbawpcb") - .withAccessMode(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED); - model = BinaryData.fromObject(model).toObject(ResourceAssociation.class); - Assertions.assertEquals("gxqbawpcb", model.name()); - Assertions.assertEquals(NetworkSecurityPerimeterAssociationAccessMode.ENFORCED, model.accessMode()); + Assertions.assertEquals("gwxhnsduugwbsreu", 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 index 5d5101530d2fb..05eb90446ce13 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,21 +13,21 @@ 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\"}") + "{\"azureSubscriptionId\":\"n\",\"resourceGroupName\":\"glzpswiydm\",\"changedTimeUtc\":\"2021-07-19T23:45:18Z\"}") .toObject(ResourceMoveChangeHistory.class); - Assertions.assertEquals("modmglougpb", model.azureSubscriptionId()); - Assertions.assertEquals("tmut", model.resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T02:06:56Z"), model.changedTimeUtc()); + Assertions.assertEquals("n", model.azureSubscriptionId()); + Assertions.assertEquals("glzpswiydm", model.resourceGroupName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-19T23:45:18Z"), 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")); + ResourceMoveChangeHistory model = new ResourceMoveChangeHistory().withAzureSubscriptionId("n") + .withResourceGroupName("glzpswiydm") + .withChangedTimeUtc(OffsetDateTime.parse("2021-07-19T23:45:18Z")); 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()); + Assertions.assertEquals("n", model.azureSubscriptionId()); + Assertions.assertEquals("glzpswiydm", model.resourceGroupName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-19T23:45:18Z"), 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 index bb11d86ea022c..3894a8c0d12e4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,14 +12,14 @@ 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()); + ResourceSku model = BinaryData.fromString("{\"name\":\"Premium\"}").toObject(ResourceSku.class); + Assertions.assertEquals(Sku.PREMIUM, model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceSku model = new ResourceSku().withName(Sku.BASIC); + ResourceSku model = new ResourceSku().withName(Sku.PREMIUM); model = BinaryData.fromObject(model).toObject(ResourceSku.class); - Assertions.assertEquals(Sku.BASIC, model.name()); + Assertions.assertEquals(Sku.PREMIUM, 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 index f35436f09ec34..a2701d7c7ff6d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,18 +12,18 @@ public final class RetryPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RetryPolicy model - = BinaryData.fromString("{\"maxDeliveryAttempts\":403427600,\"eventTimeToLiveInMinutes\":2126474322}") + = BinaryData.fromString("{\"maxDeliveryAttempts\":1702160373,\"eventTimeToLiveInMinutes\":1108007772}") .toObject(RetryPolicy.class); - Assertions.assertEquals(403427600, model.maxDeliveryAttempts()); - Assertions.assertEquals(2126474322, model.eventTimeToLiveInMinutes()); + Assertions.assertEquals(1702160373, model.maxDeliveryAttempts()); + Assertions.assertEquals(1108007772, model.eventTimeToLiveInMinutes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RetryPolicy model - = new RetryPolicy().withMaxDeliveryAttempts(403427600).withEventTimeToLiveInMinutes(2126474322); + = new RetryPolicy().withMaxDeliveryAttempts(1702160373).withEventTimeToLiveInMinutes(1108007772); model = BinaryData.fromObject(model).toObject(RetryPolicy.class); - Assertions.assertEquals(403427600, model.maxDeliveryAttempts()); - Assertions.assertEquals(2126474322, model.eventTimeToLiveInMinutes()); + Assertions.assertEquals(1702160373, model.maxDeliveryAttempts()); + Assertions.assertEquals(1108007772, 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 index b8b05594c6aab..29d692d1cbdc6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,18 +13,18 @@ public final class RoutingIdentityInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutingIdentityInfo model - = BinaryData.fromString("{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"ihwqknfdntwjchr\"}") + = BinaryData.fromString("{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"kwlzuvccfwnfn\"}") .toObject(RoutingIdentityInfo.class); - Assertions.assertEquals(RoutingIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("ihwqknfdntwjchr", model.userAssignedIdentity()); + Assertions.assertEquals(RoutingIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals("kwlzuvccfwnfn", model.userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutingIdentityInfo model = new RoutingIdentityInfo().withType(RoutingIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("ihwqknfdntwjchr"); + RoutingIdentityInfo model = new RoutingIdentityInfo().withType(RoutingIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentity("kwlzuvccfwnfn"); model = BinaryData.fromObject(model).toObject(RoutingIdentityInfo.class); - Assertions.assertEquals(RoutingIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("ihwqknfdntwjchr", model.userAssignedIdentity()); + Assertions.assertEquals(RoutingIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals("kwlzuvccfwnfn", 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 index d0d7318e46ab7..04ec12bf4abe9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,21 +14,19 @@ public final class ServiceBusQueueEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceBusQueueEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"isubxbteog\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ij\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"kw\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"fksxqce\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"fpxgnmqvz\"}]}") + "{\"resourceId\":\"lwigdivbkbx\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ajuwas\"}]}") .toObject(ServiceBusQueueEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("isubxbteog", model.resourceId()); - Assertions.assertEquals("ij", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("lwigdivbkbx", model.resourceId()); + Assertions.assertEquals("ajuwas", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceBusQueueEventSubscriptionDestinationProperties model - = new ServiceBusQueueEventSubscriptionDestinationProperties().withResourceId("isubxbteog") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("ij"), - new DeliveryAttributeMapping().withName("kw"), new DeliveryAttributeMapping().withName("fksxqce"), - new DeliveryAttributeMapping().withName("fpxgnmqvz"))); + = new ServiceBusQueueEventSubscriptionDestinationProperties().withResourceId("lwigdivbkbx") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("ajuwas"))); model = BinaryData.fromObject(model).toObject(ServiceBusQueueEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("isubxbteog", model.resourceId()); - Assertions.assertEquals("ij", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("lwigdivbkbx", model.resourceId()); + Assertions.assertEquals("ajuwas", 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 index 9939633a5a541..e0fbd3a43131e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,20 +14,20 @@ public final class ServiceBusQueueEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceBusQueueEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"ServiceBusQueue\",\"properties\":{\"resourceId\":\"yqqaioss\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"aifppuacvfyeowp\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"x\"}]}}") + "{\"endpointType\":\"ServiceBusQueue\",\"properties\":{\"resourceId\":\"drf\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"alzxwhcan\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"moy\"}]}}") .toObject(ServiceBusQueueEventSubscriptionDestination.class); - Assertions.assertEquals("yqqaioss", model.resourceId()); - Assertions.assertEquals("aifppuacvfyeowp", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("drf", model.resourceId()); + Assertions.assertEquals("alzxwhcan", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceBusQueueEventSubscriptionDestination model - = new ServiceBusQueueEventSubscriptionDestination().withResourceId("yqqaioss") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("aifppuacvfyeowp"), - new DeliveryAttributeMapping().withName("x"))); + = new ServiceBusQueueEventSubscriptionDestination().withResourceId("drf") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("alzxwhcan"), + new DeliveryAttributeMapping().withName("moy"))); model = BinaryData.fromObject(model).toObject(ServiceBusQueueEventSubscriptionDestination.class); - Assertions.assertEquals("yqqaioss", model.resourceId()); - Assertions.assertEquals("aifppuacvfyeowp", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("drf", model.resourceId()); + Assertions.assertEquals("alzxwhcan", 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 index 4ea2f9b9e07ff..8594460c75681 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,22 +14,20 @@ public final class ServiceBusTopicEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceBusTopicEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"dhsoymhpv\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ttehdp\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ujstk\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"vdshxcdedsuen\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"nxcgjtfrnquk\"}]}") + "{\"resourceId\":\"kgfmocwahpq\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"eaahhvjhhn\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"zybbj\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dj\"}]}") .toObject(ServiceBusTopicEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("dhsoymhpv", model.resourceId()); - Assertions.assertEquals("ttehdp", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("kgfmocwahpq", model.resourceId()); + Assertions.assertEquals("eaahhvjhhn", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceBusTopicEventSubscriptionDestinationProperties model - = new ServiceBusTopicEventSubscriptionDestinationProperties().withResourceId("dhsoymhpv") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("ttehdp"), - new DeliveryAttributeMapping().withName("ujstk"), - new DeliveryAttributeMapping().withName("vdshxcdedsuen"), - new DeliveryAttributeMapping().withName("nxcgjtfrnquk"))); + = new ServiceBusTopicEventSubscriptionDestinationProperties().withResourceId("kgfmocwahpq") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("eaahhvjhhn"), + new DeliveryAttributeMapping().withName("zybbj"), new DeliveryAttributeMapping().withName("dj"))); model = BinaryData.fromObject(model).toObject(ServiceBusTopicEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("dhsoymhpv", model.resourceId()); - Assertions.assertEquals("ttehdp", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("kgfmocwahpq", model.resourceId()); + Assertions.assertEquals("eaahhvjhhn", 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 index 52de0c85a5487..067d243bbfea9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,22 +14,20 @@ public final class ServiceBusTopicEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceBusTopicEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"ServiceBusTopic\",\"properties\":{\"resourceId\":\"nslnlrxsmyltrwnt\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"g\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dxwnazkurrd\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"yzjwhsetwwjwzzq\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"uzu\"}]}}") + "{\"endpointType\":\"ServiceBusTopic\",\"properties\":{\"resourceId\":\"aeyyg\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"jsqzhzbezk\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"msidxasicddyvv\"}]}}") .toObject(ServiceBusTopicEventSubscriptionDestination.class); - Assertions.assertEquals("nslnlrxsmyltrwnt", model.resourceId()); - Assertions.assertEquals("g", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("aeyyg", model.resourceId()); + Assertions.assertEquals("jsqzhzbezk", model.deliveryAttributeMappings().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceBusTopicEventSubscriptionDestination model - = new ServiceBusTopicEventSubscriptionDestination().withResourceId("nslnlrxsmyltrwnt") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("g"), - new DeliveryAttributeMapping().withName("dxwnazkurrd"), - new DeliveryAttributeMapping().withName("yzjwhsetwwjwzzq"), - new DeliveryAttributeMapping().withName("uzu"))); + = new ServiceBusTopicEventSubscriptionDestination().withResourceId("aeyyg") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("jsqzhzbezk"), + new DeliveryAttributeMapping().withName("msidxasicddyvv"))); model = BinaryData.fromObject(model).toObject(ServiceBusTopicEventSubscriptionDestination.class); - Assertions.assertEquals("nslnlrxsmyltrwnt", model.resourceId()); - Assertions.assertEquals("g", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("aeyyg", model.resourceId()); + Assertions.assertEquals("jsqzhzbezk", 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 index a9928bee872fb..e9061ba011d50 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,18 +12,19 @@ public final class StorageBlobDeadLetterDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageBlobDeadLetterDestinationProperties model - = BinaryData.fromString("{\"resourceId\":\"chl\",\"blobContainerName\":\"pwctofl\"}") + = BinaryData.fromString("{\"resourceId\":\"hiosrsjuiv\",\"blobContainerName\":\"disyirnxz\"}") .toObject(StorageBlobDeadLetterDestinationProperties.class); - Assertions.assertEquals("chl", model.resourceId()); - Assertions.assertEquals("pwctofl", model.blobContainerName()); + Assertions.assertEquals("hiosrsjuiv", model.resourceId()); + Assertions.assertEquals("disyirnxz", model.blobContainerName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageBlobDeadLetterDestinationProperties model - = new StorageBlobDeadLetterDestinationProperties().withResourceId("chl").withBlobContainerName("pwctofl"); + = new StorageBlobDeadLetterDestinationProperties().withResourceId("hiosrsjuiv") + .withBlobContainerName("disyirnxz"); model = BinaryData.fromObject(model).toObject(StorageBlobDeadLetterDestinationProperties.class); - Assertions.assertEquals("chl", model.resourceId()); - Assertions.assertEquals("pwctofl", model.blobContainerName()); + Assertions.assertEquals("hiosrsjuiv", model.resourceId()); + Assertions.assertEquals("disyirnxz", 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 index 67f1a351d93d8..bc2064ecc7f8c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,18 +12,18 @@ public final class StorageBlobDeadLetterDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageBlobDeadLetterDestination model = BinaryData.fromString( - "{\"endpointType\":\"StorageBlob\",\"properties\":{\"resourceId\":\"acdhztxkbr\",\"blobContainerName\":\"drwjiy\"}}") + "{\"endpointType\":\"StorageBlob\",\"properties\":{\"resourceId\":\"xpdlcgqlsis\",\"blobContainerName\":\"qfrddgam\"}}") .toObject(StorageBlobDeadLetterDestination.class); - Assertions.assertEquals("acdhztxkbr", model.resourceId()); - Assertions.assertEquals("drwjiy", model.blobContainerName()); + Assertions.assertEquals("xpdlcgqlsis", model.resourceId()); + Assertions.assertEquals("qfrddgam", model.blobContainerName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageBlobDeadLetterDestination model - = new StorageBlobDeadLetterDestination().withResourceId("acdhztxkbr").withBlobContainerName("drwjiy"); + = new StorageBlobDeadLetterDestination().withResourceId("xpdlcgqlsis").withBlobContainerName("qfrddgam"); model = BinaryData.fromObject(model).toObject(StorageBlobDeadLetterDestination.class); - Assertions.assertEquals("acdhztxkbr", model.resourceId()); - Assertions.assertEquals("drwjiy", model.blobContainerName()); + Assertions.assertEquals("xpdlcgqlsis", model.resourceId()); + Assertions.assertEquals("qfrddgam", 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 index 1fd4649cbbdd1..4f7bc87359417 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,22 +12,22 @@ public final class StorageQueueEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageQueueEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"resourceId\":\"ullojk\",\"queueName\":\"yhgww\",\"queueMessageTimeToLiveInSeconds\":9101657000893432005}") + "{\"resourceId\":\"zdzgtilaxhnfhqly\",\"queueName\":\"jouw\",\"queueMessageTimeToLiveInSeconds\":4542267366291719376}") .toObject(StorageQueueEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("ullojk", model.resourceId()); - Assertions.assertEquals("yhgww", model.queueName()); - Assertions.assertEquals(9101657000893432005L, model.queueMessageTimeToLiveInSeconds()); + Assertions.assertEquals("zdzgtilaxhnfhqly", model.resourceId()); + Assertions.assertEquals("jouw", model.queueName()); + Assertions.assertEquals(4542267366291719376L, model.queueMessageTimeToLiveInSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageQueueEventSubscriptionDestinationProperties model - = new StorageQueueEventSubscriptionDestinationProperties().withResourceId("ullojk") - .withQueueName("yhgww") - .withQueueMessageTimeToLiveInSeconds(9101657000893432005L); + = new StorageQueueEventSubscriptionDestinationProperties().withResourceId("zdzgtilaxhnfhqly") + .withQueueName("jouw") + .withQueueMessageTimeToLiveInSeconds(4542267366291719376L); model = BinaryData.fromObject(model).toObject(StorageQueueEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("ullojk", model.resourceId()); - Assertions.assertEquals("yhgww", model.queueName()); - Assertions.assertEquals(9101657000893432005L, model.queueMessageTimeToLiveInSeconds()); + Assertions.assertEquals("zdzgtilaxhnfhqly", model.resourceId()); + Assertions.assertEquals("jouw", model.queueName()); + Assertions.assertEquals(4542267366291719376L, 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 index 984f6705c89dc..4843842b87547 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,22 +12,22 @@ public final class StorageQueueEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageQueueEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"StorageQueue\",\"properties\":{\"resourceId\":\"dljzgdyrc\",\"queueName\":\"qbsgzl\",\"queueMessageTimeToLiveInSeconds\":3239081526708065782}}") + "{\"endpointType\":\"StorageQueue\",\"properties\":{\"resourceId\":\"y\",\"queueName\":\"jnygq\",\"queueMessageTimeToLiveInSeconds\":5868166807959460587}}") .toObject(StorageQueueEventSubscriptionDestination.class); - Assertions.assertEquals("dljzgdyrc", model.resourceId()); - Assertions.assertEquals("qbsgzl", model.queueName()); - Assertions.assertEquals(3239081526708065782L, model.queueMessageTimeToLiveInSeconds()); + Assertions.assertEquals("y", model.resourceId()); + Assertions.assertEquals("jnygq", model.queueName()); + Assertions.assertEquals(5868166807959460587L, model.queueMessageTimeToLiveInSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageQueueEventSubscriptionDestination model - = new StorageQueueEventSubscriptionDestination().withResourceId("dljzgdyrc") - .withQueueName("qbsgzl") - .withQueueMessageTimeToLiveInSeconds(3239081526708065782L); + = new StorageQueueEventSubscriptionDestination().withResourceId("y") + .withQueueName("jnygq") + .withQueueMessageTimeToLiveInSeconds(5868166807959460587L); model = BinaryData.fromObject(model).toObject(StorageQueueEventSubscriptionDestination.class); - Assertions.assertEquals("dljzgdyrc", model.resourceId()); - Assertions.assertEquals("qbsgzl", model.queueName()); - Assertions.assertEquals(3239081526708065782L, model.queueMessageTimeToLiveInSeconds()); + Assertions.assertEquals("y", model.resourceId()); + Assertions.assertEquals("jnygq", model.queueName()); + Assertions.assertEquals(5868166807959460587L, 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 index 6b4af7f8ff3f1..e35b4b3e6849a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,14 +12,7 @@ public final class SubscriptionFullUrlInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubscriptionFullUrlInner model - = BinaryData.fromString("{\"endpointUrl\":\"rdpqgfhy\"}").toObject(SubscriptionFullUrlInner.class); - Assertions.assertEquals("rdpqgfhy", model.endpointUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionFullUrlInner model = new SubscriptionFullUrlInner().withEndpointUrl("rdpqgfhy"); - model = BinaryData.fromObject(model).toObject(SubscriptionFullUrlInner.class); - Assertions.assertEquals("rdpqgfhy", model.endpointUrl()); + = BinaryData.fromString("{\"endpointUrl\":\"nwph\"}").toObject(SubscriptionFullUrlInner.class); + Assertions.assertEquals("nwph", 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 index c56030562dd69..66829c4434bd3 100644 --- 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 @@ -1,125 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.SubscriptionsListResult; 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 java.util.HashMap; -import java.util.Map; 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\":\"Push\",\"queue\":{\"receiveLockDurationInSeconds\":2078888236,\"maxDeliveryCount\":542586349,\"deadLetterDestinationWithResourceIdentity\":{},\"eventTimeToLive\":\"PT19H11M53S\"},\"push\":{\"maxDeliveryCount\":724568755,\"eventTimeToLive\":\"mrv\",\"deadLetterDestinationWithResourceIdentity\":{},\"deliveryWithResourceIdentity\":{},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}}},\"eventDeliverySchema\":\"CloudEventSchemaV1_0\",\"filtersConfiguration\":{\"includedEventTypes\":[\"sfraoyzko\",\"wtl\",\"nguxawqaldsy\"],\"filters\":[{\"operatorType\":\"Filter\"},{\"operatorType\":\"Filter\"},{\"operatorType\":\"Filter\"},{\"operatorType\":\"Filter\"}]},\"expirationTimeUtc\":\"2021-08-11T15:07:06Z\",\"tags\":{\"kby\":\"qfobwyz\"}},\"id\":\"t\",\"name\":\"pfhpagmhrskdsnfd\",\"type\":\"doakgtdlmkkzevdl\"},{\"properties\":{\"provisioningState\":\"Creating\",\"deliveryConfiguration\":{\"deliveryMode\":\"Queue\",\"queue\":{\"receiveLockDurationInSeconds\":82936219,\"maxDeliveryCount\":2145512273,\"deadLetterDestinationWithResourceIdentity\":{},\"eventTimeToLive\":\"PT15H11M8S\"},\"push\":{\"maxDeliveryCount\":1540296035,\"eventTimeToLive\":\"dcngqqmoakufgmj\",\"deadLetterDestinationWithResourceIdentity\":{},\"deliveryWithResourceIdentity\":{},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}}},\"eventDeliverySchema\":\"CloudEventSchemaV1_0\",\"filtersConfiguration\":{\"includedEventTypes\":[\"aenuuz\"],\"filters\":[{\"operatorType\":\"Filter\"},{\"operatorType\":\"Filter\"}]},\"expirationTimeUtc\":\"2021-08-27T02:00:49Z\",\"tags\":{\"hziuiefozbhdms\":\"rfdwoyu\",\"zqhof\":\"l\"}},\"id\":\"maequiahxicslfa\",\"name\":\"qzpiyyl\",\"type\":\"alnswhccsphk\"}],\"nextLink\":\"vwitqscyw\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"AwaitingManualAction\",\"deliveryConfiguration\":{\"deliveryMode\":\"Queue\",\"queue\":{\"receiveLockDurationInSeconds\":861314429,\"maxDeliveryCount\":1470907347,\"deadLetterDestinationWithResourceIdentity\":{},\"eventTimeToLive\":\"PT226H45M54S\"},\"push\":{\"maxDeliveryCount\":1221938982,\"eventTimeToLive\":\"ykycndzfqi\",\"deadLetterDestinationWithResourceIdentity\":{},\"deliveryWithResourceIdentity\":{},\"destination\":{\"endpointType\":\"EventSubscriptionDestination\"}}},\"eventDeliverySchema\":\"CloudEventSchemaV1_0\",\"filtersConfiguration\":{\"includedEventTypes\":[\"mnwagltbxoe\",\"onql\"],\"filters\":[{\"operatorType\":\"Filter\"},{\"operatorType\":\"Filter\"},{\"operatorType\":\"Filter\"},{\"operatorType\":\"Filter\"}]},\"expirationTimeUtc\":\"2021-03-03T08:56:10Z\",\"tags\":{\"vezcrcssbzhdd\":\"vqdbpbhfck\",\"nqfblhkalehpava\":\"b\",\"minict\":\"ugiqjtiogqg\",\"pnbonhpcz\":\"eajohiyg\"}},\"id\":\"mktp\",\"name\":\"wxqcsehchkhufmpq\",\"type\":\"mqyjgy\"}],\"nextLink\":\"ulodsaeuzanhsfnh\"}") .toObject(SubscriptionsListResult.class); - Assertions.assertEquals(DeliveryMode.PUSH, model.value().get(0).deliveryConfiguration().deliveryMode()); - Assertions.assertEquals(2078888236, + Assertions.assertEquals(DeliveryMode.QUEUE, model.value().get(0).deliveryConfiguration().deliveryMode()); + Assertions.assertEquals(861314429, model.value().get(0).deliveryConfiguration().queue().receiveLockDurationInSeconds()); - Assertions.assertEquals(542586349, model.value().get(0).deliveryConfiguration().queue().maxDeliveryCount()); - Assertions.assertEquals(Duration.parse("PT19H11M53S"), + Assertions.assertEquals(1470907347, model.value().get(0).deliveryConfiguration().queue().maxDeliveryCount()); + Assertions.assertEquals(Duration.parse("PT226H45M54S"), model.value().get(0).deliveryConfiguration().queue().eventTimeToLive()); - Assertions.assertEquals(724568755, model.value().get(0).deliveryConfiguration().push().maxDeliveryCount()); - Assertions.assertEquals("mrv", model.value().get(0).deliveryConfiguration().push().eventTimeToLive()); + Assertions.assertEquals(1221938982, model.value().get(0).deliveryConfiguration().push().maxDeliveryCount()); + Assertions.assertEquals("ykycndzfqi", model.value().get(0).deliveryConfiguration().push().eventTimeToLive()); Assertions.assertEquals(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0, model.value().get(0).eventDeliverySchema()); - Assertions.assertEquals("sfraoyzko", model.value().get(0).filtersConfiguration().includedEventTypes().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T15:07:06Z"), model.value().get(0).expirationTimeUtc()); - Assertions.assertEquals("qfobwyz", model.value().get(0).tags().get("kby")); - Assertions.assertEquals("vwitqscyw", 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.PUSH) - .withQueue(new QueueInfo().withReceiveLockDurationInSeconds(2078888236) - .withMaxDeliveryCount(542586349) - .withDeadLetterDestinationWithResourceIdentity( - new DeadLetterWithResourceIdentity()) - .withEventTimeToLive(Duration.parse("PT19H11M53S"))) - .withPush(new PushInfo().withMaxDeliveryCount(724568755) - .withEventTimeToLive("mrv") - .withDeadLetterDestinationWithResourceIdentity( - new DeadLetterWithResourceIdentity()) - .withDeliveryWithResourceIdentity(new DeliveryWithResourceIdentity()) - .withDestination(new EventSubscriptionDestination()))) - .withEventDeliverySchema(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0) - .withFiltersConfiguration( - new FiltersConfiguration() - .withIncludedEventTypes(Arrays.asList("sfraoyzko", "wtl", "nguxawqaldsy")) - .withFilters( - Arrays.asList(new Filter(), new Filter(), new Filter(), new Filter()))) - .withExpirationTimeUtc(OffsetDateTime.parse("2021-08-11T15:07:06Z")) - .withTags(mapOf("kby", "qfobwyz")), - new SubscriptionInner() - .withDeliveryConfiguration( - new DeliveryConfiguration().withDeliveryMode(DeliveryMode.QUEUE) - .withQueue(new QueueInfo().withReceiveLockDurationInSeconds(82936219) - .withMaxDeliveryCount(2145512273) - .withDeadLetterDestinationWithResourceIdentity( - new DeadLetterWithResourceIdentity()) - .withEventTimeToLive(Duration.parse("PT15H11M8S"))) - .withPush(new PushInfo().withMaxDeliveryCount(1540296035) - .withEventTimeToLive("dcngqqmoakufgmj") - .withDeadLetterDestinationWithResourceIdentity( - new DeadLetterWithResourceIdentity()) - .withDeliveryWithResourceIdentity(new DeliveryWithResourceIdentity()) - .withDestination(new EventSubscriptionDestination()))) - .withEventDeliverySchema(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0) - .withFiltersConfiguration( - new FiltersConfiguration().withIncludedEventTypes(Arrays.asList("aenuuz")) - .withFilters(Arrays.asList(new Filter(), new Filter()))) - .withExpirationTimeUtc(OffsetDateTime.parse("2021-08-27T02:00:49Z")) - .withTags(mapOf("hziuiefozbhdms", "rfdwoyu", "zqhof", "l")))) - .withNextLink("vwitqscyw"); - model = BinaryData.fromObject(model).toObject(SubscriptionsListResult.class); - Assertions.assertEquals(DeliveryMode.PUSH, model.value().get(0).deliveryConfiguration().deliveryMode()); - Assertions.assertEquals(2078888236, - model.value().get(0).deliveryConfiguration().queue().receiveLockDurationInSeconds()); - Assertions.assertEquals(542586349, model.value().get(0).deliveryConfiguration().queue().maxDeliveryCount()); - Assertions.assertEquals(Duration.parse("PT19H11M53S"), - model.value().get(0).deliveryConfiguration().queue().eventTimeToLive()); - Assertions.assertEquals(724568755, model.value().get(0).deliveryConfiguration().push().maxDeliveryCount()); - Assertions.assertEquals("mrv", model.value().get(0).deliveryConfiguration().push().eventTimeToLive()); - Assertions.assertEquals(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0, model.value().get(0).eventDeliverySchema()); - Assertions.assertEquals("sfraoyzko", model.value().get(0).filtersConfiguration().includedEventTypes().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T15:07:06Z"), model.value().get(0).expirationTimeUtc()); - Assertions.assertEquals("qfobwyz", model.value().get(0).tags().get("kby")); - Assertions.assertEquals("vwitqscyw", 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; + Assertions.assertEquals("mnwagltbxoe", model.value().get(0).filtersConfiguration().includedEventTypes().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T08:56:10Z"), model.value().get(0).expirationTimeUtc()); + Assertions.assertEquals("vqdbpbhfck", model.value().get(0).tags().get("vezcrcssbzhdd")); + Assertions.assertEquals("ulodsaeuzanhsfnh", 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 index 21d741974c5f1..dced4a60fd03a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.systemTopicEventSubscriptions() - .delete("jmztnlmso", "dtmvecdhdyswcrp", "veajczxvlgsrg", com.azure.core.util.Context.NONE); + .delete("uyader", "tfo", "yksyimyccgrvkcx", 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 index df7232fdc1e3e..ebc5c31232d01 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,8 @@ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesWithResponseMockTests { @Test public void testGetDeliveryAttributesWithResponse() throws Exception { - String responseStr = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"hjiotiffbbcngkeg\"}]}"; + String responseStr + = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ccwkqmtx\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"eqi\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"rpilgftrqrejdaah\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,10 +31,9 @@ public void testGetDeliveryAttributesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeliveryAttributeListResult response = manager.systemTopicEventSubscriptions() - .getDeliveryAttributesWithResponse("audoej", "ighsxjpytnkq", "alahovuuwxhm", - com.azure.core.util.Context.NONE) + .getDeliveryAttributesWithResponse("nvskpaj", "mgeu", "exmj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hjiotiffbbcngkeg", response.value().get(0).name()); + Assertions.assertEquals("ccwkqmtx", 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 index f7bf6689a8fa5..a277e580818c2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class SystemTopicEventSubscriptionsGetFullUrlWithResponseMockTests { @Test public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"u\"}"; + String responseStr = "{\"endpointUrl\":\"kiioshj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testGetFullUrlWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EventSubscriptionFullUrl response = manager.systemTopicEventSubscriptions() - .getFullUrlWithResponse("rfizr", "ywlptyuqh", "lmcskyk", com.azure.core.util.Context.NONE) + .getFullUrlWithResponse("qimlda", "lfxlmuifmuadj", "fsn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("u", response.endpointUrl()); + Assertions.assertEquals("kiioshj", 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 e2a7091624428..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicInnerTests.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.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\":\"Creating\",\"source\":\"ntqpbr\",\"topicType\":\"yrduczkgofxyfsr\",\"metricResourceId\":\"vcrrpcj\"},\"identity\":{\"type\":\"None\",\"principalId\":\"jeaq\",\"tenantId\":\"mvvfko\",\"userAssignedIdentities\":{\"bhpwvqsgnyy\":{\"principalId\":\"hktuidvrma\",\"clientId\":\"pdwwexymzvlazi\"},\"gsksrfhf\":{\"principalId\":\"ziven\",\"clientId\":\"pmeyyvpkpatlbijp\"},\"kiexhajlfnthiq\":{\"principalId\":\"lmknbnxwcdom\",\"clientId\":\"vfqawzfgbrttuiac\"}}},\"location\":\"yuttdiygbpvnwswm\",\"tags\":{\"zwxjlm\":\"yctww\"},\"id\":\"cvogygzyvne\",\"name\":\"zaifghtmoqqtlff\",\"type\":\"zbkr\"}") - .toObject(SystemTopicInner.class); - Assertions.assertEquals("yuttdiygbpvnwswm", model.location()); - Assertions.assertEquals("yctww", model.tags().get("zwxjlm")); - Assertions.assertEquals(IdentityType.NONE, model.identity().type()); - Assertions.assertEquals("jeaq", model.identity().principalId()); - Assertions.assertEquals("mvvfko", model.identity().tenantId()); - Assertions.assertEquals("hktuidvrma", - model.identity().userAssignedIdentities().get("bhpwvqsgnyy").principalId()); - Assertions.assertEquals("pdwwexymzvlazi", - model.identity().userAssignedIdentities().get("bhpwvqsgnyy").clientId()); - Assertions.assertEquals("ntqpbr", model.source()); - Assertions.assertEquals("yrduczkgofxyfsr", model.topicType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemTopicInner model = new SystemTopicInner().withLocation("yuttdiygbpvnwswm") - .withTags(mapOf("zwxjlm", "yctww")) - .withIdentity(new IdentityInfo().withType(IdentityType.NONE) - .withPrincipalId("jeaq") - .withTenantId("mvvfko") - .withUserAssignedIdentities(mapOf("bhpwvqsgnyy", - new UserIdentityProperties().withPrincipalId("hktuidvrma").withClientId("pdwwexymzvlazi"), - "gsksrfhf", new UserIdentityProperties().withPrincipalId("ziven").withClientId("pmeyyvpkpatlbijp"), - "kiexhajlfnthiq", - new UserIdentityProperties().withPrincipalId("lmknbnxwcdom").withClientId("vfqawzfgbrttuiac")))) - .withSource("ntqpbr") - .withTopicType("yrduczkgofxyfsr"); - model = BinaryData.fromObject(model).toObject(SystemTopicInner.class); - Assertions.assertEquals("yuttdiygbpvnwswm", model.location()); - Assertions.assertEquals("yctww", model.tags().get("zwxjlm")); - Assertions.assertEquals(IdentityType.NONE, model.identity().type()); - Assertions.assertEquals("jeaq", model.identity().principalId()); - Assertions.assertEquals("mvvfko", model.identity().tenantId()); - Assertions.assertEquals("hktuidvrma", - model.identity().userAssignedIdentities().get("bhpwvqsgnyy").principalId()); - Assertions.assertEquals("pdwwexymzvlazi", - model.identity().userAssignedIdentities().get("bhpwvqsgnyy").clientId()); - Assertions.assertEquals("ntqpbr", model.source()); - Assertions.assertEquals("yrduczkgofxyfsr", 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 74a88f123ec9a..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicPropertiesTests.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.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\":\"Succeeded\",\"source\":\"avfqnvhnqoewdogi\",\"topicType\":\"tesypvidbztjh\",\"metricResourceId\":\"fbov\"}") - .toObject(SystemTopicProperties.class); - Assertions.assertEquals("avfqnvhnqoewdogi", model.source()); - Assertions.assertEquals("tesypvidbztjh", model.topicType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemTopicProperties model - = new SystemTopicProperties().withSource("avfqnvhnqoewdogi").withTopicType("tesypvidbztjh"); - model = BinaryData.fromObject(model).toObject(SystemTopicProperties.class); - Assertions.assertEquals("avfqnvhnqoewdogi", model.source()); - Assertions.assertEquals("tesypvidbztjh", 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 index e28928638af8a..a2930d3f2ea8c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,35 +17,34 @@ public final class SystemTopicUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SystemTopicUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"hpsprkzyaupiac\":\"kbwetnj\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"bwqroohtuovm\",\"tenantId\":\"nur\",\"userAssignedIdentities\":{\"jxl\":{\"principalId\":\"ghihpvecms\",\"clientId\":\"lbl\"},\"eukdqkkyih\":{\"principalId\":\"sjuscvsfxigctmg\",\"clientId\":\"upbezqccydrt\"},\"waoaguhi\":{\"principalId\":\"geqmgqzgwldoych\",\"clientId\":\"lcecfeh\"},\"kwqejpmvsseh\":{\"principalId\":\"llizs\",\"clientId\":\"csjvhrwef\"}}}}") + "{\"tags\":{\"jelaqacigele\":\"e\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"qvwzkjopwbeonrl\",\"tenantId\":\"zdqyb\",\"userAssignedIdentities\":{\"tzrazisgyk\":{\"principalId\":\"kxcpt\",\"clientId\":\"qfyiaseqchkr\"},\"jklinh\":{\"principalId\":\"emv\",\"clientId\":\"bwzohmnrxxbs\"},\"fiqwoy\":{\"principalId\":\"ptysprq\",\"clientId\":\"nzxojpslsvjgpli\"},\"cgdz\":{\"principalId\":\"vapcoh\",\"clientId\":\"ucqpqojxcxzrz\"}}}}") .toObject(SystemTopicUpdateParameters.class); - Assertions.assertEquals("kbwetnj", model.tags().get("hpsprkzyaupiac")); + Assertions.assertEquals("e", model.tags().get("jelaqacigele")); Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bwqroohtuovm", model.identity().principalId()); - Assertions.assertEquals("nur", model.identity().tenantId()); - Assertions.assertEquals("ghihpvecms", model.identity().userAssignedIdentities().get("jxl").principalId()); - Assertions.assertEquals("lbl", model.identity().userAssignedIdentities().get("jxl").clientId()); + Assertions.assertEquals("qvwzkjopwbeonrl", model.identity().principalId()); + Assertions.assertEquals("zdqyb", model.identity().tenantId()); + Assertions.assertEquals("kxcpt", model.identity().userAssignedIdentities().get("tzrazisgyk").principalId()); + Assertions.assertEquals("qfyiaseqchkr", model.identity().userAssignedIdentities().get("tzrazisgyk").clientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SystemTopicUpdateParameters model = new SystemTopicUpdateParameters() - .withTags(mapOf("hpsprkzyaupiac", "kbwetnj")) + SystemTopicUpdateParameters model = new SystemTopicUpdateParameters().withTags(mapOf("jelaqacigele", "e")) .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("bwqroohtuovm") - .withTenantId("nur") - .withUserAssignedIdentities(mapOf("jxl", - new UserIdentityProperties().withPrincipalId("ghihpvecms").withClientId("lbl"), "eukdqkkyih", - new UserIdentityProperties().withPrincipalId("sjuscvsfxigctmg").withClientId("upbezqccydrt"), - "waoaguhi", new UserIdentityProperties().withPrincipalId("geqmgqzgwldoych").withClientId("lcecfeh"), - "kwqejpmvsseh", new UserIdentityProperties().withPrincipalId("llizs").withClientId("csjvhrwef")))); + .withPrincipalId("qvwzkjopwbeonrl") + .withTenantId("zdqyb") + .withUserAssignedIdentities(mapOf("tzrazisgyk", + new UserIdentityProperties().withPrincipalId("kxcpt").withClientId("qfyiaseqchkr"), "jklinh", + new UserIdentityProperties().withPrincipalId("emv").withClientId("bwzohmnrxxbs"), "fiqwoy", + new UserIdentityProperties().withPrincipalId("ptysprq").withClientId("nzxojpslsvjgpli"), "cgdz", + new UserIdentityProperties().withPrincipalId("vapcoh").withClientId("ucqpqojxcxzrz")))); model = BinaryData.fromObject(model).toObject(SystemTopicUpdateParameters.class); - Assertions.assertEquals("kbwetnj", model.tags().get("hpsprkzyaupiac")); + Assertions.assertEquals("e", model.tags().get("jelaqacigele")); Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bwqroohtuovm", model.identity().principalId()); - Assertions.assertEquals("nur", model.identity().tenantId()); - Assertions.assertEquals("ghihpvecms", model.identity().userAssignedIdentities().get("jxl").principalId()); - Assertions.assertEquals("lbl", model.identity().userAssignedIdentities().get("jxl").clientId()); + Assertions.assertEquals("qvwzkjopwbeonrl", model.identity().principalId()); + Assertions.assertEquals("zdqyb", model.identity().tenantId()); + Assertions.assertEquals("kxcpt", model.identity().userAssignedIdentities().get("tzrazisgyk").principalId()); + Assertions.assertEquals("qfyiaseqchkr", model.identity().userAssignedIdentities().get("tzrazisgyk").clientId()); } // Use "Map.of" if available 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 f6e557961c7f3..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":\"cq\",\"topicType\":\"zmz\",\"metricResourceId\":\"cxitmhxxrqi\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"jd\",\"tenantId\":\"kvpyeyo\",\"userAssignedIdentities\":{\"fwkyluobdxw\":{\"principalId\":\"mpnqup\",\"clientId\":\"jr\"},\"cvwbz\":{\"principalId\":\"dcclcvqsr\",\"clientId\":\"ay\"},\"ydrf\":{\"principalId\":\"xlrymfj\",\"clientId\":\"piywqnp\"},\"jqpulmwqg\":{\"principalId\":\"cnyxbyx\",\"clientId\":\"hmqyncgaullfstyy\"}}},\"location\":\"hmqmiwxzf\",\"tags\":{\"dukinhlxh\":\"ucqfgufjnbxwbm\"},\"id\":\"dekekzouyveww\",\"name\":\"zrdwcg\",\"type\":\"dohgcandxfhhhte\"}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - SystemTopic response = manager.systemTopics() - .define("mbzdxmsyn") - .withRegion("amfbqh") - .withExistingResourceGroup("cxs") - .withTags(mapOf("fu", "k")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("rxbozp") - .withTenantId("cnwjzbqblxr") - .withUserAssignedIdentities(mapOf("gfhjxsawoo", - new UserIdentityProperties().withPrincipalId("svoqiza").withClientId("sdso"), "mrnotocjnzdaiovr", - new UserIdentityProperties().withPrincipalId("ffhx").withClientId("kmwzrdqyoy"), "uriwhjdfrw", - new UserIdentityProperties().withPrincipalId("rpqphkvyyzad").withClientId("xylaypdtyzvelffo"), - "oebnxsqcowscuyfq", - new UserIdentityProperties().withPrincipalId("shrmnkcclpctuog").withClientId("cxjfsgmos")))) - .withSource("yufxuzmsvzyq") - .withTopicType("rnxhjtlxfikjk") - .create(); - - Assertions.assertEquals("hmqmiwxzf", response.location()); - Assertions.assertEquals("ucqfgufjnbxwbm", response.tags().get("dukinhlxh")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("jd", response.identity().principalId()); - Assertions.assertEquals("kvpyeyo", response.identity().tenantId()); - Assertions.assertEquals("mpnqup", - response.identity().userAssignedIdentities().get("fwkyluobdxw").principalId()); - Assertions.assertEquals("jr", response.identity().userAssignedIdentities().get("fwkyluobdxw").clientId()); - Assertions.assertEquals("cq", response.source()); - Assertions.assertEquals("zmz", 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 index 23c7858282b53..37a3c5fa3e234 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.systemTopics().delete("btqhvmmniiqyhol", "jn", com.azure.core.util.Context.NONE); + manager.systemTopics().delete("llukkreh", "htmjo", 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 e8015839d01b0..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.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":\"Succeeded\",\"source\":\"zwwy\",\"topicType\":\"djzghximkg\",\"metricResourceId\":\"xpqkjnpy\"},\"identity\":{\"type\":\"None\",\"principalId\":\"tcxmmqm\",\"tenantId\":\"jkyjrexw\",\"userAssignedIdentities\":{\"qtlfoz\":{\"principalId\":\"exf\",\"clientId\":\"daubheeggzgr\"},\"syxzxjmkanbc\":{\"principalId\":\"mrtgjq\",\"clientId\":\"cant\"}}},\"location\":\"azofm\",\"tags\":{\"as\":\"te\",\"cbhaah\":\"manydscdkxwdpw\",\"kkzdfivsu\":\"tofelfhpfixo\",\"fppinmgik\":\"ybsrwzzmrgtxdh\"},\"id\":\"smkw\",\"name\":\"zgfragjh\",\"type\":\"erxlobk\"}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - SystemTopic response = manager.systemTopics() - .getByResourceGroupWithResponse("gkvyoh", "s", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("azofm", response.location()); - Assertions.assertEquals("te", response.tags().get("as")); - Assertions.assertEquals(IdentityType.NONE, response.identity().type()); - Assertions.assertEquals("tcxmmqm", response.identity().principalId()); - Assertions.assertEquals("jkyjrexw", response.identity().tenantId()); - Assertions.assertEquals("exf", response.identity().userAssignedIdentities().get("qtlfoz").principalId()); - Assertions.assertEquals("daubheeggzgr", response.identity().userAssignedIdentities().get("qtlfoz").clientId()); - Assertions.assertEquals("zwwy", response.source()); - Assertions.assertEquals("djzghximkg", 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 ed78c6d04ba05..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.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":\"Updating\",\"source\":\"hd\",\"topicType\":\"vhaztkxbivz\",\"metricResourceId\":\"xmbrygmwibiosiq\"},\"identity\":{\"type\":\"None\",\"principalId\":\"qwdr\",\"tenantId\":\"tfdaglmrcokz\",\"userAssignedIdentities\":{\"fpopikzeb\":{\"principalId\":\"kounzsiy\",\"clientId\":\"uby\"},\"gpmgfjculo\":{\"principalId\":\"nfywtkq\",\"clientId\":\"sdlkhcz\"}}},\"location\":\"hhylx\",\"tags\":{\"bwjmtftcveln\":\"fiyymotuzb\",\"j\":\"rupkqnstpaqpi\"},\"id\":\"bvswmehfxrt\",\"name\":\"xbmsennqfabqc\",\"type\":\"malec\"}]}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.systemTopics() - .listByResourceGroup("xxicee", "vjwyuveox", 1808067509, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hhylx", response.iterator().next().location()); - Assertions.assertEquals("fiyymotuzb", response.iterator().next().tags().get("bwjmtftcveln")); - Assertions.assertEquals(IdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("qwdr", response.iterator().next().identity().principalId()); - Assertions.assertEquals("tfdaglmrcokz", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("kounzsiy", - response.iterator().next().identity().userAssignedIdentities().get("fpopikzeb").principalId()); - Assertions.assertEquals("uby", - response.iterator().next().identity().userAssignedIdentities().get("fpopikzeb").clientId()); - Assertions.assertEquals("hd", response.iterator().next().source()); - Assertions.assertEquals("vhaztkxbivz", 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 66e767ec011e8..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.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":\"Creating\",\"source\":\"wlctmwp\",\"topicType\":\"xkrkqgvxrktj\",\"metricResourceId\":\"igcwtspanbqxase\"},\"identity\":{\"type\":\"None\",\"principalId\":\"geedyy\",\"tenantId\":\"uholaemwcgimmri\",\"userAssignedIdentities\":{\"sj\":{\"principalId\":\"sqqlonbzaow\",\"clientId\":\"hdkmbjsmihrijezb\"},\"lxa\":{\"principalId\":\"czglkvbgukbsvb\",\"clientId\":\"otygnbknhjg\"}}},\"location\":\"wcffaspsdzkuc\",\"tags\":{\"lfrsbzrnmuv\":\"hdoaqipmnx\",\"ofddtbfmek\":\"vp\",\"oyqxfvgyxz\":\"cnginxdvm\",\"zujsjirkrp\":\"xynofxlttxoqxtd\"},\"id\":\"kcjhmmofbnivd\",\"name\":\"tkykpaxnlsfgnys\",\"type\":\"accptbzetxy\"}]}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.systemTopics().list("kb", 1640013792, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wcffaspsdzkuc", response.iterator().next().location()); - Assertions.assertEquals("hdoaqipmnx", response.iterator().next().tags().get("lfrsbzrnmuv")); - Assertions.assertEquals(IdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("geedyy", response.iterator().next().identity().principalId()); - Assertions.assertEquals("uholaemwcgimmri", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("sqqlonbzaow", - response.iterator().next().identity().userAssignedIdentities().get("sj").principalId()); - Assertions.assertEquals("hdkmbjsmihrijezb", - response.iterator().next().identity().userAssignedIdentities().get("sj").clientId()); - Assertions.assertEquals("wlctmwp", response.iterator().next().source()); - Assertions.assertEquals("xkrkqgvxrktj", 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 507678d299663..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListResultTests.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.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\":\"Deleting\",\"source\":\"xtczhupeuknijd\",\"topicType\":\"yespydjfbocyv\",\"metricResourceId\":\"ulrtywikdmh\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"gbhgau\",\"tenantId\":\"dixmxufrsryjq\",\"userAssignedIdentities\":{\"sf\":{\"principalId\":\"nozoeoq\",\"clientId\":\"jhvefgwbmqjchnt\"},\"kmbtsuahx\":{\"principalId\":\"mx\",\"clientId\":\"lpzealbmqkyojwyv\"},\"sd\":{\"principalId\":\"xjcmmzrrsc\",\"clientId\":\"i\"}}},\"location\":\"npxqwodi\",\"tags\":{\"muabwibvjogjonmc\":\"xcjr\",\"oyzbamwineofvf\":\"e\",\"lz\":\"akpoldtvevbo\",\"ttxpnrupza\":\"zjknyuxg\"},\"id\":\"mrdixtreki\",\"name\":\"swyskbruffg\",\"type\":\"lukkutvlxhrpqhvm\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"source\":\"qehbhbcds\",\"topicType\":\"ryrando\",\"metricResourceId\":\"mbltoo\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"wxldykalsygaoln\",\"tenantId\":\"nnbmjksibjgsjj\",\"userAssignedIdentities\":{\"xyivpinbm\":{\"principalId\":\"mr\",\"clientId\":\"dzyqe\"},\"nggiycwkdtaa\":{\"principalId\":\"bjijkgqxnh\",\"clientId\":\"keznjaujvaa\"},\"irkfpksokdgo\":{\"principalId\":\"wfekaumrrqmb\",\"clientId\":\"qkratbnxwbjsid\"},\"f\":{\"principalId\":\"wijymr\",\"clientId\":\"guzozkyew\"}}},\"location\":\"zhhh\",\"tags\":{\"oohguabzoghkt\":\"mffjkutycyarn\",\"hcoeocnhzq\":\"pyc\",\"jzcfyjzptwr\":\"ot\",\"yglqdhmrjzral\":\"ohapqinfsz\"},\"id\":\"xpjb\",\"name\":\"ypsjoq\",\"type\":\"jenkyh\"},{\"properties\":{\"provisioningState\":\"Failed\",\"source\":\"qxfx\",\"topicType\":\"l\",\"metricResourceId\":\"mpzqjhhhq\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"acoyvivbsizusjs\",\"tenantId\":\"bscm\",\"userAssignedIdentities\":{\"flnwy\":{\"principalId\":\"jiu\",\"clientId\":\"hgm\"},\"xyjtcdxabbujf\":{\"principalId\":\"kxrerlniylylyfwx\",\"clientId\":\"tgqztwhghmup\"},\"afeddwwnlza\":{\"principalId\":\"benbbkl\",\"clientId\":\"xzu\"}}},\"location\":\"wxudgn\",\"tags\":{\"gpbemeluclvdjju\":\"okrtalvnb\",\"ahhxhqfaqnvzoqg\":\"yrdnqod\",\"ejdtxptl\":\"ipemchgavscz\"},\"id\":\"h\",\"name\":\"zhomewjjstliu\",\"type\":\"qawmoaianc\"},{\"properties\":{\"provisioningState\":\"Failed\",\"source\":\"rrslblxydkx\",\"topicType\":\"vvbxiwkgfbqljnq\",\"metricResourceId\":\"ychocokulehu\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"fawey\",\"tenantId\":\"kphyjdxrav\",\"userAssignedIdentities\":{\"j\":{\"principalId\":\"brxmrgch\",\"clientId\":\"pxkiyf\"},\"cblevpmc\":{\"principalId\":\"ajb\",\"clientId\":\"cgduusio\"},\"gkzz\":{\"principalId\":\"jy\",\"clientId\":\"yxlzgs\"}}},\"location\":\"taf\",\"tags\":{\"vdwnapfdqwowft\":\"ffovwmbjlzqsczp\",\"qyhleseyq\":\"tnuwjtkschgc\",\"dkwisw\":\"hvyeldotj\"},\"id\":\"kukjtasb\",\"name\":\"wispkxk\",\"type\":\"txfkndlqvt\"}],\"nextLink\":\"nvgmmbugtywa\"}") - .toObject(SystemTopicsListResult.class); - Assertions.assertEquals("npxqwodi", model.value().get(0).location()); - Assertions.assertEquals("xcjr", model.value().get(0).tags().get("muabwibvjogjonmc")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("gbhgau", model.value().get(0).identity().principalId()); - Assertions.assertEquals("dixmxufrsryjq", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("nozoeoq", - model.value().get(0).identity().userAssignedIdentities().get("sf").principalId()); - Assertions.assertEquals("jhvefgwbmqjchnt", - model.value().get(0).identity().userAssignedIdentities().get("sf").clientId()); - Assertions.assertEquals("xtczhupeuknijd", model.value().get(0).source()); - Assertions.assertEquals("yespydjfbocyv", model.value().get(0).topicType()); - Assertions.assertEquals("nvgmmbugtywa", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemTopicsListResult model - = new SystemTopicsListResult() - .withValue( - Arrays.asList( - new SystemTopicInner().withLocation("npxqwodi") - .withTags(mapOf("muabwibvjogjonmc", "xcjr", "oyzbamwineofvf", "e", "lz", "akpoldtvevbo", - "ttxpnrupza", "zjknyuxg")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("gbhgau") - .withTenantId("dixmxufrsryjq") - .withUserAssignedIdentities(mapOf( - "sf", - new UserIdentityProperties().withPrincipalId("nozoeoq") - .withClientId("jhvefgwbmqjchnt"), - "kmbtsuahx", new UserIdentityProperties().withPrincipalId("mx") - .withClientId("lpzealbmqkyojwyv"), - "sd", new UserIdentityProperties().withPrincipalId("xjcmmzrrsc") - .withClientId("i")))) - .withSource("xtczhupeuknijd") - .withTopicType("yespydjfbocyv"), - new SystemTopicInner().withLocation("zhhh") - .withTags(mapOf( - "oohguabzoghkt", "mffjkutycyarn", "hcoeocnhzq", "pyc", "jzcfyjzptwr", "ot", - "yglqdhmrjzral", "ohapqinfsz")) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("wxldykalsygaoln") - .withTenantId("nnbmjksibjgsjj") - .withUserAssignedIdentities(mapOf("xyivpinbm", - new UserIdentityProperties().withPrincipalId("mr").withClientId("dzyqe"), - "nggiycwkdtaa", - new UserIdentityProperties().withPrincipalId("bjijkgqxnh") - .withClientId("keznjaujvaa"), - "irkfpksokdgo", - new UserIdentityProperties().withPrincipalId("wfekaumrrqmb") - .withClientId("qkratbnxwbjsid"), - "f", - new UserIdentityProperties().withPrincipalId("wijymr").withClientId("guzozkyew")))) - .withSource("qehbhbcds") - .withTopicType("ryrando"), - new SystemTopicInner().withLocation("wxudgn") - .withTags(mapOf("gpbemeluclvdjju", "okrtalvnb", "ahhxhqfaqnvzoqg", "yrdnqod", "ejdtxptl", - "ipemchgavscz")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("acoyvivbsizusjs") - .withTenantId("bscm") - .withUserAssignedIdentities(mapOf("flnwy", - new UserIdentityProperties().withPrincipalId("jiu").withClientId("hgm"), - "xyjtcdxabbujf", - new UserIdentityProperties().withPrincipalId("kxrerlniylylyfwx") - .withClientId("tgqztwhghmup"), - "afeddwwnlza", - new UserIdentityProperties().withPrincipalId("benbbkl").withClientId("xzu")))) - .withSource("qxfx") - .withTopicType("l"), - new SystemTopicInner().withLocation("taf") - .withTags(mapOf("vdwnapfdqwowft", "ffovwmbjlzqsczp", "qyhleseyq", "tnuwjtkschgc", "dkwisw", - "hvyeldotj")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) - .withPrincipalId("fawey") - .withTenantId("kphyjdxrav") - .withUserAssignedIdentities(mapOf("j", - new UserIdentityProperties().withPrincipalId("brxmrgch").withClientId("pxkiyf"), - "cblevpmc", - new UserIdentityProperties().withPrincipalId("ajb").withClientId("cgduusio"), - "gkzz", new UserIdentityProperties().withPrincipalId("jy").withClientId("yxlzgs")))) - .withSource("rrslblxydkx") - .withTopicType("vvbxiwkgfbqljnq"))) - .withNextLink("nvgmmbugtywa"); - model = BinaryData.fromObject(model).toObject(SystemTopicsListResult.class); - Assertions.assertEquals("npxqwodi", model.value().get(0).location()); - Assertions.assertEquals("xcjr", model.value().get(0).tags().get("muabwibvjogjonmc")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("gbhgau", model.value().get(0).identity().principalId()); - Assertions.assertEquals("dixmxufrsryjq", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("nozoeoq", - model.value().get(0).identity().userAssignedIdentities().get("sf").principalId()); - Assertions.assertEquals("jhvefgwbmqjchnt", - model.value().get(0).identity().userAssignedIdentities().get("sf").clientId()); - Assertions.assertEquals("xtczhupeuknijd", model.value().get(0).source()); - Assertions.assertEquals("yespydjfbocyv", model.value().get(0).topicType()); - Assertions.assertEquals("nvgmmbugtywa", 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 index 64dbf1121286a..738198f23e928 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.topicEventSubscriptions().delete("bj", "qwm", "q", com.azure.core.util.Context.NONE); + manager.topicEventSubscriptions().delete("h", "foxqwecrsn", "pcs", 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 index 74ee8f0bfdfed..df1a6204ca596 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class TopicEventSubscriptionsGetDeliveryAttributesWithResponseMockT @Test public void testGetDeliveryAttributesWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xopgehpadkmd\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"sszxvctkbbxuh\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"lsi\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ccla\"}]}"; + = "{\"value\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"wzlpzbtz\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"kykipfsdyepfnoc\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ezacfpztga\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"yqejga\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetDeliveryAttributesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeliveryAttributeListResult response = manager.topicEventSubscriptions() - .getDeliveryAttributesWithResponse("nplfac", "occqrqxw", "tjtdrhutfd", com.azure.core.util.Context.NONE) + .getDeliveryAttributesWithResponse("lyzkxitds", "ezsvkolrupjov", "ozsaye", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xopgehpadkmd", response.value().get(0).name()); + Assertions.assertEquals("wzlpzbtz", 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 index 5328bf4080463..aa2786e7c6ba5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -20,7 +20,7 @@ public final class TopicEventSubscriptionsGetFullUrlWithResponseMockTests { @Test public void testGetFullUrlWithResponse() throws Exception { - String responseStr = "{\"endpointUrl\":\"q\"}"; + String responseStr = "{\"endpointUrl\":\"hpqhazyntacihn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,10 @@ public void testGetFullUrlWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EventSubscriptionFullUrl response = manager.topicEventSubscriptions() - .getFullUrlWithResponse("moxsa", "uxejgwecywnfyszz", "czs", com.azure.core.util.Context.NONE) + .getFullUrlWithResponse("okctgkppgkqzkc", "zmffngdyfcixrh", "cqvhoejgoiutgwrm", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("q", response.endpointUrl()); + Assertions.assertEquals("hpqhazyntacihn", 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 e77eabfe88fa5..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicInnerTests.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.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\":\"eatgroeshoy\"},\"groupIds\":[\"byfqxkfaoy\",\"ehqpuvjmvqmt\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"gr\",\"actionsRequired\":\"jn\"},\"provisioningState\":\"Updating\"},\"id\":\"jdjusk\",\"name\":\"rreqynkceysfaqe\",\"type\":\"pl\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"hwddkvbxgkq\"},\"groupIds\":[\"bwptdacarvvlf\",\"tymtpoiwenazer\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"qalsxkd\",\"actionsRequired\":\"qapfgsdpc\"},\"provisioningState\":\"Deleting\"},\"id\":\"smzhhkuuipldqqct\",\"name\":\"kva\",\"type\":\"blhtjq\"}],\"provisioningState\":\"Deleting\",\"endpoint\":\"wehtaemxh\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"pq\":{\"description\":\"sxivzrrryvei\",\"displayName\":\"pskdyzatvfuzk\",\"documentationUrl\":\"tjvv\",\"dataSchemaUrl\":\"xwigsye\"},\"floygbdgwumg\":{\"description\":\"mjtgrqg\",\"displayName\":\"kkileplkc\",\"documentationUrl\":\"knh\",\"dataSchemaUrl\":\"bbaedorvvm\"}}},\"minimumTlsVersionAllowed\":\"1.2\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"bgd\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"jsaqwotmmwllcols\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"okjljnhvlqjbekp\",\"tenantId\":\"ksnbksdqhjv\",\"userAssignedIdentities\":{\"avnwqj\":{\"principalId\":\"eslk\",\"clientId\":\"ustcpoq\"},\"wfd\":{\"principalId\":\"o\",\"clientId\":\"lejjjkxy\"}}},\"kind\":\"Azure\",\"extendedLocation\":{\"name\":\"tensvkzykj\",\"type\":\"kns\"},\"location\":\"wushcdp\",\"tags\":{\"mgjfbpkuwxeoio\":\"nq\"},\"id\":\"fiz\",\"name\":\"av\",\"type\":\"jzwfb\"}") - .toObject(TopicInner.class); - Assertions.assertEquals("wushcdp", model.location()); - Assertions.assertEquals("nq", model.tags().get("mgjfbpkuwxeoio")); - Assertions.assertEquals(Sku.PREMIUM, model.sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("okjljnhvlqjbekp", model.identity().principalId()); - Assertions.assertEquals("ksnbksdqhjv", model.identity().tenantId()); - Assertions.assertEquals("eslk", model.identity().userAssignedIdentities().get("avnwqj").principalId()); - Assertions.assertEquals("ustcpoq", model.identity().userAssignedIdentities().get("avnwqj").clientId()); - Assertions.assertEquals(ResourceKind.AZURE, model.kind()); - Assertions.assertEquals("tensvkzykj", model.extendedLocation().name()); - Assertions.assertEquals("kns", model.extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("sxivzrrryvei", model.eventTypeInfo().inlineEventTypes().get("pq").description()); - Assertions.assertEquals("pskdyzatvfuzk", model.eventTypeInfo().inlineEventTypes().get("pq").displayName()); - Assertions.assertEquals("tjvv", model.eventTypeInfo().inlineEventTypes().get("pq").documentationUrl()); - Assertions.assertEquals("xwigsye", model.eventTypeInfo().inlineEventTypes().get("pq").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("jsaqwotmmwllcols", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertFalse(model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicInner model - = new TopicInner().withLocation("wushcdp") - .withTags(mapOf("mgjfbpkuwxeoio", "nq")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity( - new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("okjljnhvlqjbekp") - .withTenantId("ksnbksdqhjv") - .withUserAssignedIdentities(mapOf("avnwqj", - new UserIdentityProperties().withPrincipalId("eslk").withClientId("ustcpoq"), "wfd", - new UserIdentityProperties().withPrincipalId("o").withClientId("lejjjkxy")))) - .withKind(ResourceKind.AZURE) - .withExtendedLocation(new ExtendedLocation().withName("tensvkzykj").withType("kns")) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("pq", - new InlineEventProperties().withDescription("sxivzrrryvei") - .withDisplayName("pskdyzatvfuzk") - .withDocumentationUrl("tjvv") - .withDataSchemaUrl("xwigsye"), - "floygbdgwumg", - new InlineEventProperties().withDescription("mjtgrqg") - .withDisplayName("kkileplkc") - .withDocumentationUrl("knh") - .withDataSchemaUrl("bbaedorvvm")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("jsaqwotmmwllcols").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR); - model = BinaryData.fromObject(model).toObject(TopicInner.class); - Assertions.assertEquals("wushcdp", model.location()); - Assertions.assertEquals("nq", model.tags().get("mgjfbpkuwxeoio")); - Assertions.assertEquals(Sku.PREMIUM, model.sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("okjljnhvlqjbekp", model.identity().principalId()); - Assertions.assertEquals("ksnbksdqhjv", model.identity().tenantId()); - Assertions.assertEquals("eslk", model.identity().userAssignedIdentities().get("avnwqj").principalId()); - Assertions.assertEquals("ustcpoq", model.identity().userAssignedIdentities().get("avnwqj").clientId()); - Assertions.assertEquals(ResourceKind.AZURE, model.kind()); - Assertions.assertEquals("tensvkzykj", model.extendedLocation().name()); - Assertions.assertEquals("kns", model.extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("sxivzrrryvei", model.eventTypeInfo().inlineEventTypes().get("pq").description()); - Assertions.assertEquals("pskdyzatvfuzk", model.eventTypeInfo().inlineEventTypes().get("pq").displayName()); - Assertions.assertEquals("tjvv", model.eventTypeInfo().inlineEventTypes().get("pq").documentationUrl()); - Assertions.assertEquals("xwigsye", model.eventTypeInfo().inlineEventTypes().get("pq").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CLOUD_EVENT_SCHEMA_V1_0, model.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("jsaqwotmmwllcols", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertFalse(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 ba94c7a2aaf1a..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\":\"mfzsbf\"},\"groupIds\":[\"zxmdew\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"rplbjazejwwvi\",\"actionsRequired\":\"y\"},\"provisioningState\":\"Creating\"},\"id\":\"hbrnnhjx\",\"name\":\"qwjhqkbiwetpozyc\",\"type\":\"qiqyhgfsetzlexbs\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ynojpziuw\"},\"groupIds\":[\"kkdtnhqsy\",\"ljselp\",\"pbafvafhlbylc\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"rhyzdf\",\"actionsRequired\":\"sofpltd\"},\"provisioningState\":\"Deleting\"},\"id\":\"irrhv\",\"name\":\"fnrac\",\"type\":\"npq\"}],\"provisioningState\":\"Creating\",\"endpoint\":\"ujwouhdawsi\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"xn\":{\"description\":\"jybvit\",\"displayName\":\"kjyaznumtg\",\"documentationUrl\":\"uwdchozf\",\"dataSchemaUrl\":\"fexl\"},\"lkexaonwivkcqh\":{\"description\":\"kizvoa\",\"displayName\":\"naqln\",\"documentationUrl\":\"iguyxlykwphv\",\"dataSchemaUrl\":\"cwxhmpej\"},\"zvyfijdkzuqnwsi\":{\"description\":\"hxknlccrmmkyupi\",\"displayName\":\"byqjfkakfqfrkem\",\"documentationUrl\":\"ldudxjascowv\",\"dataSchemaUrl\":\"jkpdxphlkksnm\"}}},\"minimumTlsVersionAllowed\":\"1.1\",\"inputSchema\":\"CustomEventSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"ah\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"lsutrjbh\",\"action\":\"Allow\"},{\"ipMask\":\"hyqezvqq\",\"action\":\"Allow\"},{\"ipMask\":\"ftbcvexreuquow\",\"action\":\"Allow\"},{\"ipMask\":\"fwhreagkhyxv\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinRegion\"}") - .toObject(TopicProperties.class); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("jybvit", model.eventTypeInfo().inlineEventTypes().get("xn").description()); - Assertions.assertEquals("kjyaznumtg", model.eventTypeInfo().inlineEventTypes().get("xn").displayName()); - Assertions.assertEquals("uwdchozf", model.eventTypeInfo().inlineEventTypes().get("xn").documentationUrl()); - Assertions.assertEquals("fexl", model.eventTypeInfo().inlineEventTypes().get("xn").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, model.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("lsutrjbh", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, model.dataResidencyBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicProperties model = new TopicProperties() - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("xn", - new InlineEventProperties().withDescription("jybvit") - .withDisplayName("kjyaznumtg") - .withDocumentationUrl("uwdchozf") - .withDataSchemaUrl("fexl"), - "lkexaonwivkcqh", - new InlineEventProperties().withDescription("kizvoa") - .withDisplayName("naqln") - .withDocumentationUrl("iguyxlykwphv") - .withDataSchemaUrl("cwxhmpej"), - "zvyfijdkzuqnwsi", - new InlineEventProperties().withDescription("hxknlccrmmkyupi") - .withDisplayName("byqjfkakfqfrkem") - .withDocumentationUrl("ldudxjascowv") - .withDataSchemaUrl("jkpdxphlkksnm")))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withInputSchema(InputSchema.CUSTOM_EVENT_SCHEMA) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("lsutrjbh").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("hyqezvqq").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ftbcvexreuquow").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("fwhreagkhyxv").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION); - model = BinaryData.fromObject(model).toObject(TopicProperties.class); - Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("jybvit", model.eventTypeInfo().inlineEventTypes().get("xn").description()); - Assertions.assertEquals("kjyaznumtg", model.eventTypeInfo().inlineEventTypes().get("xn").displayName()); - Assertions.assertEquals("uwdchozf", model.eventTypeInfo().inlineEventTypes().get("xn").documentationUrl()); - Assertions.assertEquals("fexl", model.eventTypeInfo().inlineEventTypes().get("xn").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.CUSTOM_EVENT_SCHEMA, model.inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); - Assertions.assertEquals("lsutrjbh", model.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, 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 index ef46aa9802f79..03d573e89cc24 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,18 +13,18 @@ public final class TopicSpaceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TopicSpaceInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"lgflwfg\",\"topicTemplates\":[\"u\",\"ijjcea\",\"lijjjrtvam\"],\"provisioningState\":\"Succeeded\"},\"id\":\"knxkvccxetyvkunm\",\"name\":\"gno\",\"type\":\"ikkgqo\"}") + "{\"properties\":{\"description\":\"dbkjbztensvkzykj\",\"topicTemplates\":[\"nsxfwu\"],\"provisioningState\":\"Deleted\"},\"id\":\"pkupnq\",\"name\":\"mgjfbpkuwxeoio\",\"type\":\"fiz\"}") .toObject(TopicSpaceInner.class); - Assertions.assertEquals("lgflwfg", model.description()); - Assertions.assertEquals("u", model.topicTemplates().get(0)); + Assertions.assertEquals("dbkjbztensvkzykj", model.description()); + Assertions.assertEquals("nsxfwu", model.topicTemplates().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TopicSpaceInner model = new TopicSpaceInner().withDescription("lgflwfg") - .withTopicTemplates(Arrays.asList("u", "ijjcea", "lijjjrtvam")); + TopicSpaceInner model + = new TopicSpaceInner().withDescription("dbkjbztensvkzykj").withTopicTemplates(Arrays.asList("nsxfwu")); model = BinaryData.fromObject(model).toObject(TopicSpaceInner.class); - Assertions.assertEquals("lgflwfg", model.description()); - Assertions.assertEquals("u", model.topicTemplates().get(0)); + Assertions.assertEquals("dbkjbztensvkzykj", model.description()); + Assertions.assertEquals("nsxfwu", 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 index 18fb7fbeeab56..afc0fcfd221c6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,18 +13,18 @@ public final class TopicSpacePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TopicSpaceProperties model = BinaryData.fromString( - "{\"description\":\"wpin\",\"topicTemplates\":[\"vabbx\",\"hmedeilbjywfcfxz\",\"rzzihvwypus\",\"vjslczwcii\"],\"provisioningState\":\"Creating\"}") + "{\"description\":\"vkjzwfbcyaykm\",\"topicTemplates\":[\"sbfwxr\"],\"provisioningState\":\"Creating\"}") .toObject(TopicSpaceProperties.class); - Assertions.assertEquals("wpin", model.description()); - Assertions.assertEquals("vabbx", model.topicTemplates().get(0)); + Assertions.assertEquals("vkjzwfbcyaykm", model.description()); + Assertions.assertEquals("sbfwxr", model.topicTemplates().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TopicSpaceProperties model = new TopicSpaceProperties().withDescription("wpin") - .withTopicTemplates(Arrays.asList("vabbx", "hmedeilbjywfcfxz", "rzzihvwypus", "vjslczwcii")); + TopicSpaceProperties model + = new TopicSpaceProperties().withDescription("vkjzwfbcyaykm").withTopicTemplates(Arrays.asList("sbfwxr")); model = BinaryData.fromObject(model).toObject(TopicSpaceProperties.class); - Assertions.assertEquals("wpin", model.description()); - Assertions.assertEquals("vabbx", model.topicTemplates().get(0)); + Assertions.assertEquals("vkjzwfbcyaykm", model.description()); + Assertions.assertEquals("sbfwxr", 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 index 828993bb576b0..606e214c6385c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class TopicSpacesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"iwlwkfflaqwmwqo\",\"topicTemplates\":[\"lteatn\",\"gefzj\",\"njtqbg\"],\"provisioningState\":\"Succeeded\"},\"id\":\"thnvxwtdqtcbjd\",\"name\":\"tqyhkxuns\",\"type\":\"ujqgbbjvo\"}"; + = "{\"properties\":{\"description\":\"ejtznxlue\",\"topicTemplates\":[\"q\",\"bgsimwejlwbkbp\",\"zobdwbcp\",\"aswkuhydtnaczkf\"],\"provisioningState\":\"Succeeded\"},\"id\":\"gawphns\",\"name\":\"ivdwgtqc\",\"type\":\"mecsaa\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TopicSpace response = manager.topicSpaces() - .define("clzjwaqdz") - .withExistingNamespace("bkurklpiig", "uzkeutuip") - .withDescription("ewuwxyllz") - .withTopicTemplates(Arrays.asList("vtzqw")) + .define("vtsdydshkpafy") + .withExistingNamespace("hskirhnp", "pkcbkfukdljq") + .withDescription("owwzizznyufpqzst") + .withTopicTemplates(Arrays.asList("uf")) .create(); - Assertions.assertEquals("iwlwkfflaqwmwqo", response.description()); - Assertions.assertEquals("lteatn", response.topicTemplates().get(0)); + Assertions.assertEquals("ejtznxlue", response.description()); + Assertions.assertEquals("q", 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 index 34bc90f1d1b7e..6bbf51b64bb43 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.topicSpaces().delete("ustihtgrafjajvky", "mmjczvog", "derjennmk", com.azure.core.util.Context.NONE); + manager.topicSpaces() + .delete("lxkqesdfeds", "gzancoinmphy", "cqidkltvdhqnufbx", 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 index 5adb88a58f61a..e594cd1273c51 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -21,7 +21,7 @@ public final class TopicSpacesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"vlutggmaacxauhv\",\"topicTemplates\":[\"xhklsqxt\",\"iyygktsrjyxxoxwf\"],\"provisioningState\":\"Updating\"},\"id\":\"ecnxfxp\",\"name\":\"sowbeb\",\"type\":\"nbwutlvuwmsu\"}"; + = "{\"properties\":{\"description\":\"q\",\"topicTemplates\":[\"wb\",\"nmpaklwzlweepr\",\"ejzltka\"],\"provisioningState\":\"Updating\"},\"id\":\"sxscbduxa\",\"name\":\"grcqebmvrdj\",\"type\":\"mlnwsbvvdls\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TopicSpace response = manager.topicSpaces() - .getWithResponse("rxbkitzmnhitax", "ucltjlxsgcemegdz", "vyljubvfjyzufldi", com.azure.core.util.Context.NONE) + .getWithResponse("h", "gsiqikvllr", "tpmglxkoikmtr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vlutggmaacxauhv", response.description()); - Assertions.assertEquals("xhklsqxt", response.topicTemplates().get(0)); + Assertions.assertEquals("q", response.description()); + Assertions.assertEquals("wb", 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 index e7a743a7762d4..051e60a0c7d82 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class TopicSpacesListByNamespaceMockTests { @Test public void testListByNamespace() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"ihqbtod\",\"topicTemplates\":[\"xbvkvwzdmvdd\",\"wcrugyozzz\",\"wnjdvvlrh\"],\"provisioningState\":\"Deleting\"},\"id\":\"kvx\",\"name\":\"ndqzbvbpsuv\",\"type\":\"hxtozfgdk\"}]}"; + = "{\"value\":[{\"properties\":{\"description\":\"udhuaorhjk\",\"topicTemplates\":[\"vumosqircamqp\",\"l\",\"brugejcvjkjycz\",\"mtagelajdyol\"],\"provisioningState\":\"Failed\"},\"id\":\"xqfmzsizzhravrcj\",\"name\":\"jymgqbgcxhn\",\"type\":\"xgzxlermkmer\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByNamespace() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.topicSpaces() - .listByNamespace("aeuwqdwxhhlbmyph", "xnrp", "hewokyqsfkxf", 1422383624, com.azure.core.util.Context.NONE); + .listByNamespace("e", "i", "ntojovfnybydhuih", 576344420, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ihqbtod", response.iterator().next().description()); - Assertions.assertEquals("xbvkvwzdmvdd", response.iterator().next().topicTemplates().get(0)); + Assertions.assertEquals("udhuaorhjk", response.iterator().next().description()); + Assertions.assertEquals("vumosqircamqp", 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 index d723421c3069d..4ece689797651 100644 --- 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 @@ -1,40 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.eventgrid.implementation.models.TopicSpacesListResult; 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\":\"yvdmvx\",\"topicTemplates\":[\"acfrgna\"],\"provisioningState\":\"Succeeded\"},\"id\":\"gfbktyjmf\",\"name\":\"zlfsyqkfrbzgowo\",\"type\":\"qmje\"},{\"properties\":{\"description\":\"xnyqgxhlusr\",\"topicTemplates\":[\"simjceagbjqvlsu\"],\"provisioningState\":\"Creating\"},\"id\":\"ashxgonoyjfqi\",\"name\":\"ubyzn\",\"type\":\"lkfk\"},{\"properties\":{\"description\":\"gv\",\"topicTemplates\":[\"m\"],\"provisioningState\":\"Updating\"},\"id\":\"ujlyegq\",\"name\":\"vn\",\"type\":\"gflqqbtnyjp\"},{\"properties\":{\"description\":\"dbfvabmv\",\"topicTemplates\":[\"baevwjcnkottl\",\"uhvajmailfemjjza\",\"zwjiqullq\"],\"provisioningState\":\"Deleting\"},\"id\":\"vr\",\"name\":\"cm\",\"type\":\"erndbrnyeofltfnn\"}],\"nextLink\":\"kadjf\"}") + "{\"value\":[{\"properties\":{\"description\":\"srsx\",\"topicTemplates\":[\"lbjazejww\",\"iyoypsuhbrnnhj\"],\"provisioningState\":\"Failed\"},\"id\":\"jhqkbiwetpozy\",\"name\":\"yqiq\",\"type\":\"hgf\"}],\"nextLink\":\"tzlexbs\"}") .toObject(TopicSpacesListResult.class); - Assertions.assertEquals("yvdmvx", model.value().get(0).description()); - Assertions.assertEquals("acfrgna", model.value().get(0).topicTemplates().get(0)); - Assertions.assertEquals("kadjf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicSpacesListResult model = new TopicSpacesListResult() - .withValue(Arrays.asList( - new TopicSpaceInner().withDescription("yvdmvx").withTopicTemplates(Arrays.asList("acfrgna")), - new TopicSpaceInner().withDescription("xnyqgxhlusr") - .withTopicTemplates(Arrays.asList("simjceagbjqvlsu")), - new TopicSpaceInner().withDescription("gv").withTopicTemplates(Arrays.asList("m")), - new TopicSpaceInner().withDescription("dbfvabmv") - .withTopicTemplates(Arrays.asList("baevwjcnkottl", "uhvajmailfemjjza", "zwjiqullq")))) - .withNextLink("kadjf"); - model = BinaryData.fromObject(model).toObject(TopicSpacesListResult.class); - Assertions.assertEquals("yvdmvx", model.value().get(0).description()); - Assertions.assertEquals("acfrgna", model.value().get(0).topicTemplates().get(0)); - Assertions.assertEquals("kadjf", model.nextLink()); + Assertions.assertEquals("srsx", model.value().get(0).description()); + Assertions.assertEquals("lbjazejww", model.value().get(0).topicTemplates().get(0)); + Assertions.assertEquals("tzlexbs", 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 index 29d3b22f860fe..606aee5dffa14 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -12,18 +12,9 @@ public final class TopicTypeAdditionalEnforcedPermissionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TopicTypeAdditionalEnforcedPermission model - = BinaryData.fromString("{\"permissionName\":\"bpjptnvwjhrsi\",\"isDataAction\":true}") + = BinaryData.fromString("{\"permissionName\":\"dppyibngqlady\",\"isDataAction\":true}") .toObject(TopicTypeAdditionalEnforcedPermission.class); - Assertions.assertEquals("bpjptnvwjhrsi", model.permissionName()); - Assertions.assertTrue(model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicTypeAdditionalEnforcedPermission model - = new TopicTypeAdditionalEnforcedPermission().withPermissionName("bpjptnvwjhrsi").withIsDataAction(true); - model = BinaryData.fromObject(model).toObject(TopicTypeAdditionalEnforcedPermission.class); - Assertions.assertEquals("bpjptnvwjhrsi", model.permissionName()); + Assertions.assertEquals("dppyibngqlady", model.permissionName()); Assertions.assertTrue(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 index ad7d4c2e64f28..07e1006bdc0a6 100644 --- 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 @@ -1,66 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"carkuzlb\",\"displayName\":\"ndtsnxawqytll\",\"description\":\"yzm\",\"resourceRegionType\":\"RegionalResource\",\"provisioningState\":\"Updating\",\"supportedLocations\":[\"xak\",\"kywymxgaabj\"],\"sourceResourceFormat\":\"tfohf\",\"supportedScopesForSource\":[\"AzureSubscription\",\"ManagementGroup\",\"ResourceGroup\",\"Resource\"],\"areRegionalAndGlobalSourcesSupported\":true,\"additionalEnforcedPermissions\":[{\"permissionName\":\"dyjqu\",\"isDataAction\":false},{\"permissionName\":\"rra\",\"isDataAction\":false},{\"permissionName\":\"csuehogddac\",\"isDataAction\":true},{\"permissionName\":\"ydl\",\"isDataAction\":false}]},\"id\":\"ywmhmptyrilkfbnr\",\"name\":\"qxvztpbnfnqtxjt\",\"type\":\"m\"}") + "{\"properties\":{\"provider\":\"ngqjclidf\",\"displayName\":\"jwjj\",\"description\":\"wbeqrkuor\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Creating\",\"supportedLocations\":[\"nmdvha\",\"c\",\"jy\"],\"sourceResourceFormat\":\"qswbqerzwx\",\"supportedScopesForSource\":[\"Resource\"],\"areRegionalAndGlobalSourcesSupported\":true,\"additionalEnforcedPermissions\":[{\"permissionName\":\"vlbpktgdstyou\",\"isDataAction\":true},{\"permissionName\":\"wreswmowegm\",\"isDataAction\":true}]},\"id\":\"yxey\",\"name\":\"uqi\",\"type\":\"ijiitns\"}") .toObject(TopicTypeInfoInner.class); - Assertions.assertEquals("carkuzlb", model.provider()); - Assertions.assertEquals("ndtsnxawqytll", model.displayName()); - Assertions.assertEquals("yzm", model.description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, model.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("xak", model.supportedLocations().get(0)); - Assertions.assertEquals("tfohf", model.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.AZURE_SUBSCRIPTION, model.supportedScopesForSource().get(0)); + Assertions.assertEquals("ngqjclidf", model.provider()); + Assertions.assertEquals("jwjj", model.displayName()); + Assertions.assertEquals("wbeqrkuor", model.description()); + Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, model.resourceRegionType()); + Assertions.assertEquals(TopicTypeProvisioningState.CREATING, model.provisioningState()); + Assertions.assertEquals("nmdvha", model.supportedLocations().get(0)); + Assertions.assertEquals("qswbqerzwx", model.sourceResourceFormat()); + Assertions.assertEquals(TopicTypeSourceScope.RESOURCE, model.supportedScopesForSource().get(0)); Assertions.assertTrue(model.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("dyjqu", model.additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertFalse(model.additionalEnforcedPermissions().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicTypeInfoInner model = new TopicTypeInfoInner().withProvider("carkuzlb") - .withDisplayName("ndtsnxawqytll") - .withDescription("yzm") - .withResourceRegionType(ResourceRegionType.REGIONAL_RESOURCE) - .withProvisioningState(TopicTypeProvisioningState.UPDATING) - .withSupportedLocations(Arrays.asList("xak", "kywymxgaabj")) - .withSourceResourceFormat("tfohf") - .withSupportedScopesForSource( - Arrays.asList(TopicTypeSourceScope.AZURE_SUBSCRIPTION, TopicTypeSourceScope.MANAGEMENT_GROUP, - TopicTypeSourceScope.RESOURCE_GROUP, TopicTypeSourceScope.RESOURCE)) - .withAreRegionalAndGlobalSourcesSupported(true) - .withAdditionalEnforcedPermissions(Arrays.asList( - new TopicTypeAdditionalEnforcedPermission().withPermissionName("dyjqu").withIsDataAction(false), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("rra").withIsDataAction(false), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("csuehogddac").withIsDataAction(true), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("ydl").withIsDataAction(false))); - model = BinaryData.fromObject(model).toObject(TopicTypeInfoInner.class); - Assertions.assertEquals("carkuzlb", model.provider()); - Assertions.assertEquals("ndtsnxawqytll", model.displayName()); - Assertions.assertEquals("yzm", model.description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, model.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("xak", model.supportedLocations().get(0)); - Assertions.assertEquals("tfohf", model.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.AZURE_SUBSCRIPTION, model.supportedScopesForSource().get(0)); - Assertions.assertTrue(model.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("dyjqu", model.additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertFalse(model.additionalEnforcedPermissions().get(0).isDataAction()); + Assertions.assertEquals("vlbpktgdstyou", model.additionalEnforcedPermissions().get(0).permissionName()); + Assertions.assertTrue(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 index baf388d883ca1..c2434dea81d11 100644 --- 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 @@ -1,67 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"swbnfddepldwqjns\",\"displayName\":\"ygleexa\",\"description\":\"mywhsb\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Updating\",\"supportedLocations\":[\"jjzyvoaqajuve\",\"zptdmkrrbh\",\"pfulube\",\"gybpmfb\"],\"sourceResourceFormat\":\"nunmpzkrv\",\"supportedScopesForSource\":[\"Resource\",\"ManagementGroup\",\"ManagementGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"vfictnkjjwgcwn\",\"isDataAction\":true},{\"permissionName\":\"gfyrtogmhmjpjsc\",\"isDataAction\":true},{\"permissionName\":\"qwtygevgwmseharx\",\"isDataAction\":true},{\"permissionName\":\"n\",\"isDataAction\":false}]}") + "{\"provider\":\"lz\",\"displayName\":\"sygrijwa\",\"description\":\"fanraybfu\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Failed\",\"supportedLocations\":[\"ydgr\",\"ydkygywezskieca\",\"ygzmxieqvdsmak\"],\"sourceResourceFormat\":\"xq\",\"supportedScopesForSource\":[\"Resource\",\"AzureSubscription\"],\"areRegionalAndGlobalSourcesSupported\":true,\"additionalEnforcedPermissions\":[{\"permissionName\":\"xawoijpodtblxp\",\"isDataAction\":true},{\"permissionName\":\"djodqhy\",\"isDataAction\":false},{\"permissionName\":\"n\",\"isDataAction\":true},{\"permissionName\":\"hllizhceumoq\",\"isDataAction\":true}]}") .toObject(TopicTypeProperties.class); - Assertions.assertEquals("swbnfddepldwqjns", model.provider()); - Assertions.assertEquals("ygleexa", model.displayName()); - Assertions.assertEquals("mywhsb", model.description()); + Assertions.assertEquals("lz", model.provider()); + Assertions.assertEquals("sygrijwa", model.displayName()); + Assertions.assertEquals("fanraybfu", model.description()); Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, model.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("jjzyvoaqajuve", model.supportedLocations().get(0)); - Assertions.assertEquals("nunmpzkrv", model.sourceResourceFormat()); + Assertions.assertEquals(TopicTypeProvisioningState.FAILED, model.provisioningState()); + Assertions.assertEquals("ydgr", model.supportedLocations().get(0)); + Assertions.assertEquals("xq", model.sourceResourceFormat()); Assertions.assertEquals(TopicTypeSourceScope.RESOURCE, model.supportedScopesForSource().get(0)); - Assertions.assertFalse(model.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("vfictnkjjwgcwn", model.additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertTrue(model.additionalEnforcedPermissions().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicTypeProperties model = new TopicTypeProperties().withProvider("swbnfddepldwqjns") - .withDisplayName("ygleexa") - .withDescription("mywhsb") - .withResourceRegionType(ResourceRegionType.GLOBAL_RESOURCE) - .withProvisioningState(TopicTypeProvisioningState.UPDATING) - .withSupportedLocations(Arrays.asList("jjzyvoaqajuve", "zptdmkrrbh", "pfulube", "gybpmfb")) - .withSourceResourceFormat("nunmpzkrv") - .withSupportedScopesForSource(Arrays.asList(TopicTypeSourceScope.RESOURCE, - TopicTypeSourceScope.MANAGEMENT_GROUP, TopicTypeSourceScope.MANAGEMENT_GROUP)) - .withAreRegionalAndGlobalSourcesSupported(false) - .withAdditionalEnforcedPermissions(Arrays.asList( - new TopicTypeAdditionalEnforcedPermission().withPermissionName("vfictnkjjwgcwn").withIsDataAction(true), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("gfyrtogmhmjpjsc") - .withIsDataAction(true), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("qwtygevgwmseharx") - .withIsDataAction(true), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("n").withIsDataAction(false))); - model = BinaryData.fromObject(model).toObject(TopicTypeProperties.class); - Assertions.assertEquals("swbnfddepldwqjns", model.provider()); - Assertions.assertEquals("ygleexa", model.displayName()); - Assertions.assertEquals("mywhsb", model.description()); - Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, model.resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.UPDATING, model.provisioningState()); - Assertions.assertEquals("jjzyvoaqajuve", model.supportedLocations().get(0)); - Assertions.assertEquals("nunmpzkrv", model.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.RESOURCE, model.supportedScopesForSource().get(0)); - Assertions.assertFalse(model.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("vfictnkjjwgcwn", model.additionalEnforcedPermissions().get(0).permissionName()); + Assertions.assertTrue(model.areRegionalAndGlobalSourcesSupported()); + Assertions.assertEquals("xawoijpodtblxp", model.additionalEnforcedPermissions().get(0).permissionName()); Assertions.assertTrue(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 index b9a42deaed540..a02a9db1354f1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -24,7 +24,7 @@ public final class TopicTypesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provider\":\"odqxxpqhm\",\"displayName\":\"ibtblmcvrjazno\",\"description\":\"ofqvpbqsdq\",\"resourceRegionType\":\"RegionalResource\",\"provisioningState\":\"Failed\",\"supportedLocations\":[\"bmitaftazgcxsvq\",\"cqufylam\",\"ow\"],\"sourceResourceFormat\":\"cjoyutehlkarvt\",\"supportedScopesForSource\":[\"ManagementGroup\",\"ManagementGroup\"],\"areRegionalAndGlobalSourcesSupported\":true,\"additionalEnforcedPermissions\":[{\"permissionName\":\"sgofunswhpce\",\"isDataAction\":false}]},\"id\":\"vmfnnbbxn\",\"name\":\"dfkkedeetxtpwcv\",\"type\":\"i\"}"; + = "{\"properties\":{\"provider\":\"ubfonfdbgmkf\",\"displayName\":\"jcw\",\"description\":\"wfhxwyrkbre\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Failed\",\"supportedLocations\":[\"pcha\"],\"sourceResourceFormat\":\"aep\",\"supportedScopesForSource\":[\"Resource\",\"AzureSubscription\"],\"areRegionalAndGlobalSourcesSupported\":true,\"additionalEnforcedPermissions\":[{\"permissionName\":\"wevtjrieikmwla\",\"isDataAction\":false},{\"permissionName\":\"ni\",\"isDataAction\":true},{\"permissionName\":\"ucb\",\"isDataAction\":false},{\"permissionName\":\"dscnns\",\"isDataAction\":true}]},\"id\":\"yuvtz\",\"name\":\"xzhclec\",\"type\":\"wtzqzcloyhy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,18 +34,18 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TopicTypeInfo response - = manager.topicTypes().getWithResponse("ziizmeqmdu", com.azure.core.util.Context.NONE).getValue(); + = manager.topicTypes().getWithResponse("hpzihacenqqzlx", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("odqxxpqhm", response.provider()); - Assertions.assertEquals("ibtblmcvrjazno", response.displayName()); - Assertions.assertEquals("ofqvpbqsdq", response.description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, response.resourceRegionType()); + Assertions.assertEquals("ubfonfdbgmkf", response.provider()); + Assertions.assertEquals("jcw", response.displayName()); + Assertions.assertEquals("wfhxwyrkbre", response.description()); + Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, response.resourceRegionType()); Assertions.assertEquals(TopicTypeProvisioningState.FAILED, response.provisioningState()); - Assertions.assertEquals("bmitaftazgcxsvq", response.supportedLocations().get(0)); - Assertions.assertEquals("cjoyutehlkarvt", response.sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.MANAGEMENT_GROUP, response.supportedScopesForSource().get(0)); + Assertions.assertEquals("pcha", response.supportedLocations().get(0)); + Assertions.assertEquals("aep", response.sourceResourceFormat()); + Assertions.assertEquals(TopicTypeSourceScope.RESOURCE, response.supportedScopesForSource().get(0)); Assertions.assertTrue(response.areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("sgofunswhpce", response.additionalEnforcedPermissions().get(0).permissionName()); + Assertions.assertEquals("wevtjrieikmwla", response.additionalEnforcedPermissions().get(0).permissionName()); Assertions.assertFalse(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 index 0f10683f8b064..e07b3b1238e0e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class TopicTypesListEventTypesMockTests { @Test public void testListEventTypes() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"onbz\",\"description\":\"nfzyviiwsuanz\",\"schemaUrl\":\"syuifkzqqhbtflo\",\"isInDefaultSet\":true},\"id\":\"kfbeoi\",\"name\":\"pjpngvyvuo\",\"type\":\"kdlpsxntugfwim\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"jesyl\",\"description\":\"urbqfygpn\",\"schemaUrl\":\"gdz\",\"isInDefaultSet\":false},\"id\":\"a\",\"name\":\"qyvoupr\",\"type\":\"y\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testListEventTypes() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.topicTypes().listEventTypes("wsunjzijaciwmmpd", com.azure.core.util.Context.NONE); + = manager.topicTypes().listEventTypes("gbmxldjmz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("onbz", response.iterator().next().displayName()); - Assertions.assertEquals("nfzyviiwsuanz", response.iterator().next().description()); - Assertions.assertEquals("syuifkzqqhbtflo", response.iterator().next().schemaUrl()); - Assertions.assertTrue(response.iterator().next().isInDefaultSet()); + Assertions.assertEquals("jesyl", response.iterator().next().displayName()); + Assertions.assertEquals("urbqfygpn", response.iterator().next().description()); + Assertions.assertEquals("gdz", response.iterator().next().schemaUrl()); + Assertions.assertFalse(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 index c4f4393797d55..96693b7c4ca26 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -25,7 +25,7 @@ public final class TopicTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provider\":\"whgjsmbcsl\",\"displayName\":\"gsabdgdheronsdu\",\"description\":\"kzvzuatqhgzuyxtr\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Failed\",\"supportedLocations\":[\"gqj\",\"vitp\",\"pvsffavdhpiwrm\",\"wkgjwb\"],\"sourceResourceFormat\":\"dwfbwxy\",\"supportedScopesForSource\":[\"ManagementGroup\"],\"areRegionalAndGlobalSourcesSupported\":true,\"additionalEnforcedPermissions\":[{\"permissionName\":\"drmegajrzc\",\"isDataAction\":true},{\"permissionName\":\"zskwqk\",\"isDataAction\":false},{\"permissionName\":\"eiphgliupqs\",\"isDataAction\":true}]},\"id\":\"bkjlcaxsqcomji\",\"name\":\"i\",\"type\":\"ncevxxkdevpxi\"}]}"; + = "{\"value\":[{\"properties\":{\"provider\":\"idhz\",\"displayName\":\"re\",\"description\":\"zsdtm\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Canceled\",\"supportedLocations\":[\"lb\",\"hychakvyrfbqvum\"],\"sourceResourceFormat\":\"qj\",\"supportedScopesForSource\":[\"ManagementGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"nzlpqmpftxefvu\",\"isDataAction\":false},{\"permissionName\":\"rtux\",\"isDataAction\":true}]},\"id\":\"fcaeooifqdyw\",\"name\":\"flobhahq\",\"type\":\"omfecorkfro\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,18 +36,18 @@ public void testList() throws Exception { PagedIterable response = manager.topicTypes().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("whgjsmbcsl", response.iterator().next().provider()); - Assertions.assertEquals("gsabdgdheronsdu", response.iterator().next().displayName()); - Assertions.assertEquals("kzvzuatqhgzuyxtr", response.iterator().next().description()); + Assertions.assertEquals("idhz", response.iterator().next().provider()); + Assertions.assertEquals("re", response.iterator().next().displayName()); + Assertions.assertEquals("zsdtm", response.iterator().next().description()); Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, response.iterator().next().resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.FAILED, response.iterator().next().provisioningState()); - Assertions.assertEquals("gqj", response.iterator().next().supportedLocations().get(0)); - Assertions.assertEquals("dwfbwxy", response.iterator().next().sourceResourceFormat()); + Assertions.assertEquals(TopicTypeProvisioningState.CANCELED, response.iterator().next().provisioningState()); + Assertions.assertEquals("lb", response.iterator().next().supportedLocations().get(0)); + Assertions.assertEquals("qj", response.iterator().next().sourceResourceFormat()); Assertions.assertEquals(TopicTypeSourceScope.MANAGEMENT_GROUP, response.iterator().next().supportedScopesForSource().get(0)); - Assertions.assertTrue(response.iterator().next().areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("drmegajrzc", + Assertions.assertFalse(response.iterator().next().areRegionalAndGlobalSourcesSupported()); + Assertions.assertEquals("nzlpqmpftxefvu", response.iterator().next().additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertTrue(response.iterator().next().additionalEnforcedPermissions().get(0).isDataAction()); + Assertions.assertFalse(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 index 44f011f64c269..d34fc847f30c7 100644 --- 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 @@ -1,105 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.TopicTypesListResult; import com.azure.resourcemanager.eventgrid.models.ResourceRegionType; -import com.azure.resourcemanager.eventgrid.models.TopicTypeAdditionalEnforcedPermission; import com.azure.resourcemanager.eventgrid.models.TopicTypeProvisioningState; import com.azure.resourcemanager.eventgrid.models.TopicTypeSourceScope; -import com.azure.resourcemanager.eventgrid.models.TopicTypesListResult; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class TopicTypesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TopicTypesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provider\":\"ui\",\"displayName\":\"ri\",\"description\":\"ohykfkxbbcbrw\",\"resourceRegionType\":\"RegionalResource\",\"provisioningState\":\"Failed\",\"supportedLocations\":[\"izbeew\",\"iy\"],\"sourceResourceFormat\":\"vzbjuyrsrzi\",\"supportedScopesForSource\":[\"ManagementGroup\",\"ManagementGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"ifrevk\",\"isDataAction\":false}]},\"id\":\"ezkiswqjmdghsypa\",\"name\":\"ybjufptb\",\"type\":\"czjnc\"},{\"properties\":{\"provider\":\"yqv\",\"displayName\":\"aswvppis\",\"description\":\"zlgcndhzxrrf\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Succeeded\",\"supportedLocations\":[\"gsnxuw\",\"kpphefsbzx\",\"bzxomeik\"],\"sourceResourceFormat\":\"lwzacn\",\"supportedScopesForSource\":[\"ManagementGroup\",\"AzureSubscription\",\"ManagementGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"yqbxyxoyf\",\"isDataAction\":false},{\"permissionName\":\"iqezxlhdj\",\"isDataAction\":true},{\"permissionName\":\"a\",\"isDataAction\":true}]},\"id\":\"psozjiihj\",\"name\":\"iybmrzoep\",\"type\":\"xwdvwnj\"},{\"properties\":{\"provider\":\"fnmxa\",\"displayName\":\"sqftibtyibuyvp\",\"description\":\"fqjpnqno\",\"resourceRegionType\":\"RegionalResource\",\"provisioningState\":\"Failed\",\"supportedLocations\":[\"nrexkxbhxv\"],\"sourceResourceFormat\":\"nul\",\"supportedScopesForSource\":[\"ResourceGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"znfaj\",\"isDataAction\":true},{\"permissionName\":\"kmq\",\"isDataAction\":true},{\"permissionName\":\"ivyhjrliizjixlqf\",\"isDataAction\":false}]},\"id\":\"kwabsolronqq\",\"name\":\"mgnlqxsjxtel\",\"type\":\"xhvuqbozool\"}]}") + "{\"value\":[{\"properties\":{\"provider\":\"tlu\",\"displayName\":\"adswz\",\"description\":\"uyem\",\"resourceRegionType\":\"GlobalResource\",\"provisioningState\":\"Deleting\",\"supportedLocations\":[\"lxlnwyrmo\",\"vblgmokzk\",\"trfowtdvr\"],\"sourceResourceFormat\":\"vlihcvjd\",\"supportedScopesForSource\":[\"ManagementGroup\",\"ResourceGroup\",\"ResourceGroup\"],\"areRegionalAndGlobalSourcesSupported\":false,\"additionalEnforcedPermissions\":[{\"permissionName\":\"kvhd\",\"isDataAction\":true}]},\"id\":\"ojbf\",\"name\":\"zd\",\"type\":\"fnjyix\"}],\"nextLink\":\"fratqxmbjroumzz\"}") .toObject(TopicTypesListResult.class); - Assertions.assertEquals("ui", model.value().get(0).provider()); - Assertions.assertEquals("ri", model.value().get(0).displayName()); - Assertions.assertEquals("ohykfkxbbcbrw", model.value().get(0).description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, model.value().get(0).resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.FAILED, model.value().get(0).provisioningState()); - Assertions.assertEquals("izbeew", model.value().get(0).supportedLocations().get(0)); - Assertions.assertEquals("vzbjuyrsrzi", model.value().get(0).sourceResourceFormat()); + Assertions.assertEquals("tlu", model.value().get(0).provider()); + Assertions.assertEquals("adswz", model.value().get(0).displayName()); + Assertions.assertEquals("uyem", model.value().get(0).description()); + Assertions.assertEquals(ResourceRegionType.GLOBAL_RESOURCE, model.value().get(0).resourceRegionType()); + Assertions.assertEquals(TopicTypeProvisioningState.DELETING, model.value().get(0).provisioningState()); + Assertions.assertEquals("lxlnwyrmo", model.value().get(0).supportedLocations().get(0)); + Assertions.assertEquals("vlihcvjd", model.value().get(0).sourceResourceFormat()); Assertions.assertEquals(TopicTypeSourceScope.MANAGEMENT_GROUP, model.value().get(0).supportedScopesForSource().get(0)); Assertions.assertFalse(model.value().get(0).areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("ifrevk", model.value().get(0).additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertFalse(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("ui") - .withDisplayName("ri") - .withDescription("ohykfkxbbcbrw") - .withResourceRegionType(ResourceRegionType.REGIONAL_RESOURCE) - .withProvisioningState(TopicTypeProvisioningState.FAILED) - .withSupportedLocations(Arrays.asList("izbeew", "iy")) - .withSourceResourceFormat("vzbjuyrsrzi") - .withSupportedScopesForSource(Arrays - .asList(TopicTypeSourceScope.MANAGEMENT_GROUP, TopicTypeSourceScope.MANAGEMENT_GROUP)) - .withAreRegionalAndGlobalSourcesSupported(false) - .withAdditionalEnforcedPermissions( - Arrays.asList(new TopicTypeAdditionalEnforcedPermission() - .withPermissionName("ifrevk") - .withIsDataAction(false))), - new TopicTypeInfoInner().withProvider("yqv") - .withDisplayName("aswvppis") - .withDescription("zlgcndhzxrrf") - .withResourceRegionType(ResourceRegionType.GLOBAL_RESOURCE) - .withProvisioningState(TopicTypeProvisioningState.SUCCEEDED) - .withSupportedLocations(Arrays.asList("gsnxuw", "kpphefsbzx", "bzxomeik")) - .withSourceResourceFormat("lwzacn") - .withSupportedScopesForSource(Arrays.asList(TopicTypeSourceScope.MANAGEMENT_GROUP, - TopicTypeSourceScope.AZURE_SUBSCRIPTION, TopicTypeSourceScope.MANAGEMENT_GROUP)) - .withAreRegionalAndGlobalSourcesSupported(false) - .withAdditionalEnforcedPermissions(Arrays.asList( - new TopicTypeAdditionalEnforcedPermission().withPermissionName("yqbxyxoyf") - .withIsDataAction(false), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("iqezxlhdj") - .withIsDataAction(true), - new TopicTypeAdditionalEnforcedPermission() - .withPermissionName("a") - .withIsDataAction(true))), - new TopicTypeInfoInner().withProvider("fnmxa") - .withDisplayName("sqftibtyibuyvp") - .withDescription("fqjpnqno") - .withResourceRegionType(ResourceRegionType.REGIONAL_RESOURCE) - .withProvisioningState(TopicTypeProvisioningState.FAILED) - .withSupportedLocations(Arrays.asList("nrexkxbhxv")) - .withSourceResourceFormat("nul") - .withSupportedScopesForSource(Arrays.asList(TopicTypeSourceScope.RESOURCE_GROUP)) - .withAreRegionalAndGlobalSourcesSupported(false) - .withAdditionalEnforcedPermissions(Arrays.asList( - new TopicTypeAdditionalEnforcedPermission().withPermissionName("znfaj") - .withIsDataAction(true), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("kmq") - .withIsDataAction(true), - new TopicTypeAdditionalEnforcedPermission().withPermissionName("ivyhjrliizjixlqf") - .withIsDataAction(false))))); - model = BinaryData.fromObject(model).toObject(TopicTypesListResult.class); - Assertions.assertEquals("ui", model.value().get(0).provider()); - Assertions.assertEquals("ri", model.value().get(0).displayName()); - Assertions.assertEquals("ohykfkxbbcbrw", model.value().get(0).description()); - Assertions.assertEquals(ResourceRegionType.REGIONAL_RESOURCE, model.value().get(0).resourceRegionType()); - Assertions.assertEquals(TopicTypeProvisioningState.FAILED, model.value().get(0).provisioningState()); - Assertions.assertEquals("izbeew", model.value().get(0).supportedLocations().get(0)); - Assertions.assertEquals("vzbjuyrsrzi", model.value().get(0).sourceResourceFormat()); - Assertions.assertEquals(TopicTypeSourceScope.MANAGEMENT_GROUP, - model.value().get(0).supportedScopesForSource().get(0)); - Assertions.assertFalse(model.value().get(0).areRegionalAndGlobalSourcesSupported()); - Assertions.assertEquals("ifrevk", model.value().get(0).additionalEnforcedPermissions().get(0).permissionName()); - Assertions.assertFalse(model.value().get(0).additionalEnforcedPermissions().get(0).isDataAction()); + Assertions.assertEquals("kvhd", model.value().get(0).additionalEnforcedPermissions().get(0).permissionName()); + Assertions.assertTrue(model.value().get(0).additionalEnforcedPermissions().get(0).isDataAction()); + Assertions.assertEquals("fratqxmbjroumzz", model.nextLink()); } } 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 index 06a021a001490..c59903106c1f5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -23,47 +23,61 @@ public final class TopicUpdateParameterPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TopicUpdateParameterProperties model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"jb\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.0\",\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"myw\":{\"description\":\"w\",\"displayName\":\"uatbwbqamteuliy\",\"documentationUrl\":\"pkcvmwf\",\"dataSchemaUrl\":\"xxe\"}}}}") + "{\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"uhqawmoaianc\",\"action\":\"Allow\"},{\"ipMask\":\"drrslblxydk\",\"action\":\"Allow\"},{\"ipMask\":\"vbxiwkgfbqlj\",\"action\":\"Allow\"},{\"ipMask\":\"ychocokulehu\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.1\",\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinRegion\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"jjk\":{\"description\":\"hy\",\"displayName\":\"xra\",\"documentationUrl\":\"uqd\",\"dataSchemaUrl\":\"xmrgchbapxkiy\"},\"kyxl\":{\"description\":\"jbuscg\",\"displayName\":\"u\",\"documentationUrl\":\"oycblevpmc\",\"dataSchemaUrl\":\"jy\"},\"tptnuwjtk\":{\"description\":\"sjgkzzltafh\",\"displayName\":\"ffovwmbjlzqsczp\",\"documentationUrl\":\"dwnapf\",\"dataSchemaUrl\":\"wow\"}}}}") .toObject(TopicUpdateParameterProperties.class); Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("jb", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("uhqawmoaianc", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); + Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); Assertions.assertFalse(model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); + Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, model.dataResidencyBoundary()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("w", model.eventTypeInfo().inlineEventTypes().get("myw").description()); - Assertions.assertEquals("uatbwbqamteuliy", model.eventTypeInfo().inlineEventTypes().get("myw").displayName()); - Assertions.assertEquals("pkcvmwf", model.eventTypeInfo().inlineEventTypes().get("myw").documentationUrl()); - Assertions.assertEquals("xxe", model.eventTypeInfo().inlineEventTypes().get("myw").dataSchemaUrl()); + Assertions.assertEquals("hy", model.eventTypeInfo().inlineEventTypes().get("jjk").description()); + Assertions.assertEquals("xra", model.eventTypeInfo().inlineEventTypes().get("jjk").displayName()); + Assertions.assertEquals("uqd", model.eventTypeInfo().inlineEventTypes().get("jjk").documentationUrl()); + Assertions.assertEquals("xmrgchbapxkiy", model.eventTypeInfo().inlineEventTypes().get("jjk").dataSchemaUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TopicUpdateParameterProperties model = new TopicUpdateParameterProperties().withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("jb").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) + .withInboundIpRules( + Arrays.asList(new InboundIpRule().withIpMask("uhqawmoaianc").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("drrslblxydk").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("vbxiwkgfbqlj").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("ychocokulehu").withAction(IpActionType.ALLOW))) + .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) .withDisableLocalAuth(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR) + .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION) .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("myw", - new InlineEventProperties().withDescription("w") - .withDisplayName("uatbwbqamteuliy") - .withDocumentationUrl("pkcvmwf") - .withDataSchemaUrl("xxe")))); + .withInlineEventTypes(mapOf("jjk", + new InlineEventProperties().withDescription("hy") + .withDisplayName("xra") + .withDocumentationUrl("uqd") + .withDataSchemaUrl("xmrgchbapxkiy"), + "kyxl", + new InlineEventProperties().withDescription("jbuscg") + .withDisplayName("u") + .withDocumentationUrl("oycblevpmc") + .withDataSchemaUrl("jy"), + "tptnuwjtk", + new InlineEventProperties().withDescription("sjgkzzltafh") + .withDisplayName("ffovwmbjlzqsczp") + .withDocumentationUrl("dwnapf") + .withDataSchemaUrl("wow")))); model = BinaryData.fromObject(model).toObject(TopicUpdateParameterProperties.class); Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("jb", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("uhqawmoaianc", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersionAllowed()); + Assertions.assertEquals(TlsVersion.ONE_ONE, model.minimumTlsVersionAllowed()); Assertions.assertFalse(model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); + Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, model.dataResidencyBoundary()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("w", model.eventTypeInfo().inlineEventTypes().get("myw").description()); - Assertions.assertEquals("uatbwbqamteuliy", model.eventTypeInfo().inlineEventTypes().get("myw").displayName()); - Assertions.assertEquals("pkcvmwf", model.eventTypeInfo().inlineEventTypes().get("myw").documentationUrl()); - Assertions.assertEquals("xxe", model.eventTypeInfo().inlineEventTypes().get("myw").dataSchemaUrl()); + Assertions.assertEquals("hy", model.eventTypeInfo().inlineEventTypes().get("jjk").description()); + Assertions.assertEquals("xra", model.eventTypeInfo().inlineEventTypes().get("jjk").displayName()); + Assertions.assertEquals("uqd", model.eventTypeInfo().inlineEventTypes().get("jjk").documentationUrl()); + Assertions.assertEquals("xmrgchbapxkiy", model.eventTypeInfo().inlineEventTypes().get("jjk").dataSchemaUrl()); } // Use "Map.of" if available 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 index 5089ec72f3c3d..2950087e2fb27 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -28,99 +28,88 @@ public final class TopicUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TopicUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"lkvec\":\"gpszngafpg\",\"dyedmzrgjfo\":\"ujcngo\",\"oitpkpztrgdgx\":\"nub\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"aswugyxpqitw\",\"tenantId\":\"alwvskbu\",\"userAssignedIdentities\":{\"jpds\":{\"principalId\":\"aq\",\"clientId\":\"ltcoqc\"},\"ofqcvovjufycsjm\":{\"principalId\":\"akuejk\",\"clientId\":\"bizt\"},\"riuxegthortuda\":{\"principalId\":\"e\",\"clientId\":\"ej\"},\"bgqnz\":{\"principalId\":\"pjfe\",\"clientId\":\"erppt\"}}},\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"alwcjgckbb\",\"action\":\"Allow\"},{\"ipMask\":\"zpraoxn\",\"action\":\"Allow\"},{\"ipMask\":\"a\",\"action\":\"Allow\"},{\"ipMask\":\"tipwcxbyubhiqd\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.2\",\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinGeopair\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"aovurexdndsbdwe\":{\"description\":\"uhiigbyl\",\"displayName\":\"igvxvatvcrk\",\"documentationUrl\":\"b\",\"dataSchemaUrl\":\"qxvhcsyhzlwxa\"},\"xitp\":{\"description\":\"e\",\"displayName\":\"mwntopagttmvmma\",\"documentationUrl\":\"aqylkjztji\",\"dataSchemaUrl\":\"zjcg\"},\"lyujlfyoump\":{\"description\":\"nzcpdltkr\",\"displayName\":\"jmtbd\",\"documentationUrl\":\"cqguef\",\"dataSchemaUrl\":\"ompheqdur\"},\"jc\":{\"description\":\"yec\",\"displayName\":\"digp\",\"documentationUrl\":\"jbrzmqxucyc\",\"dataSchemaUrl\":\"oclxiut\"}}}},\"sku\":{\"name\":\"Basic\"}}") + "{\"tags\":{\"ot\":\"hcoeocnhzq\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"yjzp\",\"tenantId\":\"rl\",\"userAssignedIdentities\":{\"jb\":{\"principalId\":\"qinfszpyglqd\",\"clientId\":\"rjzralcx\"},\"vsqxfxjelgcmpzqj\":{\"principalId\":\"psjoqcjenk\",\"clientId\":\"fq\"}}},\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"yvca\",\"action\":\"Allow\"},{\"ipMask\":\"i\",\"action\":\"Allow\"},{\"ipMask\":\"zusjsz\",\"action\":\"Allow\"}],\"minimumTlsVersionAllowed\":\"1.3\",\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinRegion\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"hmupgxyjtcdxabbu\":{\"description\":\"gmvflnwyvqkx\",\"displayName\":\"rlniyl\",\"documentationUrl\":\"yfw\",\"dataSchemaUrl\":\"utgqztwh\"},\"gpbemeluclvdjju\":{\"description\":\"tabenbbk\",\"displayName\":\"pxzuca\",\"documentationUrl\":\"ddwwnlzafwxudgnh\",\"dataSchemaUrl\":\"okrtalvnb\"},\"xptlghwzho\":{\"description\":\"rdnqodxahhxhqf\",\"displayName\":\"nvzoqgyipemch\",\"documentationUrl\":\"v\",\"dataSchemaUrl\":\"zuejd\"}}}},\"sku\":{\"name\":\"Premium\"}}") .toObject(TopicUpdateParameters.class); - Assertions.assertEquals("gpszngafpg", model.tags().get("lkvec")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("aswugyxpqitw", model.identity().principalId()); - Assertions.assertEquals("alwvskbu", model.identity().tenantId()); - Assertions.assertEquals("aq", model.identity().userAssignedIdentities().get("jpds").principalId()); - Assertions.assertEquals("ltcoqc", model.identity().userAssignedIdentities().get("jpds").clientId()); - Assertions.assertEquals(Sku.BASIC, model.sku().name()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("alwcjgckbb", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("hcoeocnhzq", model.tags().get("ot")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("yjzp", model.identity().principalId()); + Assertions.assertEquals("rl", model.identity().tenantId()); + Assertions.assertEquals("qinfszpyglqd", model.identity().userAssignedIdentities().get("jb").principalId()); + Assertions.assertEquals("rjzralcx", model.identity().userAssignedIdentities().get("jb").clientId()); + Assertions.assertEquals(Sku.PREMIUM, model.sku().name()); + Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); + Assertions.assertEquals("yvca", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); + Assertions.assertEquals(TlsVersion.ONE_THREE, model.minimumTlsVersionAllowed()); Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); + Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, model.dataResidencyBoundary()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("uhiigbyl", - model.eventTypeInfo().inlineEventTypes().get("aovurexdndsbdwe").description()); - Assertions.assertEquals("igvxvatvcrk", - model.eventTypeInfo().inlineEventTypes().get("aovurexdndsbdwe").displayName()); - Assertions.assertEquals("b", - model.eventTypeInfo().inlineEventTypes().get("aovurexdndsbdwe").documentationUrl()); - Assertions.assertEquals("qxvhcsyhzlwxa", - model.eventTypeInfo().inlineEventTypes().get("aovurexdndsbdwe").dataSchemaUrl()); + Assertions.assertEquals("gmvflnwyvqkx", + model.eventTypeInfo().inlineEventTypes().get("hmupgxyjtcdxabbu").description()); + Assertions.assertEquals("rlniyl", + model.eventTypeInfo().inlineEventTypes().get("hmupgxyjtcdxabbu").displayName()); + Assertions.assertEquals("yfw", + model.eventTypeInfo().inlineEventTypes().get("hmupgxyjtcdxabbu").documentationUrl()); + Assertions.assertEquals("utgqztwh", + model.eventTypeInfo().inlineEventTypes().get("hmupgxyjtcdxabbu").dataSchemaUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TopicUpdateParameters model - = new TopicUpdateParameters() - .withTags(mapOf("lkvec", "gpszngafpg", "dyedmzrgjfo", "ujcngo", "oitpkpztrgdgx", "nub")) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("aswugyxpqitw") - .withTenantId("alwvskbu") - .withUserAssignedIdentities(mapOf("jpds", - new UserIdentityProperties().withPrincipalId("aq").withClientId("ltcoqc"), "ofqcvovjufycsjm", - new UserIdentityProperties().withPrincipalId("akuejk").withClientId("bizt"), "riuxegthortuda", - new UserIdentityProperties().withPrincipalId("e").withClientId("ej"), "bgqnz", - new UserIdentityProperties().withPrincipalId("pjfe").withClientId("erppt")))) - .withSku(new ResourceSku().withName(Sku.BASIC)) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("alwcjgckbb").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("zpraoxn").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("a").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("tipwcxbyubhiqd").withAction(IpActionType.ALLOW))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("aovurexdndsbdwe", - new InlineEventProperties().withDescription("uhiigbyl") - .withDisplayName("igvxvatvcrk") - .withDocumentationUrl("b") - .withDataSchemaUrl("qxvhcsyhzlwxa"), - "xitp", - new InlineEventProperties().withDescription("e") - .withDisplayName("mwntopagttmvmma") - .withDocumentationUrl("aqylkjztji") - .withDataSchemaUrl("zjcg"), - "lyujlfyoump", - new InlineEventProperties().withDescription("nzcpdltkr") - .withDisplayName("jmtbd") - .withDocumentationUrl("cqguef") - .withDataSchemaUrl("ompheqdur"), - "jc", - new InlineEventProperties().withDescription("yec") - .withDisplayName("digp") - .withDocumentationUrl("jbrzmqxucyc") - .withDataSchemaUrl("oclxiut")))); + TopicUpdateParameters model = new TopicUpdateParameters().withTags(mapOf("ot", "hcoeocnhzq")) + .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED) + .withPrincipalId("yjzp") + .withTenantId("rl") + .withUserAssignedIdentities(mapOf("jb", + new UserIdentityProperties().withPrincipalId("qinfszpyglqd").withClientId("rjzralcx"), + "vsqxfxjelgcmpzqj", new UserIdentityProperties().withPrincipalId("psjoqcjenk").withClientId("fq")))) + .withSku(new ResourceSku().withName(Sku.PREMIUM)) + .withPublicNetworkAccess(PublicNetworkAccess.SECURED_BY_PERIMETER) + .withInboundIpRules(Arrays.asList(new InboundIpRule().withIpMask("yvca").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("i").withAction(IpActionType.ALLOW), + new InboundIpRule().withIpMask("zusjsz").withAction(IpActionType.ALLOW))) + .withMinimumTlsVersionAllowed(TlsVersion.ONE_THREE) + .withDisableLocalAuth(true) + .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION) + .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) + .withInlineEventTypes(mapOf("hmupgxyjtcdxabbu", + new InlineEventProperties().withDescription("gmvflnwyvqkx") + .withDisplayName("rlniyl") + .withDocumentationUrl("yfw") + .withDataSchemaUrl("utgqztwh"), + "gpbemeluclvdjju", + new InlineEventProperties().withDescription("tabenbbk") + .withDisplayName("pxzuca") + .withDocumentationUrl("ddwwnlzafwxudgnh") + .withDataSchemaUrl("okrtalvnb"), + "xptlghwzho", + new InlineEventProperties().withDescription("rdnqodxahhxhqf") + .withDisplayName("nvzoqgyipemch") + .withDocumentationUrl("v") + .withDataSchemaUrl("zuejd")))); model = BinaryData.fromObject(model).toObject(TopicUpdateParameters.class); - Assertions.assertEquals("gpszngafpg", model.tags().get("lkvec")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("aswugyxpqitw", model.identity().principalId()); - Assertions.assertEquals("alwvskbu", model.identity().tenantId()); - Assertions.assertEquals("aq", model.identity().userAssignedIdentities().get("jpds").principalId()); - Assertions.assertEquals("ltcoqc", model.identity().userAssignedIdentities().get("jpds").clientId()); - Assertions.assertEquals(Sku.BASIC, model.sku().name()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("alwcjgckbb", model.inboundIpRules().get(0).ipMask()); + Assertions.assertEquals("hcoeocnhzq", model.tags().get("ot")); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("yjzp", model.identity().principalId()); + Assertions.assertEquals("rl", model.identity().tenantId()); + Assertions.assertEquals("qinfszpyglqd", model.identity().userAssignedIdentities().get("jb").principalId()); + Assertions.assertEquals("rjzralcx", model.identity().userAssignedIdentities().get("jb").clientId()); + Assertions.assertEquals(Sku.PREMIUM, model.sku().name()); + Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, model.publicNetworkAccess()); + Assertions.assertEquals("yvca", model.inboundIpRules().get(0).ipMask()); Assertions.assertEquals(IpActionType.ALLOW, model.inboundIpRules().get(0).action()); - Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); + Assertions.assertEquals(TlsVersion.ONE_THREE, model.minimumTlsVersionAllowed()); Assertions.assertTrue(model.disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.dataResidencyBoundary()); + Assertions.assertEquals(DataResidencyBoundary.WITHIN_REGION, model.dataResidencyBoundary()); Assertions.assertEquals(EventDefinitionKind.INLINE, model.eventTypeInfo().kind()); - Assertions.assertEquals("uhiigbyl", - model.eventTypeInfo().inlineEventTypes().get("aovurexdndsbdwe").description()); - Assertions.assertEquals("igvxvatvcrk", - model.eventTypeInfo().inlineEventTypes().get("aovurexdndsbdwe").displayName()); - Assertions.assertEquals("b", - model.eventTypeInfo().inlineEventTypes().get("aovurexdndsbdwe").documentationUrl()); - Assertions.assertEquals("qxvhcsyhzlwxa", - model.eventTypeInfo().inlineEventTypes().get("aovurexdndsbdwe").dataSchemaUrl()); + Assertions.assertEquals("gmvflnwyvqkx", + model.eventTypeInfo().inlineEventTypes().get("hmupgxyjtcdxabbu").description()); + Assertions.assertEquals("rlniyl", + model.eventTypeInfo().inlineEventTypes().get("hmupgxyjtcdxabbu").displayName()); + Assertions.assertEquals("yfw", + model.eventTypeInfo().inlineEventTypes().get("hmupgxyjtcdxabbu").documentationUrl()); + Assertions.assertEquals("utgqztwh", + model.eventTypeInfo().inlineEventTypes().get("hmupgxyjtcdxabbu").dataSchemaUrl()); } // Use "Map.of" if available 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 index 77c386297dafe..274dfd6fc8787 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,55 +17,36 @@ public final class TopicsConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TopicsConfiguration model = BinaryData.fromString( - "{\"hostname\":\"t\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"rv\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"ib\"},\"certificateUrl\":\"gjio\",\"expectedTxtRecordName\":\"vrwxkv\",\"expectedTxtRecordValue\":\"k\"},{\"fullyQualifiedDomainName\":\"llqwjygvjayvblmh\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"vvyhg\"},\"certificateUrl\":\"pbyrqufegxu\",\"expectedTxtRecordName\":\"zfbn\",\"expectedTxtRecordValue\":\"mctlpdngitv\"},{\"fullyQualifiedDomainName\":\"bmhrixkwmyijejv\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"aixexccbdreaxh\"},\"certificateUrl\":\"xdrrvqahqkghtp\",\"expectedTxtRecordName\":\"jnhyjsvf\",\"expectedTxtRecordValue\":\"xzb\"},{\"fullyQualifiedDomainName\":\"voowvr\",\"validationState\":\"Approved\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"pyostronzmyhgfi\"},\"certificateUrl\":\"sxkm\",\"expectedTxtRecordName\":\"a\",\"expectedTxtRecordValue\":\"rrjreafxtsgu\"}]}") + "{\"hostname\":\"epgzgqexz\",\"customDomains\":[{\"fullyQualifiedDomainName\":\"xscpaierhhbc\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"jtjaodxobnbdxkq\"},\"certificateUrl\":\"okaj\",\"expectedTxtRecordName\":\"npime\",\"expectedTxtRecordValue\":\"stxgc\"}]}") .toObject(TopicsConfiguration.class); - Assertions.assertEquals("rv", model.customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.APPROVED, model.customDomains().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.customDomains().get(0).identity().type()); - Assertions.assertEquals("ib", model.customDomains().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("gjio", model.customDomains().get(0).certificateUrl()); - Assertions.assertEquals("vrwxkv", model.customDomains().get(0).expectedTxtRecordName()); - Assertions.assertEquals("k", model.customDomains().get(0).expectedTxtRecordValue()); + Assertions.assertEquals("xscpaierhhbc", model.customDomains().get(0).fullyQualifiedDomainName()); + Assertions.assertEquals(CustomDomainValidationState.PENDING, model.customDomains().get(0).validationState()); + Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, + model.customDomains().get(0).identity().type()); + Assertions.assertEquals("jtjaodxobnbdxkq", model.customDomains().get(0).identity().userAssignedIdentity()); + Assertions.assertEquals("okaj", model.customDomains().get(0).certificateUrl()); + Assertions.assertEquals("npime", model.customDomains().get(0).expectedTxtRecordName()); + Assertions.assertEquals("stxgc", 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("rv") - .withValidationState(CustomDomainValidationState.APPROVED) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("ib")) - .withCertificateUrl("gjio") - .withExpectedTxtRecordName("vrwxkv") - .withExpectedTxtRecordValue("k"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("llqwjygvjayvblmh") - .withValidationState(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD) + TopicsConfiguration model = new TopicsConfiguration().withCustomDomains( + Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("xscpaierhhbc") + .withValidationState(CustomDomainValidationState.PENDING) .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("vvyhg")) - .withCertificateUrl("pbyrqufegxu") - .withExpectedTxtRecordName("zfbn") - .withExpectedTxtRecordValue("mctlpdngitv"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("bmhrixkwmyijejv") - .withValidationState(CustomDomainValidationState.APPROVED) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("aixexccbdreaxh")) - .withCertificateUrl("xdrrvqahqkghtp") - .withExpectedTxtRecordName("jnhyjsvf") - .withExpectedTxtRecordValue("xzb"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("voowvr") - .withValidationState(CustomDomainValidationState.APPROVED) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("pyostronzmyhgfi")) - .withCertificateUrl("sxkm") - .withExpectedTxtRecordName("a") - .withExpectedTxtRecordValue("rrjreafxtsgu"))); + .withUserAssignedIdentity("jtjaodxobnbdxkq")) + .withCertificateUrl("okaj") + .withExpectedTxtRecordName("npime") + .withExpectedTxtRecordValue("stxgc"))); model = BinaryData.fromObject(model).toObject(TopicsConfiguration.class); - Assertions.assertEquals("rv", model.customDomains().get(0).fullyQualifiedDomainName()); - Assertions.assertEquals(CustomDomainValidationState.APPROVED, model.customDomains().get(0).validationState()); - Assertions.assertEquals(CustomDomainIdentityType.USER_ASSIGNED, model.customDomains().get(0).identity().type()); - Assertions.assertEquals("ib", model.customDomains().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("gjio", model.customDomains().get(0).certificateUrl()); - Assertions.assertEquals("vrwxkv", model.customDomains().get(0).expectedTxtRecordName()); - Assertions.assertEquals("k", model.customDomains().get(0).expectedTxtRecordValue()); + Assertions.assertEquals("xscpaierhhbc", model.customDomains().get(0).fullyQualifiedDomainName()); + Assertions.assertEquals(CustomDomainValidationState.PENDING, model.customDomains().get(0).validationState()); + Assertions.assertEquals(CustomDomainIdentityType.SYSTEM_ASSIGNED, + model.customDomains().get(0).identity().type()); + Assertions.assertEquals("jtjaodxobnbdxkq", model.customDomains().get(0).identity().userAssignedIdentity()); + Assertions.assertEquals("okaj", model.customDomains().get(0).certificateUrl()); + Assertions.assertEquals("npime", model.customDomains().get(0).expectedTxtRecordName()); + Assertions.assertEquals("stxgc", 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 e351d60569e1d..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.eventgrid.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":[\"hijzrqnjxmvv\",\"duydwnwgru\",\"hqld\",\"dym\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"i\",\"name\":\"xqwqnghxnim\",\"type\":\"yujrxgunnqgypuqt\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"e\",\"qmvyumgmmuebsnzn\",\"gsqufmjxcyo\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Canceled\"},\"id\":\"azisvbr\",\"name\":\"gcyjpgawepk\",\"type\":\"on\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"lrdt\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"xb\",\"name\":\"ibrv\",\"type\":\"ztaflvsmfj\"}],\"provisioningState\":\"Failed\",\"endpoint\":\"jcq\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"lvxgwzz\":{\"description\":\"mmfjew\",\"displayName\":\"q\",\"documentationUrl\":\"vdostwyg\",\"dataSchemaUrl\":\"mw\"},\"mdrwynb\":{\"description\":\"dtlcjgpvcqzv\",\"displayName\":\"b\",\"documentationUrl\":\"wx\",\"dataSchemaUrl\":\"xrmx\"},\"hpwbuklvsmfasgt\":{\"description\":\"vazoymdvh\",\"displayName\":\"lkhw\",\"documentationUrl\":\"katveqmgkcswzeyx\",\"dataSchemaUrl\":\"ear\"},\"pokjyghztm\":{\"description\":\"hqpoilosja\",\"displayName\":\"cez\",\"documentationUrl\":\"ft\",\"dataSchemaUrl\":\"l\"}}},\"minimumTlsVersionAllowed\":\"1.1\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"flcezs\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"tdjtvbfpfhru\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"wumxqukrcd\",\"tenantId\":\"hclqddnhfkne\",\"userAssignedIdentities\":{\"bqxfbb\":{\"principalId\":\"dpnyzcwyjsmkaql\",\"clientId\":\"abnwvpa\"}}},\"kind\":\"AzureArc\",\"extendedLocation\":{\"name\":\"dofxn\",\"type\":\"mjyyr\"},\"location\":\"edwovocytjg\",\"tags\":{\"hedb\":\"yokrwfmihwpa\",\"dczvothmkh\":\"o\",\"scmyhrhjvszf\":\"aozvbwfcnjhbpoel\"},\"id\":\"bokndwpppq\",\"name\":\"ojoevzzufytdx\",\"type\":\"lynzlyvap\"}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Topic response = manager.topics() - .getByResourceGroupWithResponse("tdqtdnnckkplj", "shvvfkdx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("edwovocytjg", response.location()); - Assertions.assertEquals("yokrwfmihwpa", response.tags().get("hedb")); - Assertions.assertEquals(Sku.PREMIUM, response.sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("wumxqukrcd", response.identity().principalId()); - Assertions.assertEquals("hclqddnhfkne", response.identity().tenantId()); - Assertions.assertEquals("dpnyzcwyjsmkaql", - response.identity().userAssignedIdentities().get("bqxfbb").principalId()); - Assertions.assertEquals("abnwvpa", response.identity().userAssignedIdentities().get("bqxfbb").clientId()); - Assertions.assertEquals(ResourceKind.AZURE_ARC, response.kind()); - Assertions.assertEquals("dofxn", response.extendedLocation().name()); - Assertions.assertEquals("mjyyr", response.extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.eventTypeInfo().kind()); - Assertions.assertEquals("mmfjew", response.eventTypeInfo().inlineEventTypes().get("lvxgwzz").description()); - Assertions.assertEquals("q", response.eventTypeInfo().inlineEventTypes().get("lvxgwzz").displayName()); - Assertions.assertEquals("vdostwyg", - response.eventTypeInfo().inlineEventTypes().get("lvxgwzz").documentationUrl()); - Assertions.assertEquals("mw", response.eventTypeInfo().inlineEventTypes().get("lvxgwzz").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("tdjtvbfpfhru", response.inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.inboundIpRules().get(0).action()); - Assertions.assertFalse(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 5cd797e0d64d3..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":[\"amqx\",\"cssanybzzghv\",\"fe\",\"myjsvcdhly\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"okj\",\"name\":\"nzxezriwgo\",\"type\":\"wapcqksaaapxjhc\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"nwsdfpv\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"lfrcqklpmvz\",\"name\":\"ireszyaqg\",\"type\":\"mlbmfggeokfe\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"wkyeahhhutpu\",\"nrfcqu\",\"m\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"inowrerjpxp\",\"name\":\"chdwyqqidqi\",\"type\":\"lgbbfjmdgjvxlh\"}],\"provisioningState\":\"Succeeded\",\"endpoint\":\"eftyaphqeofytl\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"vmufzgug\":{\"description\":\"mcqixuanccqvjf\",\"displayName\":\"fqpmquxpj\",\"documentationUrl\":\"faar\",\"dataSchemaUrl\":\"ci\"},\"wzmnobfewwpsibxo\":{\"description\":\"lwalaossnqe\",\"displayName\":\"otbptg\",\"documentationUrl\":\"manxx\",\"dataSchemaUrl\":\"qfmdqecvtam\"},\"sjdle\":{\"description\":\"qoqjrkblndy\",\"displayName\":\"wgycvtqnzjc\",\"documentationUrl\":\"qzhembtbw\",\"dataSchemaUrl\":\"lbadp\"},\"rgdqyxaj\":{\"description\":\"vmvvlooubsfxip\",\"displayName\":\"opskgocjomlupfa\",\"documentationUrl\":\"sj\",\"dataSchemaUrl\":\"huslgdw\"}}},\"minimumTlsVersionAllowed\":\"1.1\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"qcw\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"mqcwwsjnkiixepbn\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"fejsewrznequqynt\",\"tenantId\":\"knhajksbsyogjm\",\"userAssignedIdentities\":{\"xtdlxwmvcdkucp\":{\"principalId\":\"cydi\",\"clientId\":\"mcvjbssfcriqxz\"},\"jseml\":{\"principalId\":\"yafrwr\",\"clientId\":\"rogeuvmkrspnr\"},\"pmw\":{\"principalId\":\"frsnqpljp\",\"clientId\":\"exutike\"}}},\"kind\":\"AzureArc\",\"extendedLocation\":{\"name\":\"wu\",\"type\":\"vosgjzscu\"},\"location\":\"alivdfwgqjhewcf\",\"tags\":{\"h\":\"ggez\",\"usyzaivnpsjnpckp\":\"priqissener\"},\"id\":\"ujyduonbdawsao\",\"name\":\"lvvmnbkxja\",\"type\":\"sbbdddwokqxai\"}]}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.topics().listByResourceGroup("bvrhh", "galgxnwfm", 207493831, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("alivdfwgqjhewcf", response.iterator().next().location()); - Assertions.assertEquals("ggez", response.iterator().next().tags().get("h")); - Assertions.assertEquals(Sku.PREMIUM, response.iterator().next().sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("fejsewrznequqynt", response.iterator().next().identity().principalId()); - Assertions.assertEquals("knhajksbsyogjm", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("cydi", - response.iterator().next().identity().userAssignedIdentities().get("xtdlxwmvcdkucp").principalId()); - Assertions.assertEquals("mcvjbssfcriqxz", - response.iterator().next().identity().userAssignedIdentities().get("xtdlxwmvcdkucp").clientId()); - Assertions.assertEquals(ResourceKind.AZURE_ARC, response.iterator().next().kind()); - Assertions.assertEquals("wu", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("vosgjzscu", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("mcqixuanccqvjf", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vmufzgug").description()); - Assertions.assertEquals("fqpmquxpj", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vmufzgug").displayName()); - Assertions.assertEquals("faar", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vmufzgug").documentationUrl()); - Assertions.assertEquals("ci", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vmufzgug").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.DISABLED, response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("mqcwwsjnkiixepbn", response.iterator().next().inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertFalse(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/TopicsListEventTypesMockTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesMockTests.java index df9467fee4784..692a7d7d7ffae 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -22,7 +22,7 @@ public final class TopicsListEventTypesMockTests { @Test public void testListEventTypes() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"wmwwpntumota\",\"description\":\"qsvnkxm\",\"schemaUrl\":\"zuae\",\"isInDefaultSet\":false},\"id\":\"hxg\",\"name\":\"qmyrhkvx\",\"type\":\"zmiemqyftgp\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"bkkteo\",\"description\":\"jo\",\"schemaUrl\":\"korvvm\",\"isInDefaultSet\":false},\"id\":\"fnqh\",\"name\":\"bsn\",\"type\":\"snqliwkmzojfe\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testListEventTypes() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.topics() - .listEventTypes("ubcmun", "gbtzvxxvsbcu", "fkrfnkcni", "kswxmfu", com.azure.core.util.Context.NONE); + .listEventTypes("qrslaate", "twujjzgx", "gqwlxrhg", "vhvtq", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wmwwpntumota", response.iterator().next().displayName()); - Assertions.assertEquals("qsvnkxm", response.iterator().next().description()); - Assertions.assertEquals("zuae", response.iterator().next().schemaUrl()); + Assertions.assertEquals("bkkteo", response.iterator().next().displayName()); + Assertions.assertEquals("jo", response.iterator().next().description()); + Assertions.assertEquals("korvvm", response.iterator().next().schemaUrl()); Assertions.assertFalse(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 3a4cbcee00d28..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListMockTests.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.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":[\"eohlpsftqkrvm\",\"vbvvcpwtqsu\",\"pnhmzy\",\"ffetevrnt\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"acycsyo\",\"name\":\"ctkhfh\",\"type\":\"satvcs\"},{\"properties\":{\"privateEndpoint\":{},\"groupIds\":[\"mizhvprhqqw\",\"ublehhkplobz\"],\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Updating\"},\"id\":\"aksadzighmmtbt\",\"name\":\"vucfvvraab\",\"type\":\"urdeewlsuxp\"}],\"provisioningState\":\"Succeeded\",\"endpoint\":\"dwjyjiznior\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"vzjowzug\":{\"description\":\"spmcreihuftrnigh\",\"displayName\":\"nuwqxungro\",\"documentationUrl\":\"wfmsxj\",\"dataSchemaUrl\":\"ylwx\"},\"gpruccwme\":{\"description\":\"rclbl\",\"displayName\":\"hpwachyeu\",\"documentationUrl\":\"wmvwryvdi\",\"dataSchemaUrl\":\"ii\"},\"ajwjuriarsbcll\":{\"description\":\"txsytrtexegwmrq\",\"displayName\":\"wi\",\"documentationUrl\":\"vycfjncindi\",\"dataSchemaUrl\":\"q\"}}},\"minimumTlsVersionAllowed\":\"1.0\",\"inputSchema\":\"EventGridSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"jxizbaxdygzk\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"inboundIpRules\":[{\"ipMask\":\"wacyyjmlxppdndzk\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"None\",\"principalId\":\"ytqdcizeqqfop\",\"tenantId\":\"opmotdsf\",\"userAssignedIdentities\":{\"dzmxojzsvmaigbqk\":{\"principalId\":\"lyo\",\"clientId\":\"yfbkmv\"},\"ihba\":{\"principalId\":\"yejthgeecb\",\"clientId\":\"rgwlc\"},\"jixiujzkc\":{\"principalId\":\"qsokknpug\",\"clientId\":\"wdizc\"},\"wlmnwzo\":{\"principalId\":\"xgkrswksykkbxk\",\"clientId\":\"b\"}}},\"kind\":\"Azure\",\"extendedLocation\":{\"name\":\"ddlggb\",\"type\":\"olgzubakdlkv\"},\"location\":\"cmfnsffet\",\"tags\":{\"qvxgvohdb\":\"ixwewzlscgsmep\"},\"id\":\"hhxmoevvud\",\"name\":\"epfhgannvwx\",\"type\":\"hpjhubohxvzga\"}]}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.topics().list("krbuoggtdltlcuha", 330580425, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cmfnsffet", response.iterator().next().location()); - Assertions.assertEquals("ixwewzlscgsmep", response.iterator().next().tags().get("qvxgvohdb")); - Assertions.assertEquals(Sku.BASIC, response.iterator().next().sku().name()); - Assertions.assertEquals(IdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("ytqdcizeqqfop", response.iterator().next().identity().principalId()); - Assertions.assertEquals("opmotdsf", response.iterator().next().identity().tenantId()); - Assertions.assertEquals("lyo", - response.iterator().next().identity().userAssignedIdentities().get("dzmxojzsvmaigbqk").principalId()); - Assertions.assertEquals("yfbkmv", - response.iterator().next().identity().userAssignedIdentities().get("dzmxojzsvmaigbqk").clientId()); - Assertions.assertEquals(ResourceKind.AZURE, response.iterator().next().kind()); - Assertions.assertEquals("ddlggb", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("olgzubakdlkv", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(EventDefinitionKind.INLINE, response.iterator().next().eventTypeInfo().kind()); - Assertions.assertEquals("spmcreihuftrnigh", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vzjowzug").description()); - Assertions.assertEquals("nuwqxungro", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vzjowzug").displayName()); - Assertions.assertEquals("wfmsxj", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vzjowzug").documentationUrl()); - Assertions.assertEquals("ylwx", - response.iterator().next().eventTypeInfo().inlineEventTypes().get("vzjowzug").dataSchemaUrl()); - Assertions.assertEquals(TlsVersion.ONE_ZERO, response.iterator().next().minimumTlsVersionAllowed()); - Assertions.assertEquals(InputSchema.EVENT_GRID_SCHEMA, response.iterator().next().inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.SECURED_BY_PERIMETER, - response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("wacyyjmlxppdndzk", response.iterator().next().inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, response.iterator().next().inboundIpRules().get(0).action()); - Assertions.assertFalse(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 30f8d64e94024..0000000000000 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/TopicsListResultTests.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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\":\"iciijqpkzfbojx\",\"name\":\"mcsmyqwixvcp\",\"type\":\"nkwywzwofa\"},{\"properties\":{},\"id\":\"ckduoiqtamtyvskn\",\"name\":\"rwzawnvs\",\"type\":\"cfhzagxnvhycv\"},{\"properties\":{},\"id\":\"mwrzregzgyufutrw\",\"name\":\"weryekzk\",\"type\":\"hmeott\"}],\"provisioningState\":\"Creating\",\"endpoint\":\"osxw\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"fv\":{},\"n\":{},\"pmil\":{},\"pnwy\":{}}},\"minimumTlsVersionAllowed\":\"1.2\",\"inputSchema\":\"EventGridSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"sauzpjlx\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"qhzlray\",\"action\":\"Allow\"},{\"ipMask\":\"lskihmxrfdsajred\",\"action\":\"Allow\"},{\"ipMask\":\"shtuwgm\",\"action\":\"Allow\"},{\"ipMask\":\"fpwzyifrkgwltx\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"principalId\":\"yorpr\",\"tenantId\":\"kj\",\"userAssignedIdentities\":{\"yltjcrspxklu\":{\"principalId\":\"labnsmjkwynq\",\"clientId\":\"ekqsykvwjtqpkev\"},\"gpxvkqmaupxvpi\":{\"principalId\":\"clf\",\"clientId\":\"annnoytzposewx\"},\"idszl\":{\"principalId\":\"f\",\"clientId\":\"fyzyzeyuub\"},\"nkrxwetwkdrcy\":{\"principalId\":\"toi\",\"clientId\":\"gygvfltgvdiho\"}}},\"kind\":\"AzureArc\",\"extendedLocation\":{\"name\":\"unnuzdqumoenodn\",\"type\":\"enhqhskndnelq\"},\"location\":\"adlknwfoanni\",\"tags\":{\"ephblkwqpatvbqs\":\"etxivcnrlyxnuc\",\"tvivuzqym\":\"tcjb\",\"o\":\"uo\",\"banf\":\"tgitsqhzvbrzc\"},\"id\":\"ndscxmxeatk\",\"name\":\"bmwnrdjyibqb\",\"type\":\"aomhjrmkuhmaxl\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"hcjmo\",\"name\":\"cancd\",\"type\":\"xxqcwgaxf\"}],\"provisioningState\":\"Failed\",\"endpoint\":\"nokzwjjz\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"dzyyfytpq\":{}}},\"minimumTlsVersionAllowed\":\"1.0\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"ujivyqlkjuvsm\",\"publicNetworkAccess\":\"Enabled\",\"inboundIpRules\":[{\"ipMask\":\"yovwzdbpqv\",\"action\":\"Allow\"},{\"ipMask\":\"gvmxnok\",\"action\":\"Allow\"},{\"ipMask\":\"ubseskvcuartr\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Basic\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"fqivj\",\"tenantId\":\"uykbbmn\",\"userAssignedIdentities\":{\"y\":{\"principalId\":\"tbxoee\",\"clientId\":\"qlnfw\"},\"qfblhkalehpa\":{\"principalId\":\"vqdbpbhfck\",\"clientId\":\"ezcrcssbzhddubb\"},\"nictteajo\":{\"principalId\":\"wugiqjti\",\"clientId\":\"qgdm\"}}},\"kind\":\"AzureArc\",\"extendedLocation\":{\"name\":\"pnbonhpcz\",\"type\":\"mktp\"},\"location\":\"xqcsehch\",\"tags\":{\"dzulo\":\"fmpqumqyjg\",\"hpzfngqj\":\"saeuzanhsfnhsenw\",\"fwbeqrkuorh\":\"lidftujwjj\"},\"id\":\"ssruqnmdvhazcvj\",\"name\":\"tiq\",\"type\":\"wbqerzwxiytxtd\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"bpktgd\",\"name\":\"tyouambewreswmow\",\"type\":\"gmmuteyxey\"},{\"properties\":{},\"id\":\"qigijiitnspxlzde\",\"name\":\"ygr\",\"type\":\"jwaiuf\"},{\"properties\":{},\"id\":\"raybfueqfr\",\"name\":\"jsydgrhydkygywez\",\"type\":\"kiecafygzm\"},{\"properties\":{},\"id\":\"eqvdsm\",\"name\":\"klixqcahyhxaly\",\"type\":\"xawoijpodtblxp\"}],\"provisioningState\":\"Canceled\",\"endpoint\":\"djodqhy\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"emehllizh\":{}}},\"minimumTlsVersionAllowed\":\"1.1\",\"inputSchema\":\"EventGridSchema\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"dkadppyibn\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"wrxwhydtl\",\"action\":\"Allow\"}],\"disableLocalAuth\":false,\"dataResidencyBoundary\":\"WithinGeopair\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"lowuowhlxlnwyr\",\"tenantId\":\"uvblg\",\"userAssignedIdentities\":{\"qcrj\":{\"principalId\":\"kltrfow\",\"clientId\":\"vrfmvlihcvjd\"},\"lwyojbfqzdkfnj\":{\"principalId\":\"h\",\"clientId\":\"ukvhd\"},\"al\":{\"principalId\":\"xhafratqx\",\"clientId\":\"jroumzzn\"}}},\"kind\":\"AzureArc\",\"extendedLocation\":{\"name\":\"zgfxonjtpusl\",\"type\":\"wpvtiotzbpdbol\"},\"location\":\"ryf\",\"tags\":{\"uygdjboqgr\":\"asigrowsocne\",\"mmwiuawvcmjz\":\"tqjkqevad\"},\"id\":\"xiid\",\"name\":\"scz\",\"type\":\"koswoqiqazugamxz\"},{\"properties\":{\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"iisb\",\"name\":\"mnppccekuztd\",\"type\":\"bezaxyfukzxuiz\"},{\"properties\":{},\"id\":\"hnepkpeti\",\"name\":\"rx\",\"type\":\"iubxdukec\"},{\"properties\":{},\"id\":\"dazvdhctm\",\"name\":\"koszu\",\"type\":\"blnsntrpcaqk\"},{\"properties\":{},\"id\":\"f\",\"name\":\"btfmhklbnldpvcbh\",\"type\":\"ezyquw\"}],\"provisioningState\":\"Deleting\",\"endpoint\":\"utrpbr\",\"eventTypeInfo\":{\"kind\":\"Inline\",\"inlineEventTypes\":{\"tvlmbjwcolbmxlb\":{},\"w\":{},\"pcpahprzrvxhmtf\":{},\"ocnxz\":{}}},\"minimumTlsVersionAllowed\":\"1.1\",\"inputSchema\":\"CloudEventSchemaV1_0\",\"inputSchemaMapping\":{\"inputSchemaMappingType\":\"InputSchemaMapping\"},\"metricResourceId\":\"noq\",\"publicNetworkAccess\":\"Disabled\",\"inboundIpRules\":[{\"ipMask\":\"njevhdlmydidw\",\"action\":\"Allow\"}],\"disableLocalAuth\":true,\"dataResidencyBoundary\":\"WithinRegion\"},\"sku\":{\"name\":\"Premium\"},\"identity\":{\"type\":\"None\",\"principalId\":\"xhmw\",\"tenantId\":\"bckyoikxk\",\"userAssignedIdentities\":{\"e\":{\"principalId\":\"gknjzr\",\"clientId\":\"t\"},\"hjym\":{\"principalId\":\"vukaobrlbpgsnb\",\"clientId\":\"nchjhgemuowakywa\"},\"ljomevt\":{\"principalId\":\"gqtagd\",\"clientId\":\"lss\"}}},\"kind\":\"Azure\",\"extendedLocation\":{\"name\":\"bvgjcodkkgj\",\"type\":\"ytssikiz\"},\"location\":\"ufqbvntnr\",\"tags\":{\"nl\":\"sorhcekx\",\"cpwzv\":\"km\"},\"id\":\"doksqdtiwlwxlbon\",\"name\":\"qba\",\"type\":\"qicqchygt\"}],\"nextLink\":\"byjanep\"}") - .toObject(TopicsListResult.class); - Assertions.assertEquals("adlknwfoanni", model.value().get(0).location()); - Assertions.assertEquals("etxivcnrlyxnuc", model.value().get(0).tags().get("ephblkwqpatvbqs")); - Assertions.assertEquals(Sku.PREMIUM, model.value().get(0).sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("yorpr", model.value().get(0).identity().principalId()); - Assertions.assertEquals("kj", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("labnsmjkwynq", - model.value().get(0).identity().userAssignedIdentities().get("yltjcrspxklu").principalId()); - Assertions.assertEquals("ekqsykvwjtqpkev", - model.value().get(0).identity().userAssignedIdentities().get("yltjcrspxklu").clientId()); - Assertions.assertEquals(ResourceKind.AZURE_ARC, model.value().get(0).kind()); - Assertions.assertEquals("unnuzdqumoenodn", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("enhqhskndnelq", 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.EVENT_GRID_SCHEMA, model.value().get(0).inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("qhzlray", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertTrue(model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.value().get(0).dataResidencyBoundary()); - Assertions.assertEquals("byjanep", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopicsListResult model - = new TopicsListResult().withValue(Arrays.asList( - new TopicInner().withLocation("adlknwfoanni") - .withTags(mapOf("ephblkwqpatvbqs", "etxivcnrlyxnuc", "tvivuzqym", "tcjb", "o", "uo", "banf", - "tgitsqhzvbrzc")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity(new IdentityInfo().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withPrincipalId("yorpr") - .withTenantId("kj") - .withUserAssignedIdentities(mapOf("yltjcrspxklu", - new UserIdentityProperties().withPrincipalId("labnsmjkwynq") - .withClientId("ekqsykvwjtqpkev"), - "gpxvkqmaupxvpi", - new UserIdentityProperties().withPrincipalId("clf").withClientId("annnoytzposewx"), "idszl", - new UserIdentityProperties().withPrincipalId("f").withClientId("fyzyzeyuub"), - "nkrxwetwkdrcy", - new UserIdentityProperties().withPrincipalId("toi").withClientId("gygvfltgvdiho")))) - .withKind(ResourceKind.AZURE_ARC) - .withExtendedLocation(new ExtendedLocation().withName("unnuzdqumoenodn").withType("enhqhskndnelq")) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("fv", new InlineEventProperties(), "n", new InlineEventProperties(), - "pmil", new InlineEventProperties(), "pnwy", new InlineEventProperties()))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO) - .withInputSchema(InputSchema.EVENT_GRID_SCHEMA) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("qhzlray").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("lskihmxrfdsajred").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("shtuwgm") - .withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("fpwzyifrkgwltx").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR), - new TopicInner().withLocation("xqcsehch") - .withTags(mapOf("dzulo", "fmpqumqyjg", "hpzfngqj", "saeuzanhsfnhsenw", "fwbeqrkuorh", "lidftujwjj")) - .withSku(new ResourceSku().withName(Sku.BASIC)) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("fqivj") - .withTenantId("uykbbmn") - .withUserAssignedIdentities( - mapOf("y", new UserIdentityProperties().withPrincipalId("tbxoee").withClientId("qlnfw"), - "qfblhkalehpa", - new UserIdentityProperties().withPrincipalId("vqdbpbhfck") - .withClientId("ezcrcssbzhddubb"), - "nictteajo", - new UserIdentityProperties().withPrincipalId("wugiqjti").withClientId("qgdm")))) - .withKind(ResourceKind.AZURE_ARC) - .withExtendedLocation(new ExtendedLocation().withName("pnbonhpcz").withType("mktp")) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("dzyyfytpq", new InlineEventProperties()))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("yovwzdbpqv").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("gvmxnok").withAction(IpActionType.ALLOW), - new InboundIpRule().withIpMask("ubseskvcuartr").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION), - new TopicInner().withLocation("ryf") - .withTags(mapOf("uygdjboqgr", "asigrowsocne", "mmwiuawvcmjz", "tqjkqevad")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity(new IdentityInfo().withType(IdentityType.USER_ASSIGNED) - .withPrincipalId("lowuowhlxlnwyr") - .withTenantId("uvblg") - .withUserAssignedIdentities(mapOf("qcrj", - new UserIdentityProperties().withPrincipalId("kltrfow").withClientId("vrfmvlihcvjd"), - "lwyojbfqzdkfnj", new UserIdentityProperties().withPrincipalId("h").withClientId("ukvhd"), - "al", new UserIdentityProperties().withPrincipalId("xhafratqx").withClientId("jroumzzn")))) - .withKind(ResourceKind.AZURE_ARC) - .withExtendedLocation(new ExtendedLocation().withName("zgfxonjtpusl").withType("wpvtiotzbpdbol")) - .withEventTypeInfo(new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("emehllizh", new InlineEventProperties()))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withInputSchema(InputSchema.EVENT_GRID_SCHEMA) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("wrxwhydtl").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(false) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_GEOPAIR), - new TopicInner().withLocation("ufqbvntnr") - .withTags(mapOf("nl", "sorhcekx", "cpwzv", "km")) - .withSku(new ResourceSku().withName(Sku.PREMIUM)) - .withIdentity( - new IdentityInfo().withType(IdentityType.NONE) - .withPrincipalId("xhmw") - .withTenantId("bckyoikxk") - .withUserAssignedIdentities(mapOf("e", - new UserIdentityProperties().withPrincipalId("gknjzr").withClientId("t"), "hjym", - new UserIdentityProperties().withPrincipalId("vukaobrlbpgsnb") - .withClientId("nchjhgemuowakywa"), - "ljomevt", new UserIdentityProperties().withPrincipalId("gqtagd").withClientId("lss")))) - .withKind(ResourceKind.AZURE) - .withExtendedLocation(new ExtendedLocation().withName("bvgjcodkkgj").withType("ytssikiz")) - .withEventTypeInfo( - new EventTypeInfo().withKind(EventDefinitionKind.INLINE) - .withInlineEventTypes(mapOf("tvlmbjwcolbmxlb", new InlineEventProperties(), "w", - new InlineEventProperties(), "pcpahprzrvxhmtf", new InlineEventProperties(), "ocnxz", - new InlineEventProperties()))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_ONE) - .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) - .withInputSchemaMapping(new InputSchemaMapping()) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withInboundIpRules( - Arrays.asList(new InboundIpRule().withIpMask("njevhdlmydidw").withAction(IpActionType.ALLOW))) - .withDisableLocalAuth(true) - .withDataResidencyBoundary(DataResidencyBoundary.WITHIN_REGION))) - .withNextLink("byjanep"); - model = BinaryData.fromObject(model).toObject(TopicsListResult.class); - Assertions.assertEquals("adlknwfoanni", model.value().get(0).location()); - Assertions.assertEquals("etxivcnrlyxnuc", model.value().get(0).tags().get("ephblkwqpatvbqs")); - Assertions.assertEquals(Sku.PREMIUM, model.value().get(0).sku().name()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("yorpr", model.value().get(0).identity().principalId()); - Assertions.assertEquals("kj", model.value().get(0).identity().tenantId()); - Assertions.assertEquals("labnsmjkwynq", - model.value().get(0).identity().userAssignedIdentities().get("yltjcrspxklu").principalId()); - Assertions.assertEquals("ekqsykvwjtqpkev", - model.value().get(0).identity().userAssignedIdentities().get("yltjcrspxklu").clientId()); - Assertions.assertEquals(ResourceKind.AZURE_ARC, model.value().get(0).kind()); - Assertions.assertEquals("unnuzdqumoenodn", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("enhqhskndnelq", 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.EVENT_GRID_SCHEMA, model.value().get(0).inputSchema()); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("qhzlray", model.value().get(0).inboundIpRules().get(0).ipMask()); - Assertions.assertEquals(IpActionType.ALLOW, model.value().get(0).inboundIpRules().get(0).action()); - Assertions.assertTrue(model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(DataResidencyBoundary.WITHIN_GEOPAIR, model.value().get(0).dataResidencyBoundary()); - Assertions.assertEquals("byjanep", 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/UpdateAutoScaleConfigurationTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UpdateAutoScaleConfigurationTests.java new file mode 100644 index 0000000000000..138194184a3d3 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/UpdateAutoScaleConfigurationTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.eventgrid.models.UpdateAutoScaleConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class UpdateAutoScaleConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UpdateAutoScaleConfiguration model = BinaryData.fromString( + "{\"enableAutoScale\":false,\"minimumThroughputUnits\":299344741,\"maximumThroughputUnits\":1177469779}") + .toObject(UpdateAutoScaleConfiguration.class); + Assertions.assertFalse(model.enableAutoScale()); + Assertions.assertEquals(299344741, model.minimumThroughputUnits()); + Assertions.assertEquals(1177469779, model.maximumThroughputUnits()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UpdateAutoScaleConfiguration model = new UpdateAutoScaleConfiguration().withEnableAutoScale(false) + .withMinimumThroughputUnits(299344741) + .withMaximumThroughputUnits(1177469779); + model = BinaryData.fromObject(model).toObject(UpdateAutoScaleConfiguration.class); + Assertions.assertFalse(model.enableAutoScale()); + Assertions.assertEquals(299344741, model.minimumThroughputUnits()); + Assertions.assertEquals(1177469779, model.maximumThroughputUnits()); + } +} 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 index a50f447797351..a52c2cea0400f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -17,52 +17,34 @@ public final class UpdateTopicsConfigurationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateTopicsConfigurationInfo model = BinaryData.fromString( - "{\"customDomains\":[{\"fullyQualifiedDomainName\":\"gufhyaomtbg\",\"validationState\":\"ErrorRetrievingDnsRecord\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentity\":\"kffovjzhpjbibgjm\"},\"certificateUrl\":\"umvfclu\",\"expectedTxtRecordName\":\"vwxnbkfe\",\"expectedTxtRecordValue\":\"xscyhwzdgirujbz\"},{\"fullyQualifiedDomainName\":\"omvzzbtd\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"ujviylwdshfs\"},\"certificateUrl\":\"rbgyefry\",\"expectedTxtRecordName\":\"gaojf\",\"expectedTxtRecordValue\":\"nc\"},{\"fullyQualifiedDomainName\":\"tmr\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"moxoftpi\"},\"certificateUrl\":\"wycz\",\"expectedTxtRecordName\":\"xacpqjli\",\"expectedTxtRecordValue\":\"yuspskas\"}]}") + "{\"customDomains\":[{\"fullyQualifiedDomainName\":\"cfsf\",\"validationState\":\"Pending\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"stkiiuxhqyud\"},\"certificateUrl\":\"rrqnbpoczvyifqrv\",\"expectedTxtRecordName\":\"vjsllrmvvdfw\",\"expectedTxtRecordValue\":\"kpnpulexxbczwtr\"}]}") .toObject(UpdateTopicsConfigurationInfo.class); - Assertions.assertEquals("gufhyaomtbg", 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("kffovjzhpjbibgjm", model.customDomains().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("umvfclu", model.customDomains().get(0).certificateUrl()); - Assertions.assertEquals("vwxnbkfe", model.customDomains().get(0).expectedTxtRecordName()); - Assertions.assertEquals("xscyhwzdgirujbz", model.customDomains().get(0).expectedTxtRecordValue()); + Assertions.assertEquals("cfsf", 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("stkiiuxhqyud", model.customDomains().get(0).identity().userAssignedIdentity()); + Assertions.assertEquals("rrqnbpoczvyifqrv", model.customDomains().get(0).certificateUrl()); + Assertions.assertEquals("vjsllrmvvdfw", model.customDomains().get(0).expectedTxtRecordName()); + Assertions.assertEquals("kpnpulexxbczwtr", 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("gufhyaomtbg") - .withValidationState(CustomDomainValidationState.ERROR_RETRIEVING_DNS_RECORD) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentity("kffovjzhpjbibgjm")) - .withCertificateUrl("umvfclu") - .withExpectedTxtRecordName("vwxnbkfe") - .withExpectedTxtRecordValue("xscyhwzdgirujbz"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("omvzzbtd") + UpdateTopicsConfigurationInfo model = new UpdateTopicsConfigurationInfo() + .withCustomDomains(Arrays.asList(new CustomDomainConfiguration().withFullyQualifiedDomainName("cfsf") .withValidationState(CustomDomainValidationState.PENDING) .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("ujviylwdshfs")) - .withCertificateUrl("rbgyefry") - .withExpectedTxtRecordName("gaojf") - .withExpectedTxtRecordValue("nc"), - new CustomDomainConfiguration().withFullyQualifiedDomainName("tmr") - .withValidationState(CustomDomainValidationState.PENDING) - .withIdentity(new CustomDomainIdentity().withType(CustomDomainIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("moxoftpi")) - .withCertificateUrl("wycz") - .withExpectedTxtRecordName("xacpqjli") - .withExpectedTxtRecordValue("yuspskas"))); + .withUserAssignedIdentity("stkiiuxhqyud")) + .withCertificateUrl("rrqnbpoczvyifqrv") + .withExpectedTxtRecordName("vjsllrmvvdfw") + .withExpectedTxtRecordValue("kpnpulexxbczwtr"))); model = BinaryData.fromObject(model).toObject(UpdateTopicsConfigurationInfo.class); - Assertions.assertEquals("gufhyaomtbg", 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("kffovjzhpjbibgjm", model.customDomains().get(0).identity().userAssignedIdentity()); - Assertions.assertEquals("umvfclu", model.customDomains().get(0).certificateUrl()); - Assertions.assertEquals("vwxnbkfe", model.customDomains().get(0).expectedTxtRecordName()); - Assertions.assertEquals("xscyhwzdgirujbz", model.customDomains().get(0).expectedTxtRecordValue()); + Assertions.assertEquals("cfsf", 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("stkiiuxhqyud", model.customDomains().get(0).identity().userAssignedIdentity()); + Assertions.assertEquals("rrqnbpoczvyifqrv", model.customDomains().get(0).certificateUrl()); + Assertions.assertEquals("vjsllrmvvdfw", model.customDomains().get(0).expectedTxtRecordName()); + Assertions.assertEquals("kpnpulexxbczwtr", 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 index 4bb5918742d83..da2fdebd43f2a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -11,17 +11,19 @@ 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()); + UserIdentityProperties model + = BinaryData.fromString("{\"principalId\":\"dslfhotwmcy\",\"clientId\":\"wlbjnpgacftade\"}") + .toObject(UserIdentityProperties.class); + Assertions.assertEquals("dslfhotwmcy", model.principalId()); + Assertions.assertEquals("wlbjnpgacftade", model.clientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UserIdentityProperties model = new UserIdentityProperties().withPrincipalId("n").withClientId("nxipeil"); + UserIdentityProperties model + = new UserIdentityProperties().withPrincipalId("dslfhotwmcy").withClientId("wlbjnpgacftade"); model = BinaryData.fromObject(model).toObject(UserIdentityProperties.class); - Assertions.assertEquals("n", model.principalId()); - Assertions.assertEquals("nxipeil", model.clientId()); + Assertions.assertEquals("dslfhotwmcy", model.principalId()); + Assertions.assertEquals("wlbjnpgacftade", 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 index 5c17d77b188df..52f32ba7602c6 100644 --- 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 @@ -1,59 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"9f7ad486-8ad3-4a32-aa28-c6baedda0224\",\"organizationName\":\"tpakf\",\"partnerDisplayName\":\"gatwmykyu\",\"partnerTopicDetails\":{\"description\":\"mdwmf\",\"longDescription\":\"pycvjqdvdwkqpldr\",\"setupUri\":\"fgnaavuagnteta\"},\"partnerDestinationDetails\":{\"description\":\"n\",\"longDescription\":\"ctuhspfefyihduye\",\"setupUri\":\"ldphmtybkcgs\"},\"provisioningState\":\"Failed\"},\"id\":\"llnmwyn\",\"name\":\"fxexlfciatxtjrr\",\"type\":\"kmdskjhhxd\"}") + "{\"properties\":{\"partnerRegistrationImmutableId\":\"dynojpziuwfb\",\"organizationName\":\"kdtnhqsyclj\",\"partnerDisplayName\":\"lpkpbafvafhl\",\"partnerTopicDetails\":{\"description\":\"ccbevxrhyzdf\",\"longDescription\":\"sofpltd\",\"setupUri\":\"airrhvhfnracw\"},\"partnerDestinationDetails\":{\"description\":\"igtuu\",\"longDescription\":\"ouhdawsigrb\",\"setupUri\":\"xsjybvitvqk\"},\"provisioningState\":\"Canceled\"},\"id\":\"nu\",\"name\":\"tggmuwdchozfnkfe\",\"type\":\"lv\"}") .toObject(VerifiedPartnerInner.class); - Assertions.assertEquals(UUID.fromString("9f7ad486-8ad3-4a32-aa28-c6baedda0224"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("tpakf", model.organizationName()); - Assertions.assertEquals("gatwmykyu", model.partnerDisplayName()); - Assertions.assertEquals("mdwmf", model.partnerTopicDetails().description()); - Assertions.assertEquals("pycvjqdvdwkqpldr", model.partnerTopicDetails().longDescription()); - Assertions.assertEquals("fgnaavuagnteta", model.partnerTopicDetails().setupUri()); - Assertions.assertEquals("n", model.partnerDestinationDetails().description()); - Assertions.assertEquals("ctuhspfefyihduye", model.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("ldphmtybkcgs", 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("9f7ad486-8ad3-4a32-aa28-c6baedda0224")) - .withOrganizationName("tpakf") - .withPartnerDisplayName("gatwmykyu") - .withPartnerTopicDetails(new PartnerDetails().withDescription("mdwmf") - .withLongDescription("pycvjqdvdwkqpldr") - .withSetupUri("fgnaavuagnteta")) - .withPartnerDestinationDetails(new PartnerDetails().withDescription("n") - .withLongDescription("ctuhspfefyihduye") - .withSetupUri("ldphmtybkcgs")) - .withProvisioningState(VerifiedPartnerProvisioningState.FAILED); - model = BinaryData.fromObject(model).toObject(VerifiedPartnerInner.class); - Assertions.assertEquals(UUID.fromString("9f7ad486-8ad3-4a32-aa28-c6baedda0224"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("tpakf", model.organizationName()); - Assertions.assertEquals("gatwmykyu", model.partnerDisplayName()); - Assertions.assertEquals("mdwmf", model.partnerTopicDetails().description()); - Assertions.assertEquals("pycvjqdvdwkqpldr", model.partnerTopicDetails().longDescription()); - Assertions.assertEquals("fgnaavuagnteta", model.partnerTopicDetails().setupUri()); - Assertions.assertEquals("n", model.partnerDestinationDetails().description()); - Assertions.assertEquals("ctuhspfefyihduye", model.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("ldphmtybkcgs", model.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.FAILED, model.provisioningState()); + Assertions.assertEquals("dynojpziuwfb", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("kdtnhqsyclj", model.organizationName()); + Assertions.assertEquals("lpkpbafvafhl", model.partnerDisplayName()); + Assertions.assertEquals("ccbevxrhyzdf", model.partnerTopicDetails().description()); + Assertions.assertEquals("sofpltd", model.partnerTopicDetails().longDescription()); + Assertions.assertEquals("airrhvhfnracw", model.partnerTopicDetails().setupUri()); + Assertions.assertEquals("igtuu", model.partnerDestinationDetails().description()); + Assertions.assertEquals("ouhdawsigrb", model.partnerDestinationDetails().longDescription()); + Assertions.assertEquals("xsjybvitvqk", 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/VerifiedPartnerPropertiesTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnerPropertiesTests.java index 63d1cdec037a0..ac0b4d210d3d9 100644 --- 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 @@ -1,59 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"68f65d7d-5f3a-4017-9470-81e67caa0bf7\",\"organizationName\":\"foxcx\",\"partnerDisplayName\":\"vslxlh\",\"partnerTopicDetails\":{\"description\":\"krmukmyjmkxett\",\"longDescription\":\"lojfkqidnqto\",\"setupUri\":\"jhqxc\"},\"partnerDestinationDetails\":{\"description\":\"tkbtnqlrngl\",\"longDescription\":\"biipsnawwlqkznx\",\"setupUri\":\"llxricc\"},\"provisioningState\":\"Creating\"}") + "{\"partnerRegistrationImmutableId\":\"oakizvoai\",\"organizationName\":\"a\",\"partnerDisplayName\":\"nuwiguyxlykwph\",\"partnerTopicDetails\":{\"description\":\"cwxhmpej\",\"longDescription\":\"ke\",\"setupUri\":\"onwivkcqhrxhxkn\"},\"partnerDestinationDetails\":{\"description\":\"rmmkyupiju\",\"longDescription\":\"qjfkakfqfrkemyi\",\"setupUri\":\"udxjascowv\"},\"provisioningState\":\"Succeeded\"}") .toObject(VerifiedPartnerProperties.class); - Assertions.assertEquals(UUID.fromString("68f65d7d-5f3a-4017-9470-81e67caa0bf7"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("foxcx", model.organizationName()); - Assertions.assertEquals("vslxlh", model.partnerDisplayName()); - Assertions.assertEquals("krmukmyjmkxett", model.partnerTopicDetails().description()); - Assertions.assertEquals("lojfkqidnqto", model.partnerTopicDetails().longDescription()); - Assertions.assertEquals("jhqxc", model.partnerTopicDetails().setupUri()); - Assertions.assertEquals("tkbtnqlrngl", model.partnerDestinationDetails().description()); - Assertions.assertEquals("biipsnawwlqkznx", model.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("llxricc", model.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CREATING, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VerifiedPartnerProperties model = new VerifiedPartnerProperties() - .withPartnerRegistrationImmutableId(UUID.fromString("68f65d7d-5f3a-4017-9470-81e67caa0bf7")) - .withOrganizationName("foxcx") - .withPartnerDisplayName("vslxlh") - .withPartnerTopicDetails(new PartnerDetails().withDescription("krmukmyjmkxett") - .withLongDescription("lojfkqidnqto") - .withSetupUri("jhqxc")) - .withPartnerDestinationDetails(new PartnerDetails().withDescription("tkbtnqlrngl") - .withLongDescription("biipsnawwlqkznx") - .withSetupUri("llxricc")) - .withProvisioningState(VerifiedPartnerProvisioningState.CREATING); - model = BinaryData.fromObject(model).toObject(VerifiedPartnerProperties.class); - Assertions.assertEquals(UUID.fromString("68f65d7d-5f3a-4017-9470-81e67caa0bf7"), - model.partnerRegistrationImmutableId()); - Assertions.assertEquals("foxcx", model.organizationName()); - Assertions.assertEquals("vslxlh", model.partnerDisplayName()); - Assertions.assertEquals("krmukmyjmkxett", model.partnerTopicDetails().description()); - Assertions.assertEquals("lojfkqidnqto", model.partnerTopicDetails().longDescription()); - Assertions.assertEquals("jhqxc", model.partnerTopicDetails().setupUri()); - Assertions.assertEquals("tkbtnqlrngl", model.partnerDestinationDetails().description()); - Assertions.assertEquals("biipsnawwlqkznx", model.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("llxricc", model.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CREATING, model.provisioningState()); + Assertions.assertEquals("oakizvoai", model.partnerRegistrationImmutableId()); + Assertions.assertEquals("a", model.organizationName()); + Assertions.assertEquals("nuwiguyxlykwph", model.partnerDisplayName()); + Assertions.assertEquals("cwxhmpej", model.partnerTopicDetails().description()); + Assertions.assertEquals("ke", model.partnerTopicDetails().longDescription()); + Assertions.assertEquals("onwivkcqhrxhxkn", model.partnerTopicDetails().setupUri()); + Assertions.assertEquals("rmmkyupiju", model.partnerDestinationDetails().description()); + Assertions.assertEquals("qjfkakfqfrkemyi", model.partnerDestinationDetails().longDescription()); + Assertions.assertEquals("udxjascowv", model.partnerDestinationDetails().setupUri()); + Assertions.assertEquals(VerifiedPartnerProvisioningState.SUCCEEDED, 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 index 1b0c72fe1b68a..756be61bd2334 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,7 +14,6 @@ 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; @@ -23,7 +22,7 @@ public final class VerifiedPartnersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"partnerRegistrationImmutableId\":\"e46ebfd9-c8c7-4b08-8f6a-24f028a869d9\",\"organizationName\":\"fmvswx\",\"partnerDisplayName\":\"el\",\"partnerTopicDetails\":{\"description\":\"qhdxtwwulkryb\",\"longDescription\":\"evy\",\"setupUri\":\"yjecrqkwakkch\"},\"partnerDestinationDetails\":{\"description\":\"ulborcxuibsdq\",\"longDescription\":\"yblpectsmwpgwe\",\"setupUri\":\"hbjq\"},\"provisioningState\":\"Canceled\"},\"id\":\"lerufollcshju\",\"name\":\"ihbymjjvtpne\",\"type\":\"xvjeazrah\"}"; + = "{\"properties\":{\"partnerRegistrationImmutableId\":\"ycsbskowkrbhzhr\",\"organizationName\":\"htmqowi\",\"partnerDisplayName\":\"sfgqgucyhfaimqv\",\"partnerTopicDetails\":{\"description\":\"ozkgyfpeoehg\",\"longDescription\":\"qmskkixv\",\"setupUri\":\"jxplh\"},\"partnerDestinationDetails\":{\"description\":\"asyntv\",\"longDescription\":\"yielb\",\"setupUri\":\"vvbq\"},\"provisioningState\":\"Creating\"},\"id\":\"pecqxgiqasifubn\",\"name\":\"nstlpwqpjn\",\"type\":\"jkht\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,18 +32,17 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VerifiedPartner response - = manager.verifiedPartners().getWithResponse("nry", com.azure.core.util.Context.NONE).getValue(); + = manager.verifiedPartners().getWithResponse("goqb", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(UUID.fromString("e46ebfd9-c8c7-4b08-8f6a-24f028a869d9"), - response.partnerRegistrationImmutableId()); - Assertions.assertEquals("fmvswx", response.organizationName()); - Assertions.assertEquals("el", response.partnerDisplayName()); - Assertions.assertEquals("qhdxtwwulkryb", response.partnerTopicDetails().description()); - Assertions.assertEquals("evy", response.partnerTopicDetails().longDescription()); - Assertions.assertEquals("yjecrqkwakkch", response.partnerTopicDetails().setupUri()); - Assertions.assertEquals("ulborcxuibsdq", response.partnerDestinationDetails().description()); - Assertions.assertEquals("yblpectsmwpgwe", response.partnerDestinationDetails().longDescription()); - Assertions.assertEquals("hbjq", response.partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CANCELED, response.provisioningState()); + Assertions.assertEquals("ycsbskowkrbhzhr", response.partnerRegistrationImmutableId()); + Assertions.assertEquals("htmqowi", response.organizationName()); + Assertions.assertEquals("sfgqgucyhfaimqv", response.partnerDisplayName()); + Assertions.assertEquals("ozkgyfpeoehg", response.partnerTopicDetails().description()); + Assertions.assertEquals("qmskkixv", response.partnerTopicDetails().longDescription()); + Assertions.assertEquals("jxplh", response.partnerTopicDetails().setupUri()); + Assertions.assertEquals("asyntv", response.partnerDestinationDetails().description()); + Assertions.assertEquals("yielb", response.partnerDestinationDetails().longDescription()); + Assertions.assertEquals("vvbq", response.partnerDestinationDetails().setupUri()); + Assertions.assertEquals(VerifiedPartnerProvisioningState.CREATING, 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 index d059474bdd62d..1024cdd8b2fe0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,7 +15,6 @@ 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; @@ -24,7 +23,7 @@ public final class VerifiedPartnersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"31cf8465-6129-48b3-ae25-60d2d925abd0\",\"organizationName\":\"thtpqgfzdosi\",\"partnerDisplayName\":\"d\",\"partnerTopicDetails\":{\"description\":\"flgzh\",\"longDescription\":\"jg\",\"setupUri\":\"hcrx\"},\"partnerDestinationDetails\":{\"description\":\"rutvnpccxz\",\"longDescription\":\"xpmhzghhhk\",\"setupUri\":\"njdtujqzvhnj\"},\"provisioningState\":\"Updating\"},\"id\":\"n\",\"name\":\"tmzstql\",\"type\":\"xolrwvtlg\"}]}"; + = "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"msfb\",\"organizationName\":\"yllznfhkqytkztad\",\"partnerDisplayName\":\"gfzdgjfcycrsvl\",\"partnerTopicDetails\":{\"description\":\"h\",\"longDescription\":\"qkzjuqwqaj\",\"setupUri\":\"zxpixhyo\"},\"partnerDestinationDetails\":{\"description\":\"f\",\"longDescription\":\"gsoscienezfvb\",\"setupUri\":\"n\"},\"provisioningState\":\"Succeeded\"},\"id\":\"pjnrtekwwnthro\",\"name\":\"mdudsy\",\"type\":\"urz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +33,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.verifiedPartners().list("lhbimyii", 832518528, com.azure.core.util.Context.NONE); + = manager.verifiedPartners().list("psvyouweuiyxfw", 864134512, com.azure.core.util.Context.NONE); - Assertions.assertEquals(UUID.fromString("31cf8465-6129-48b3-ae25-60d2d925abd0"), - response.iterator().next().partnerRegistrationImmutableId()); - Assertions.assertEquals("thtpqgfzdosi", response.iterator().next().organizationName()); - Assertions.assertEquals("d", response.iterator().next().partnerDisplayName()); - Assertions.assertEquals("flgzh", response.iterator().next().partnerTopicDetails().description()); - Assertions.assertEquals("jg", response.iterator().next().partnerTopicDetails().longDescription()); - Assertions.assertEquals("hcrx", response.iterator().next().partnerTopicDetails().setupUri()); - Assertions.assertEquals("rutvnpccxz", response.iterator().next().partnerDestinationDetails().description()); - Assertions.assertEquals("xpmhzghhhk", response.iterator().next().partnerDestinationDetails().longDescription()); - Assertions.assertEquals("njdtujqzvhnj", response.iterator().next().partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.UPDATING, + Assertions.assertEquals("msfb", response.iterator().next().partnerRegistrationImmutableId()); + Assertions.assertEquals("yllznfhkqytkztad", response.iterator().next().organizationName()); + Assertions.assertEquals("gfzdgjfcycrsvl", response.iterator().next().partnerDisplayName()); + Assertions.assertEquals("h", response.iterator().next().partnerTopicDetails().description()); + Assertions.assertEquals("qkzjuqwqaj", response.iterator().next().partnerTopicDetails().longDescription()); + Assertions.assertEquals("zxpixhyo", response.iterator().next().partnerTopicDetails().setupUri()); + Assertions.assertEquals("f", response.iterator().next().partnerDestinationDetails().description()); + Assertions.assertEquals("gsoscienezfvb", + response.iterator().next().partnerDestinationDetails().longDescription()); + Assertions.assertEquals("n", response.iterator().next().partnerDestinationDetails().setupUri()); + Assertions.assertEquals(VerifiedPartnerProvisioningState.SUCCEEDED, 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 index 884568c2862f8..b1fead78a1547 100644 --- 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 @@ -1,109 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.VerifiedPartnersListResult; 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\":\"40de629d-8b38-42fd-9c00-bf0bc3f1e0c3\",\"organizationName\":\"rupobehd\",\"partnerDisplayName\":\"jzacvumepjpbibn\",\"partnerTopicDetails\":{\"description\":\"hep\",\"longDescription\":\"exleqirccjcl\",\"setupUri\":\"cgxvrpj\"},\"partnerDestinationDetails\":{\"description\":\"zuodacpun\",\"longDescription\":\"tepdjxqes\",\"setupUri\":\"ynu\"},\"provisioningState\":\"Creating\"},\"id\":\"ckaewsedves\",\"name\":\"w\",\"type\":\"egqphrgfnzhctm\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"0cdf2d5d-5698-4c59-b9b1-c6f0beac52d7\",\"organizationName\":\"hp\",\"partnerDisplayName\":\"bcpzarpzeqacdldt\",\"partnerTopicDetails\":{\"description\":\"ypefcpczshnuqnda\",\"longDescription\":\"upfkhuytuszxhmtv\",\"setupUri\":\"egw\"},\"partnerDestinationDetails\":{\"description\":\"kvzwydw\",\"longDescription\":\"haokgkskjiv\",\"setupUri\":\"shajqf\"},\"provisioningState\":\"Canceled\"},\"id\":\"expgeumilhwu\",\"name\":\"trdexyionofnin\",\"type\":\"dbzsx\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"131f2d32-33f4-40ea-8d31-83b55481f2a4\",\"organizationName\":\"rsmpcbbprtuga\",\"partnerDisplayName\":\"zbcyksiv\",\"partnerTopicDetails\":{\"description\":\"gd\",\"longDescription\":\"bfcmkrfts\",\"setupUri\":\"wjjxsgm\"},\"partnerDestinationDetails\":{\"description\":\"vifdxkecifhocjx\",\"longDescription\":\"loozrvt\",\"setupUri\":\"cmufunlcpxxv\"},\"provisioningState\":\"Updating\"},\"id\":\"yngjgvrquvpygglp\",\"name\":\"crdcueljti\",\"type\":\"hxmfqryarvsxzqb\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"d32f5619-a9ea-4139-a587-28ee43356315\",\"organizationName\":\"kayspthz\",\"partnerDisplayName\":\"ubtlmjtg\",\"partnerTopicDetails\":{\"description\":\"oskkfmk\",\"longDescription\":\"djxyxgbkkqvjcteo\",\"setupUri\":\"l\"},\"partnerDestinationDetails\":{\"description\":\"skkzpxvjnzdpvo\",\"longDescription\":\"jhpcn\",\"setupUri\":\"xzfsnggytexvzilm\"},\"provisioningState\":\"Canceled\"},\"id\":\"kwwwnckn\",\"name\":\"zdajlskzptjxu\",\"type\":\"weucyrth\"}],\"nextLink\":\"lehmcgcjeinueho\"}") + "{\"value\":[{\"properties\":{\"partnerRegistrationImmutableId\":\"sutrjbhxykfhyqe\",\"organizationName\":\"qqug\",\"partnerDisplayName\":\"ftbcvexreuquow\",\"partnerTopicDetails\":{\"description\":\"vfwhreagkhyxv\",\"longDescription\":\"tvbczsulm\",\"setupUri\":\"glmep\"},\"partnerDestinationDetails\":{\"description\":\"s\",\"longDescription\":\"kgsangpszng\",\"setupUri\":\"p\"},\"provisioningState\":\"Canceled\"},\"id\":\"vecjujcn\",\"name\":\"oady\",\"type\":\"dm\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"jfoknubnoitpkp\",\"organizationName\":\"rgdg\",\"partnerDisplayName\":\"coqra\",\"partnerTopicDetails\":{\"description\":\"gyxpqit\",\"longDescription\":\"ialwv\",\"setupUri\":\"buhzacaq\"},\"partnerDestinationDetails\":{\"description\":\"tco\",\"longDescription\":\"ujpdsxzak\",\"setupUri\":\"jkmvbi\"},\"provisioningState\":\"Updating\"},\"id\":\"fqcvovj\",\"name\":\"f\",\"type\":\"csjml\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"yeji\",\"organizationName\":\"uxegthortudawlpj\",\"partnerDisplayName\":\"lqerpptcbgqnzm\",\"partnerTopicDetails\":{\"description\":\"ilialwcjgc\",\"longDescription\":\"bcccgzpra\",\"setupUri\":\"nyuffat\"},\"partnerDestinationDetails\":{\"description\":\"tipwcxbyubhiqd\",\"longDescription\":\"urnpnuhzafccnuh\",\"setupUri\":\"gbylbuig\"},\"provisioningState\":\"Succeeded\"},\"id\":\"tvcrkdlbnbqxvh\",\"name\":\"syhzlwx\",\"type\":\"eaovurexdnds\"},{\"properties\":{\"partnerRegistrationImmutableId\":\"ead\",\"organizationName\":\"zmwntopagt\",\"partnerDisplayName\":\"v\",\"partnerTopicDetails\":{\"description\":\"goaqylkjztj\",\"longDescription\":\"azjcgmxitpfin\",\"setupUri\":\"pdltkrlg\"},\"partnerDestinationDetails\":{\"description\":\"bd\",\"longDescription\":\"cqguef\",\"setupUri\":\"ompheqdur\"},\"provisioningState\":\"Failed\"},\"id\":\"jlfyou\",\"name\":\"pckyec\",\"type\":\"cdigpt\"}],\"nextLink\":\"brzmqxucycijoclx\"}") .toObject(VerifiedPartnersListResult.class); - Assertions.assertEquals(UUID.fromString("40de629d-8b38-42fd-9c00-bf0bc3f1e0c3"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("rupobehd", model.value().get(0).organizationName()); - Assertions.assertEquals("jzacvumepjpbibn", model.value().get(0).partnerDisplayName()); - Assertions.assertEquals("hep", model.value().get(0).partnerTopicDetails().description()); - Assertions.assertEquals("exleqirccjcl", model.value().get(0).partnerTopicDetails().longDescription()); - Assertions.assertEquals("cgxvrpj", model.value().get(0).partnerTopicDetails().setupUri()); - Assertions.assertEquals("zuodacpun", model.value().get(0).partnerDestinationDetails().description()); - Assertions.assertEquals("tepdjxqes", model.value().get(0).partnerDestinationDetails().longDescription()); - Assertions.assertEquals("ynu", model.value().get(0).partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CREATING, model.value().get(0).provisioningState()); - Assertions.assertEquals("lehmcgcjeinueho", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VerifiedPartnersListResult model - = new VerifiedPartnersListResult() - .withValue( - Arrays - .asList( - new VerifiedPartnerInner() - .withPartnerRegistrationImmutableId( - UUID.fromString("40de629d-8b38-42fd-9c00-bf0bc3f1e0c3")) - .withOrganizationName("rupobehd") - .withPartnerDisplayName("jzacvumepjpbibn") - .withPartnerTopicDetails(new PartnerDetails().withDescription("hep") - .withLongDescription("exleqirccjcl") - .withSetupUri("cgxvrpj")) - .withPartnerDestinationDetails(new PartnerDetails() - .withDescription("zuodacpun") - .withLongDescription("tepdjxqes") - .withSetupUri("ynu")) - .withProvisioningState(VerifiedPartnerProvisioningState.CREATING), - new VerifiedPartnerInner() - .withPartnerRegistrationImmutableId( - UUID.fromString("0cdf2d5d-5698-4c59-b9b1-c6f0beac52d7")) - .withOrganizationName("hp") - .withPartnerDisplayName("bcpzarpzeqacdldt") - .withPartnerTopicDetails(new PartnerDetails().withDescription("ypefcpczshnuqnda") - .withLongDescription("upfkhuytuszxhmtv") - .withSetupUri("egw")) - .withPartnerDestinationDetails(new PartnerDetails() - .withDescription("kvzwydw") - .withLongDescription("haokgkskjiv") - .withSetupUri("shajqf")) - .withProvisioningState(VerifiedPartnerProvisioningState.CANCELED), - new VerifiedPartnerInner() - .withPartnerRegistrationImmutableId( - UUID.fromString("131f2d32-33f4-40ea-8d31-83b55481f2a4")) - .withOrganizationName("rsmpcbbprtuga") - .withPartnerDisplayName("zbcyksiv") - .withPartnerTopicDetails(new PartnerDetails().withDescription("gd") - .withLongDescription("bfcmkrfts") - .withSetupUri("wjjxsgm")) - .withPartnerDestinationDetails(new PartnerDetails() - .withDescription("vifdxkecifhocjx") - .withLongDescription("loozrvt") - .withSetupUri("cmufunlcpxxv")) - .withProvisioningState(VerifiedPartnerProvisioningState.UPDATING), - new VerifiedPartnerInner() - .withPartnerRegistrationImmutableId( - UUID.fromString("d32f5619-a9ea-4139-a587-28ee43356315")) - .withOrganizationName("kayspthz") - .withPartnerDisplayName("ubtlmjtg") - .withPartnerTopicDetails(new PartnerDetails().withDescription("oskkfmk") - .withLongDescription("djxyxgbkkqvjcteo") - .withSetupUri("l")) - .withPartnerDestinationDetails(new PartnerDetails().withDescription("skkzpxvjnzdpvo") - .withLongDescription("jhpcn") - .withSetupUri("xzfsnggytexvzilm")) - .withProvisioningState(VerifiedPartnerProvisioningState.CANCELED))) - .withNextLink("lehmcgcjeinueho"); - model = BinaryData.fromObject(model).toObject(VerifiedPartnersListResult.class); - Assertions.assertEquals(UUID.fromString("40de629d-8b38-42fd-9c00-bf0bc3f1e0c3"), - model.value().get(0).partnerRegistrationImmutableId()); - Assertions.assertEquals("rupobehd", model.value().get(0).organizationName()); - Assertions.assertEquals("jzacvumepjpbibn", model.value().get(0).partnerDisplayName()); - Assertions.assertEquals("hep", model.value().get(0).partnerTopicDetails().description()); - Assertions.assertEquals("exleqirccjcl", model.value().get(0).partnerTopicDetails().longDescription()); - Assertions.assertEquals("cgxvrpj", model.value().get(0).partnerTopicDetails().setupUri()); - Assertions.assertEquals("zuodacpun", model.value().get(0).partnerDestinationDetails().description()); - Assertions.assertEquals("tepdjxqes", model.value().get(0).partnerDestinationDetails().longDescription()); - Assertions.assertEquals("ynu", model.value().get(0).partnerDestinationDetails().setupUri()); - Assertions.assertEquals(VerifiedPartnerProvisioningState.CREATING, model.value().get(0).provisioningState()); - Assertions.assertEquals("lehmcgcjeinueho", model.nextLink()); + Assertions.assertEquals("sutrjbhxykfhyqe", model.value().get(0).partnerRegistrationImmutableId()); + Assertions.assertEquals("qqug", model.value().get(0).organizationName()); + Assertions.assertEquals("ftbcvexreuquow", model.value().get(0).partnerDisplayName()); + Assertions.assertEquals("vfwhreagkhyxv", model.value().get(0).partnerTopicDetails().description()); + Assertions.assertEquals("tvbczsulm", model.value().get(0).partnerTopicDetails().longDescription()); + Assertions.assertEquals("glmep", model.value().get(0).partnerTopicDetails().setupUri()); + Assertions.assertEquals("s", model.value().get(0).partnerDestinationDetails().description()); + Assertions.assertEquals("kgsangpszng", model.value().get(0).partnerDestinationDetails().longDescription()); + Assertions.assertEquals("p", model.value().get(0).partnerDestinationDetails().setupUri()); + Assertions.assertEquals(VerifiedPartnerProvisioningState.CANCELED, model.value().get(0).provisioningState()); + Assertions.assertEquals("brzmqxucycijoclx", model.nextLink()); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookAuthenticationSettingsTests.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookAuthenticationSettingsTests.java index e305844243e3a..b8fa735938ca9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookAuthenticationSettingsTests.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/test/java/com/azure/resourcemanager/eventgrid/generated/WebhookAuthenticationSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -14,14 +14,14 @@ public final class WebhookAuthenticationSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookAuthenticationSettings model = BinaryData.fromString( - "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"o\"},\"endpointUrl\":\"sttp\",\"endpointBaseUrl\":\"w\",\"azureActiveDirectoryApplicationIdOrUri\":\"kbnujr\",\"azureActiveDirectoryTenantId\":\"wvtylbfpncurdo\"}") + "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"yb\"},\"endpointUrl\":\"gehoqfbowskany\",\"endpointBaseUrl\":\"zlcuiywgqywgndrv\",\"azureActiveDirectoryApplicationIdOrUri\":\"nhzgpphrcgyn\",\"azureActiveDirectoryTenantId\":\"ocpecfvmmco\"}") .toObject(WebhookAuthenticationSettings.class); Assertions.assertEquals(CustomWebhookAuthenticationManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("o", model.identity().userAssignedIdentity()); - Assertions.assertEquals("sttp", model.endpointUrl()); - Assertions.assertEquals("w", model.endpointBaseUrl()); - Assertions.assertEquals("kbnujr", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("wvtylbfpncurdo", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("yb", model.identity().userAssignedIdentity()); + Assertions.assertEquals("gehoqfbowskany", model.endpointUrl()); + Assertions.assertEquals("zlcuiywgqywgndrv", model.endpointBaseUrl()); + Assertions.assertEquals("nhzgpphrcgyn", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("ocpecfvmmco", model.azureActiveDirectoryTenantId()); } @org.junit.jupiter.api.Test @@ -29,17 +29,17 @@ public void testSerialize() throws Exception { WebhookAuthenticationSettings model = new WebhookAuthenticationSettings() .withIdentity(new CustomWebhookAuthenticationManagedIdentity() .withType(CustomWebhookAuthenticationManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity("o")) - .withEndpointUrl("sttp") - .withEndpointBaseUrl("w") - .withAzureActiveDirectoryApplicationIdOrUri("kbnujr") - .withAzureActiveDirectoryTenantId("wvtylbfpncurdo"); + .withUserAssignedIdentity("yb")) + .withEndpointUrl("gehoqfbowskany") + .withEndpointBaseUrl("zlcuiywgqywgndrv") + .withAzureActiveDirectoryApplicationIdOrUri("nhzgpphrcgyn") + .withAzureActiveDirectoryTenantId("ocpecfvmmco"); model = BinaryData.fromObject(model).toObject(WebhookAuthenticationSettings.class); Assertions.assertEquals(CustomWebhookAuthenticationManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("o", model.identity().userAssignedIdentity()); - Assertions.assertEquals("sttp", model.endpointUrl()); - Assertions.assertEquals("w", model.endpointBaseUrl()); - Assertions.assertEquals("kbnujr", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("wvtylbfpncurdo", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("yb", model.identity().userAssignedIdentity()); + Assertions.assertEquals("gehoqfbowskany", model.endpointUrl()); + Assertions.assertEquals("zlcuiywgqywgndrv", model.endpointBaseUrl()); + Assertions.assertEquals("nhzgpphrcgyn", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("ocpecfvmmco", model.azureActiveDirectoryTenantId()); } } 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 index 513464658eb32..45a0647ab201f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,37 +15,34 @@ public final class WebhookEventSubscriptionDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookEventSubscriptionDestinationProperties model = BinaryData.fromString( - "{\"endpointUrl\":\"v\",\"endpointBaseUrl\":\"qqjwkrh\",\"maxEventsPerBatch\":1063009582,\"preferredBatchSizeInKilobytes\":1005777788,\"azureActiveDirectoryTenantId\":\"jisgglmvokatuztj\",\"azureActiveDirectoryApplicationIdOrUri\":\"ibpvbkaehxsmzyg\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"kwseivmakxhyso\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"juxlkbectvtfjm\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"dchmaiubavlz\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"vgmfalkzazmgok\"}],\"minimumTlsVersionAllowed\":\"1.0\"}") + "{\"endpointUrl\":\"bcxf\",\"endpointBaseUrl\":\"cporxvxcjz\",\"maxEventsPerBatch\":1650285397,\"preferredBatchSizeInKilobytes\":546914966,\"azureActiveDirectoryTenantId\":\"pxtgqscjav\",\"azureActiveDirectoryApplicationIdOrUri\":\"juhdqazkmtgguwpi\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"civmmg\"}],\"minimumTlsVersionAllowed\":\"1.0\"}") .toObject(WebhookEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("v", model.endpointUrl()); - Assertions.assertEquals(1063009582, model.maxEventsPerBatch()); - Assertions.assertEquals(1005777788, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("jisgglmvokatuztj", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("ibpvbkaehxsmzyg", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("kwseivmakxhyso", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("bcxf", model.endpointUrl()); + Assertions.assertEquals(1650285397, model.maxEventsPerBatch()); + Assertions.assertEquals(546914966, model.preferredBatchSizeInKilobytes()); + Assertions.assertEquals("pxtgqscjav", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("juhdqazkmtgguwpi", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("civmmg", 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("v") - .withMaxEventsPerBatch(1063009582) - .withPreferredBatchSizeInKilobytes(1005777788) - .withAzureActiveDirectoryTenantId("jisgglmvokatuztj") - .withAzureActiveDirectoryApplicationIdOrUri("ibpvbkaehxsmzyg") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("kwseivmakxhyso"), - new DeliveryAttributeMapping().withName("juxlkbectvtfjm"), - new DeliveryAttributeMapping().withName("dchmaiubavlz"), - new DeliveryAttributeMapping().withName("vgmfalkzazmgok"))) + = new WebhookEventSubscriptionDestinationProperties().withEndpointUrl("bcxf") + .withMaxEventsPerBatch(1650285397) + .withPreferredBatchSizeInKilobytes(546914966) + .withAzureActiveDirectoryTenantId("pxtgqscjav") + .withAzureActiveDirectoryApplicationIdOrUri("juhdqazkmtgguwpi") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("civmmg"))) .withMinimumTlsVersionAllowed(TlsVersion.ONE_ZERO); model = BinaryData.fromObject(model).toObject(WebhookEventSubscriptionDestinationProperties.class); - Assertions.assertEquals("v", model.endpointUrl()); - Assertions.assertEquals(1063009582, model.maxEventsPerBatch()); - Assertions.assertEquals(1005777788, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("jisgglmvokatuztj", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("ibpvbkaehxsmzyg", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("kwseivmakxhyso", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("bcxf", model.endpointUrl()); + Assertions.assertEquals(1650285397, model.maxEventsPerBatch()); + Assertions.assertEquals(546914966, model.preferredBatchSizeInKilobytes()); + Assertions.assertEquals("pxtgqscjav", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("juhdqazkmtgguwpi", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("civmmg", 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 index 2f44ed64bf9d4..bc08e8c297710 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -15,37 +15,33 @@ public final class WebhookEventSubscriptionDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookEventSubscriptionDestination model = BinaryData.fromString( - "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"uvwsxbgnvk\",\"endpointBaseUrl\":\"vqchoadhrs\",\"maxEventsPerBatch\":1109483732,\"preferredBatchSizeInKilobytes\":1583962406,\"azureActiveDirectoryTenantId\":\"pabdsrg\",\"azureActiveDirectoryApplicationIdOrUri\":\"jglzrsubklrxhjnl\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"jdvqy\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"eqq\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"aruwdxvqzxoebw\"},{\"type\":\"DeliveryAttributeMapping\",\"name\":\"xbibanbaupw\"}],\"minimumTlsVersionAllowed\":\"1.2\"}}") + "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"eazulcs\",\"endpointBaseUrl\":\"hwwn\",\"maxEventsPerBatch\":574230298,\"preferredBatchSizeInKilobytes\":307378678,\"azureActiveDirectoryTenantId\":\"swpchwahfbousn\",\"azureActiveDirectoryApplicationIdOrUri\":\"pgfewetwlyx\",\"deliveryAttributeMappings\":[{\"type\":\"DeliveryAttributeMapping\",\"name\":\"ykxhdjh\"}],\"minimumTlsVersionAllowed\":\"1.2\"}}") .toObject(WebhookEventSubscriptionDestination.class); - Assertions.assertEquals("uvwsxbgnvk", model.endpointUrl()); - Assertions.assertEquals(1109483732, model.maxEventsPerBatch()); - Assertions.assertEquals(1583962406, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("pabdsrg", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("jglzrsubklrxhjnl", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("jdvqy", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("eazulcs", model.endpointUrl()); + Assertions.assertEquals(574230298, model.maxEventsPerBatch()); + Assertions.assertEquals(307378678, model.preferredBatchSizeInKilobytes()); + Assertions.assertEquals("swpchwahfbousn", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("pgfewetwlyx", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("ykxhdjh", model.deliveryAttributeMappings().get(0).name()); Assertions.assertEquals(TlsVersion.ONE_TWO, model.minimumTlsVersionAllowed()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookEventSubscriptionDestination model - = new WebhookEventSubscriptionDestination().withEndpointUrl("uvwsxbgnvk") - .withMaxEventsPerBatch(1109483732) - .withPreferredBatchSizeInKilobytes(1583962406) - .withAzureActiveDirectoryTenantId("pabdsrg") - .withAzureActiveDirectoryApplicationIdOrUri("jglzrsubklrxhjnl") - .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("jdvqy"), - new DeliveryAttributeMapping().withName("eqq"), - new DeliveryAttributeMapping().withName("aruwdxvqzxoebw"), - new DeliveryAttributeMapping().withName("xbibanbaupw"))) - .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO); + WebhookEventSubscriptionDestination model = new WebhookEventSubscriptionDestination().withEndpointUrl("eazulcs") + .withMaxEventsPerBatch(574230298) + .withPreferredBatchSizeInKilobytes(307378678) + .withAzureActiveDirectoryTenantId("swpchwahfbousn") + .withAzureActiveDirectoryApplicationIdOrUri("pgfewetwlyx") + .withDeliveryAttributeMappings(Arrays.asList(new DeliveryAttributeMapping().withName("ykxhdjh"))) + .withMinimumTlsVersionAllowed(TlsVersion.ONE_TWO); model = BinaryData.fromObject(model).toObject(WebhookEventSubscriptionDestination.class); - Assertions.assertEquals("uvwsxbgnvk", model.endpointUrl()); - Assertions.assertEquals(1109483732, model.maxEventsPerBatch()); - Assertions.assertEquals(1583962406, model.preferredBatchSizeInKilobytes()); - Assertions.assertEquals("pabdsrg", model.azureActiveDirectoryTenantId()); - Assertions.assertEquals("jglzrsubklrxhjnl", model.azureActiveDirectoryApplicationIdOrUri()); - Assertions.assertEquals("jdvqy", model.deliveryAttributeMappings().get(0).name()); + Assertions.assertEquals("eazulcs", model.endpointUrl()); + Assertions.assertEquals(574230298, model.maxEventsPerBatch()); + Assertions.assertEquals(307378678, model.preferredBatchSizeInKilobytes()); + Assertions.assertEquals("swpchwahfbousn", model.azureActiveDirectoryTenantId()); + Assertions.assertEquals("pgfewetwlyx", model.azureActiveDirectoryApplicationIdOrUri()); + Assertions.assertEquals("ykxhdjh", model.deliveryAttributeMappings().get(0).name()); Assertions.assertEquals(TlsVersion.ONE_TWO, 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 index cc560017701e5..7133331c4419c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -16,52 +16,49 @@ public final class WebhookPartnerDestinationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookPartnerDestinationInfo model = BinaryData.fromString( - "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"lin\",\"endpointBaseUrl\":\"yqxzxaqzibmqim\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}},\"azureSubscriptionId\":\"qruqguh\",\"resourceGroupName\":\"petasvvoqsb\",\"name\":\"flanfkgxsyao\",\"endpointServiceContext\":\"zowpuohdkcprgukx\",\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"ochlu\",\"resourceGroupName\":\"xmqrudjizc\",\"changedTimeUtc\":\"2021-09-21T06:40:09Z\"},{\"azureSubscriptionId\":\"crunfhi\",\"resourceGroupName\":\"nmfbc\",\"changedTimeUtc\":\"2021-08-27T10:11:42Z\"},{\"azureSubscriptionId\":\"tk\",\"resourceGroupName\":\"mzuedkyzbfvxovq\",\"changedTimeUtc\":\"2021-09-14T20:49:29Z\"},{\"azureSubscriptionId\":\"xqggvqr\",\"resourceGroupName\":\"yhlwcjsqg\",\"changedTimeUtc\":\"2021-09-27T19:32:09Z\"}]}") + "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"sfxobl\",\"endpointBaseUrl\":\"k\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}},\"resourceMoveChangeHistory\":[{\"azureSubscriptionId\":\"fbjfdtwssotftpvj\",\"resourceGroupName\":\"exilzznfqqnvwpmq\",\"changedTimeUtc\":\"2021-06-07T17:58:08Z\"},{\"azureSubscriptionId\":\"oujmkcjhwqytj\",\"resourceGroupName\":\"bnw\",\"changedTimeUtc\":\"2021-08-28T18:20:54Z\"},{\"azureSubscriptionId\":\"drjervnaenqpehin\",\"resourceGroupName\":\"ygmi\",\"changedTimeUtc\":\"2021-05-30T21:32:13Z\"}],\"azureSubscriptionId\":\"hxcr\",\"resourceGroupName\":\"fovasr\",\"name\":\"v\",\"endpointServiceContext\":\"hsqfsubcgjbirxbp\"}") .toObject(WebhookPartnerDestinationInfo.class); - Assertions.assertEquals("qruqguh", model.azureSubscriptionId()); - Assertions.assertEquals("petasvvoqsb", model.resourceGroupName()); - Assertions.assertEquals("flanfkgxsyao", model.name()); - Assertions.assertEquals("zowpuohdkcprgukx", model.endpointServiceContext()); - Assertions.assertEquals("ochlu", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("xmqrudjizc", model.resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T06:40:09Z"), + Assertions.assertEquals("hxcr", model.azureSubscriptionId()); + Assertions.assertEquals("fovasr", model.resourceGroupName()); + Assertions.assertEquals("v", model.name()); + Assertions.assertEquals("hsqfsubcgjbirxbp", model.endpointServiceContext()); + Assertions.assertEquals("fbjfdtwssotftpvj", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); + Assertions.assertEquals("exilzznfqqnvwpmq", model.resourceMoveChangeHistory().get(0).resourceGroupName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-07T17:58:08Z"), model.resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("lin", model.endpointUrl()); - Assertions.assertEquals("yqxzxaqzibmqim", model.endpointBaseUrl()); + Assertions.assertEquals("sfxobl", model.endpointUrl()); + Assertions.assertEquals("k", model.endpointBaseUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookPartnerDestinationInfo model = new WebhookPartnerDestinationInfo().withAzureSubscriptionId("qruqguh") - .withResourceGroupName("petasvvoqsb") - .withName("flanfkgxsyao") - .withEndpointServiceContext("zowpuohdkcprgukx") + WebhookPartnerDestinationInfo model = new WebhookPartnerDestinationInfo().withAzureSubscriptionId("hxcr") + .withResourceGroupName("fovasr") + .withName("v") + .withEndpointServiceContext("hsqfsubcgjbirxbp") .withResourceMoveChangeHistory(Arrays.asList( - new ResourceMoveChangeHistory().withAzureSubscriptionId("ochlu") - .withResourceGroupName("xmqrudjizc") - .withChangedTimeUtc(OffsetDateTime.parse("2021-09-21T06:40:09Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("crunfhi") - .withResourceGroupName("nmfbc") - .withChangedTimeUtc(OffsetDateTime.parse("2021-08-27T10:11:42Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("tk") - .withResourceGroupName("mzuedkyzbfvxovq") - .withChangedTimeUtc(OffsetDateTime.parse("2021-09-14T20:49:29Z")), - new ResourceMoveChangeHistory().withAzureSubscriptionId("xqggvqr") - .withResourceGroupName("yhlwcjsqg") - .withChangedTimeUtc(OffsetDateTime.parse("2021-09-27T19:32:09Z")))) - .withEndpointUrl("lin") - .withEndpointBaseUrl("yqxzxaqzibmqim") + new ResourceMoveChangeHistory().withAzureSubscriptionId("fbjfdtwssotftpvj") + .withResourceGroupName("exilzznfqqnvwpmq") + .withChangedTimeUtc(OffsetDateTime.parse("2021-06-07T17:58:08Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("oujmkcjhwqytj") + .withResourceGroupName("bnw") + .withChangedTimeUtc(OffsetDateTime.parse("2021-08-28T18:20:54Z")), + new ResourceMoveChangeHistory().withAzureSubscriptionId("drjervnaenqpehin") + .withResourceGroupName("ygmi") + .withChangedTimeUtc(OffsetDateTime.parse("2021-05-30T21:32:13Z")))) + .withEndpointUrl("sfxobl") + .withEndpointBaseUrl("k") .withClientAuthentication(new PartnerClientAuthentication()); model = BinaryData.fromObject(model).toObject(WebhookPartnerDestinationInfo.class); - Assertions.assertEquals("qruqguh", model.azureSubscriptionId()); - Assertions.assertEquals("petasvvoqsb", model.resourceGroupName()); - Assertions.assertEquals("flanfkgxsyao", model.name()); - Assertions.assertEquals("zowpuohdkcprgukx", model.endpointServiceContext()); - Assertions.assertEquals("ochlu", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); - Assertions.assertEquals("xmqrudjizc", model.resourceMoveChangeHistory().get(0).resourceGroupName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T06:40:09Z"), + Assertions.assertEquals("hxcr", model.azureSubscriptionId()); + Assertions.assertEquals("fovasr", model.resourceGroupName()); + Assertions.assertEquals("v", model.name()); + Assertions.assertEquals("hsqfsubcgjbirxbp", model.endpointServiceContext()); + Assertions.assertEquals("fbjfdtwssotftpvj", model.resourceMoveChangeHistory().get(0).azureSubscriptionId()); + Assertions.assertEquals("exilzznfqqnvwpmq", model.resourceMoveChangeHistory().get(0).resourceGroupName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-07T17:58:08Z"), model.resourceMoveChangeHistory().get(0).changedTimeUtc()); - Assertions.assertEquals("lin", model.endpointUrl()); - Assertions.assertEquals("yqxzxaqzibmqim", model.endpointBaseUrl()); + Assertions.assertEquals("sfxobl", model.endpointUrl()); + Assertions.assertEquals("k", 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 index 1f33359978698..22a4aa42b0b2f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,19 +13,19 @@ public final class WebhookPartnerDestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookPartnerDestinationProperties model = BinaryData.fromString( - "{\"endpointUrl\":\"rakkld\",\"endpointBaseUrl\":\"c\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}}") + "{\"endpointUrl\":\"zdnds\",\"endpointBaseUrl\":\"nayqi\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}}") .toObject(WebhookPartnerDestinationProperties.class); - Assertions.assertEquals("rakkld", model.endpointUrl()); - Assertions.assertEquals("c", model.endpointBaseUrl()); + Assertions.assertEquals("zdnds", model.endpointUrl()); + Assertions.assertEquals("nayqi", model.endpointBaseUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebhookPartnerDestinationProperties model = new WebhookPartnerDestinationProperties().withEndpointUrl("rakkld") - .withEndpointBaseUrl("c") + WebhookPartnerDestinationProperties model = new WebhookPartnerDestinationProperties().withEndpointUrl("zdnds") + .withEndpointBaseUrl("nayqi") .withClientAuthentication(new PartnerClientAuthentication()); model = BinaryData.fromObject(model).toObject(WebhookPartnerDestinationProperties.class); - Assertions.assertEquals("rakkld", model.endpointUrl()); - Assertions.assertEquals("c", model.endpointBaseUrl()); + Assertions.assertEquals("zdnds", model.endpointUrl()); + Assertions.assertEquals("nayqi", 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 index 95d141df98365..7918d62a20682 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.eventgrid.generated; @@ -13,20 +13,20 @@ public final class WebhookUpdatePartnerDestinationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebhookUpdatePartnerDestinationInfo model = BinaryData.fromString( - "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"bxrqrkijp\",\"endpointBaseUrl\":\"qlsdxeqztvxwmw\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}}}") + "{\"endpointType\":\"WebHook\",\"properties\":{\"endpointUrl\":\"wkfvhqcrailvp\",\"endpointBaseUrl\":\"pfuflrw\",\"clientAuthentication\":{\"clientAuthenticationType\":\"PartnerClientAuthentication\"}}}") .toObject(WebhookUpdatePartnerDestinationInfo.class); - Assertions.assertEquals("bxrqrkijp", model.endpointUrl()); - Assertions.assertEquals("qlsdxeqztvxwmw", model.endpointBaseUrl()); + Assertions.assertEquals("wkfvhqcrailvp", model.endpointUrl()); + Assertions.assertEquals("pfuflrw", model.endpointBaseUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WebhookUpdatePartnerDestinationInfo model - = new WebhookUpdatePartnerDestinationInfo().withEndpointUrl("bxrqrkijp") - .withEndpointBaseUrl("qlsdxeqztvxwmw") + = new WebhookUpdatePartnerDestinationInfo().withEndpointUrl("wkfvhqcrailvp") + .withEndpointBaseUrl("pfuflrw") .withClientAuthentication(new PartnerClientAuthentication()); model = BinaryData.fromObject(model).toObject(WebhookUpdatePartnerDestinationInfo.class); - Assertions.assertEquals("bxrqrkijp", model.endpointUrl()); - Assertions.assertEquals("qlsdxeqztvxwmw", model.endpointBaseUrl()); + Assertions.assertEquals("wkfvhqcrailvp", model.endpointUrl()); + Assertions.assertEquals("pfuflrw", model.endpointBaseUrl()); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/tsp-location.yaml b/sdk/eventgrid/azure-resourcemanager-eventgrid/tsp-location.yaml new file mode 100644 index 0000000000000..af10e0a2f9377 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/eventgrid/resource-manager/Microsoft.EventGrid/EventGrid +commit: 88e2199d770d74f3061a162824185fd6894cb7d7 +repo: Azure/azure-rest-api-specs +additionalDirectories: From 9b1f6194db2475b63a400e17bfaa586395b5af0a Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 25 Nov 2026 12:29:00 +0800 Subject: [PATCH 2/2] Regenerate management SDK with Java emitter 0.49.2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 21414032-74cf-43a0-b7a5-6b4cb46e104f --- .../implementation/CaCertificateImpl.java | 16 +- .../CaCertificatesClientImpl.java | 231 +---- .../implementation/CaCertificatesImpl.java | 96 +- .../eventgrid/implementation/ChannelImpl.java | 20 +- .../implementation/ChannelsClientImpl.java | 245 +----- .../implementation/ChannelsImpl.java | 99 +-- .../implementation/ClientGroupImpl.java | 16 +- .../ClientGroupsClientImpl.java | 229 +---- .../implementation/ClientGroupsImpl.java | 96 +- .../eventgrid/implementation/ClientImpl.java | 16 +- .../implementation/ClientsClientImpl.java | 227 +---- .../eventgrid/implementation/ClientsImpl.java | 96 +- .../DomainEventSubscriptionsClientImpl.java | 380 +------- .../DomainEventSubscriptionsImpl.java | 20 +- .../eventgrid/implementation/DomainImpl.java | 16 +- ...mainTopicEventSubscriptionsClientImpl.java | 404 +-------- .../DomainTopicEventSubscriptionsImpl.java | 20 +- .../DomainTopicsClientImpl.java | 220 +---- .../implementation/DomainTopicsImpl.java | 9 +- .../implementation/DomainsClientImpl.java | 387 +-------- .../eventgrid/implementation/DomainsImpl.java | 66 +- .../EventGridManagementClientImpl.java | 42 +- .../implementation/EventSubscriptionImpl.java | 16 +- .../EventSubscriptionsClientImpl.java | 818 ++---------------- .../EventSubscriptionsImpl.java | 66 +- .../ExtensionTopicsClientImpl.java | 29 +- .../implementation/NamespaceImpl.java | 16 +- ...paceTopicEventSubscriptionsClientImpl.java | 413 +-------- .../NamespaceTopicEventSubscriptionsImpl.java | 127 +-- .../implementation/NamespaceTopicImpl.java | 16 +- .../NamespaceTopicsClientImpl.java | 419 +-------- .../implementation/NamespaceTopicsImpl.java | 104 +-- .../implementation/NamespacesClientImpl.java | 501 ++--------- .../implementation/NamespacesImpl.java | 82 +- ...rityPerimeterConfigurationsClientImpl.java | 179 +--- ...rkSecurityPerimeterConfigurationsImpl.java | 14 +- .../implementation/OperationsClientImpl.java | 36 +- .../implementation/OperationsImpl.java | 3 +- .../PartnerConfigurationsClientImpl.java | 363 +------- .../PartnerConfigurationsImpl.java | 21 +- .../PartnerDestinationImpl.java | 16 +- .../PartnerDestinationsClientImpl.java | 364 +------- .../PartnerDestinationsImpl.java | 66 +- .../implementation/PartnerNamespaceImpl.java | 16 +- .../PartnerNamespacesClientImpl.java | 392 +-------- .../implementation/PartnerNamespacesImpl.java | 66 +- .../PartnerRegistrationImpl.java | 17 +- .../PartnerRegistrationsClientImpl.java | 340 +------- .../PartnerRegistrationsImpl.java | 66 +- ...tnerTopicEventSubscriptionsClientImpl.java | 386 +-------- .../PartnerTopicEventSubscriptionsImpl.java | 20 +- .../implementation/PartnerTopicImpl.java | 18 +- .../PartnerTopicsClientImpl.java | 297 +------ .../implementation/PartnerTopicsImpl.java | 66 +- .../implementation/PermissionBindingImpl.java | 16 +- .../PermissionBindingsClientImpl.java | 233 +---- .../PermissionBindingsImpl.java | 96 +- .../PrivateEndpointConnectionsClientImpl.java | 286 +----- .../PrivateEndpointConnectionsImpl.java | 12 +- .../PrivateLinkResourcesClientImpl.java | 98 +-- .../implementation/ResourceManagerUtils.java | 11 + .../implementation/SubscriptionImpl.java | 18 +- ...stemTopicEventSubscriptionsClientImpl.java | 386 +-------- .../SystemTopicEventSubscriptionsImpl.java | 20 +- .../implementation/SystemTopicImpl.java | 16 +- .../SystemTopicsClientImpl.java | 332 +------ .../implementation/SystemTopicsImpl.java | 66 +- .../TopicEventSubscriptionsClientImpl.java | 378 +------- .../TopicEventSubscriptionsImpl.java | 20 +- .../eventgrid/implementation/TopicImpl.java | 16 +- .../implementation/TopicSpaceImpl.java | 16 +- .../implementation/TopicSpacesClientImpl.java | 229 +---- .../implementation/TopicSpacesImpl.java | 96 +- .../implementation/TopicTypesClientImpl.java | 105 +-- .../implementation/TopicTypesImpl.java | 6 +- .../implementation/TopicsClientImpl.java | 480 ++-------- .../eventgrid/implementation/TopicsImpl.java | 78 +- .../VerifiedPartnersClientImpl.java | 72 +- 78 files changed, 1404 insertions(+), 9986 deletions(-) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java index acc7ef425e0b6..7beb8751e2772 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java @@ -77,10 +77,7 @@ public CaCertificateImpl withExistingNamespace(String resourceGroupName, String } public CaCertificate create() { - this.innerObject = serviceManager.serviceClient() - .getCaCertificates() - .createOrUpdate(resourceGroupName, namespaceName, caCertificateName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public CaCertificate create(Context context) { @@ -101,10 +98,7 @@ public CaCertificateImpl update() { } public CaCertificate apply() { - this.innerObject = serviceManager.serviceClient() - .getCaCertificates() - .createOrUpdate(resourceGroupName, namespaceName, caCertificateName, this.innerModel(), Context.NONE); - return this; + return this.apply(Context.NONE); } public CaCertificate apply(Context context) { @@ -130,11 +124,7 @@ public CaCertificate apply(Context context) { } public CaCertificate refresh() { - this.innerObject = serviceManager.serviceClient() - .getCaCertificates() - .getWithResponse(resourceGroupName, namespaceName, caCertificateName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public CaCertificate refresh(Context context) { 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 c09efe4955eae..00a8d497512d9 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 @@ -213,22 +213,7 @@ private Mono getAsync(String resourceGroupName, String names .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a CA certificate. - * - * Get properties of a CA certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CA certificate. - * - * Get properties of a CA certificate along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String caCertificateName, Context context) { @@ -237,21 +222,7 @@ public Response getWithResponse(String resourceGroupName, St resourceGroupName, namespaceName, caCertificateName, accept, context); } - /** - * Get a CA certificate. - * - * Get properties of a CA certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CA certificate. - * - * Get properties of a CA certificate. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public CaCertificateInner get(String resourceGroupName, String namespaceName, String caCertificateName) { return getWithResponse(resourceGroupName, namespaceName, caCertificateName, Context.NONE).getValue(); @@ -300,11 +271,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, contentType, accept, - caCertificateInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, + Context.NONE); } /** @@ -356,44 +324,15 @@ private PollerFlux, CaCertificateInner> beginCrea CaCertificateInner.class, CaCertificateInner.class, this.client.getContext()); } - /** - * Create or update a CA certificate. - * - * Create or update a CA certificate with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @param caCertificateInfo CA certificate information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the CA Certificate resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CaCertificateInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo); - return this.client.getLroResult(response, CaCertificateInner.class, - CaCertificateInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, + Context.NONE); } - /** - * Create or update a CA certificate. - * - * Create or update a CA certificate with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @param caCertificateInfo CA certificate information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the CA Certificate resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CaCertificateInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo, Context context) { @@ -424,47 +363,19 @@ private Mono createOrUpdateAsync(String resourceGroupName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a CA certificate. - * - * Create or update a CA certificate with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @param caCertificateInfo CA certificate information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the CA Certificate resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public CaCertificateInner createOrUpdate(String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo) - .getFinalResult(); + return createOrUpdate(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, Context.NONE); } - /** - * Create or update a CA certificate. - * - * Create or update a CA certificate with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @param caCertificateInfo CA certificate information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the CA Certificate resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public CaCertificateInner createOrUpdate(String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, context)); } /** @@ -505,8 +416,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String caCertificateName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, caCertificateName, Context.NONE); + return deleteWithResponse(resourceGroupName, namespaceName, caCertificateName, Context.NONE); } /** @@ -552,40 +462,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a CA certificate. - * - * Delete an existing CA certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String caCertificateName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, caCertificateName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, namespaceName, caCertificateName, Context.NONE); } - /** - * Delete a CA certificate. - * - * Delete an existing CA certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String caCertificateName, Context context) { @@ -613,39 +497,16 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a CA certificate. - * - * Delete an existing CA certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String caCertificateName) { - beginDelete(resourceGroupName, namespaceName, caCertificateName).getFinalResult(); + delete(resourceGroupName, namespaceName, caCertificateName, Context.NONE); } - /** - * Delete a CA certificate. - * - * Delete an existing CA certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param caCertificateName Name of the CA certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String caCertificateName, Context context) { - beginDelete(resourceGroupName, namespaceName, caCertificateName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, namespaceName, caCertificateName, context)); } /** @@ -748,12 +609,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top, Context.NONE); } /** @@ -787,46 +643,15 @@ private PagedResponse listByNamespaceSinglePage(String resou res.getValue().nextLink(), null); } - /** - * List all CA certificates under a namespace. - * - * Get all the CA certificates under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List CA Certificate operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top), - nextLink -> listByNamespaceNextSinglePage(nextLink)); + return listByNamespace(resourceGroupName, namespaceName, filter, top, Context.NONE); } - /** - * List all CA certificates under a namespace. - * - * Get all the CA certificates under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List CA Certificate operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { @@ -870,11 +695,7 @@ private Mono> listByNamespaceNextSinglePageAsy */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java index 511942f89d771..16144c32aa1cf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java @@ -45,7 +45,7 @@ public CaCertificate get(String resourceGroupName, String namespaceName, String } public void delete(String resourceGroupName, String namespaceName, String caCertificateName) { - this.serviceClient().delete(resourceGroupName, namespaceName, caCertificateName); + this.delete(resourceGroupName, namespaceName, caCertificateName, Context.NONE); } public void delete(String resourceGroupName, String namespaceName, String caCertificateName, Context context) { @@ -66,102 +66,36 @@ public PagedIterable listByNamespace(String resourceGroupName, St } public CaCertificate getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String caCertificateName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "caCertificateName"); - if (caCertificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'caCertificates'.", id))); - } - return this.getWithResponse(resourceGroupName, namespaceName, caCertificateName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String caCertificateName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String caCertificateName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "caCertificateName"); - if (caCertificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'caCertificates'.", id))); - } + "caCertificateName", "caCertificates", LOGGER); return this.getWithResponse(resourceGroupName, namespaceName, caCertificateName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String caCertificateName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "caCertificateName"); - if (caCertificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'caCertificates'.", id))); - } - this.delete(resourceGroupName, namespaceName, caCertificateName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String caCertificateName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String caCertificateName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}", - "caCertificateName"); - if (caCertificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'caCertificates'.", id))); - } + "caCertificateName", "caCertificates", LOGGER); this.delete(resourceGroupName, namespaceName, caCertificateName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java index ea7a587396276..369844f64b73f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java @@ -91,12 +91,7 @@ public ChannelImpl withExistingPartnerNamespace(String resourceGroupName, String } public Channel create() { - this.innerObject = serviceManager.serviceClient() - .getChannels() - .createOrUpdateWithResponse(resourceGroupName, partnerNamespaceName, channelName, this.innerModel(), - Context.NONE) - .getValue(); - return this; + return this.create(Context.NONE); } public Channel create(Context context) { @@ -119,12 +114,7 @@ public ChannelImpl update() { } public Channel apply() { - this.innerObject = serviceManager.serviceClient() - .getChannels() - .createOrUpdateWithResponse(resourceGroupName, partnerNamespaceName, channelName, this.innerModel(), - Context.NONE) - .getValue(); - return this; + return this.apply(Context.NONE); } public Channel apply(Context context) { @@ -151,11 +141,7 @@ public Channel apply(Context context) { } public Channel refresh() { - this.innerObject = serviceManager.serviceClient() - .getChannels() - .getWithResponse(resourceGroupName, partnerNamespaceName, channelName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public Channel refresh(Context context) { 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 17e80d09bf0d7..d5b01979b0c6b 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 @@ -261,22 +261,7 @@ private Mono getAsync(String resourceGroupName, String partnerName .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a channel. - * - * Get properties of a channel. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a channel. - * - * Get properties of a channel along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { @@ -285,21 +270,7 @@ public Response getWithResponse(String resourceGroupName, String p resourceGroupName, partnerNamespaceName, channelName, accept, context); } - /** - * Get a channel. - * - * Get properties of a channel. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a channel. - * - * Get properties of a channel. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ChannelInner get(String resourceGroupName, String partnerNamespaceName, String channelName) { return getWithResponse(resourceGroupName, partnerNamespaceName, channelName, Context.NONE).getValue(); @@ -352,21 +323,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Create or update a channel. - * - * Synchronously creates or updates a new channel with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param channelInfo Channel information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return channel info along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, ChannelInner channelInfo, Context context) { @@ -377,20 +334,7 @@ public Response createOrUpdateWithResponse(String resourceGroupNam channelInfo, context); } - /** - * Create or update a channel. - * - * Synchronously creates or updates a new channel with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param channelInfo Channel information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return channel info. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ChannelInner createOrUpdate(String resourceGroupName, String partnerNamespaceName, String channelName, ChannelInner channelInfo) { @@ -444,21 +388,7 @@ private Mono updateAsync(String resourceGroupName, String partnerNamespace .flatMap(ignored -> Mono.empty()); } - /** - * Update a Channel. - * - * Synchronously updates a channel with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, ChannelUpdateParameters channelUpdateParameters, Context context) { @@ -468,19 +398,7 @@ public Response updateWithResponse(String resourceGroupName, String partne channelUpdateParameters, context); } - /** - * Update a Channel. - * - * Synchronously updates a channel with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param channelUpdateParameters Channel update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void update(String resourceGroupName, String partnerNamespaceName, String channelName, ChannelUpdateParameters channelUpdateParameters) { @@ -525,8 +443,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, Context.NONE); + return deleteWithResponse(resourceGroupName, partnerNamespaceName, channelName, Context.NONE); } /** @@ -572,40 +489,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a channel. - * - * Delete an existing channel. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, String channelName) { - Response response = deleteWithResponse(resourceGroupName, partnerNamespaceName, channelName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, partnerNamespaceName, channelName, Context.NONE); } - /** - * Delete a channel. - * - * Delete an existing channel. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { @@ -633,39 +524,17 @@ private Mono deleteAsync(String resourceGroupName, String partnerNamespace .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a channel. - * - * Delete an existing channel. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerNamespaceName, String channelName) { - beginDelete(resourceGroupName, partnerNamespaceName, channelName).getFinalResult(); + delete(resourceGroupName, partnerNamespaceName, channelName, Context.NONE); } - /** - * Delete a channel. - * - * Delete an existing channel. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { - beginDelete(resourceGroupName, partnerNamespaceName, channelName, context).getFinalResult(); + this.client + .getLroFinalResultOrError(beginDelete(resourceGroupName, partnerNamespaceName, channelName, context)); } /** @@ -771,12 +640,7 @@ private PagedFlux listByPartnerNamespaceAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerNamespaceSinglePage(String resourceGroupName, String partnerNamespaceName, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listByPartnerNamespaceSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, - filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByPartnerNamespaceSinglePage(resourceGroupName, partnerNamespaceName, filter, top, Context.NONE); } /** @@ -810,47 +674,15 @@ private PagedResponse listByPartnerNamespaceSinglePage(String reso res.getValue().nextLink(), null); } - /** - * List channels. - * - * List all the channels in a partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Channels operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByPartnerNamespace(String resourceGroupName, String partnerNamespaceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listByPartnerNamespaceSinglePage(resourceGroupName, partnerNamespaceName, filter, top), - nextLink -> listByPartnerNamespaceNextSinglePage(nextLink)); + return listByPartnerNamespace(resourceGroupName, partnerNamespaceName, filter, top, Context.NONE); } - /** - * List channels. - * - * List all the channels in a partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Channels operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByPartnerNamespace(String resourceGroupName, String partnerNamespaceName, String filter, Integer top, Context context) { @@ -907,22 +739,7 @@ private Mono getFullUrlAsync(String resourceGroup .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get full URL of partner destination channel. - * - * Get the full endpoint URL of a partner destination channel. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of partner destination channel. - * - * Get the full endpoint URL of a partner destination channel along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { @@ -931,21 +748,7 @@ public Response getFullUrlWithResponse(String res this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, channelName, accept, context); } - /** - * Get full URL of partner destination channel. - * - * Get the full endpoint URL of a partner destination channel. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of partner destination channel. - * - * Get the full endpoint URL of a partner destination channel. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerNamespaceName, String channelName) { @@ -988,11 +791,7 @@ private Mono> listByPartnerNamespaceNextSinglePageAs */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerNamespaceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByPartnerNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByPartnerNamespaceNextSinglePage(nextLink, Context.NONE); } /** 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 eb17e5d985a95..3543e9a85b20d 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 @@ -55,11 +55,12 @@ public Response updateWithResponse(String resourceGroupName, String partne public void update(String resourceGroupName, String partnerNamespaceName, String channelName, ChannelUpdateParameters channelUpdateParameters) { - this.serviceClient().update(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters); + this.updateWithResponse(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters, + Context.NONE); } public void delete(String resourceGroupName, String partnerNamespaceName, String channelName) { - this.serviceClient().delete(resourceGroupName, partnerNamespaceName, channelName); + this.delete(resourceGroupName, partnerNamespaceName, channelName, Context.NONE); } public void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { @@ -99,102 +100,36 @@ public EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String part } public Channel getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerNamespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "partnerNamespaceName"); - if (partnerNamespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerNamespaces'.", id))); - } - String channelName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "channelName"); - if (channelName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'channels'.", id))); - } - return this.getWithResponse(resourceGroupName, partnerNamespaceName, channelName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerNamespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerNamespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "partnerNamespaceName"); - if (partnerNamespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerNamespaces'.", id))); - } - String channelName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "partnerNamespaceName", "partnerNamespaces", LOGGER); + String channelName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "channelName"); - if (channelName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'channels'.", id))); - } + "channelName", "channels", LOGGER); return this.getWithResponse(resourceGroupName, partnerNamespaceName, channelName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerNamespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "partnerNamespaceName"); - if (partnerNamespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerNamespaces'.", id))); - } - String channelName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "channelName"); - if (channelName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'channels'.", id))); - } - this.delete(resourceGroupName, partnerNamespaceName, channelName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerNamespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerNamespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "partnerNamespaceName"); - if (partnerNamespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerNamespaces'.", id))); - } - String channelName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "partnerNamespaceName", "partnerNamespaces", LOGGER); + String channelName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}", - "channelName"); - if (channelName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'channels'.", id))); - } + "channelName", "channels", LOGGER); this.delete(resourceGroupName, partnerNamespaceName, channelName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java index 562bed8aadae7..b1ba22693fea9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java @@ -68,10 +68,7 @@ public ClientGroupImpl withExistingNamespace(String resourceGroupName, String na } public ClientGroup create() { - this.innerObject = serviceManager.serviceClient() - .getClientGroups() - .createOrUpdate(resourceGroupName, namespaceName, clientGroupName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public ClientGroup create(Context context) { @@ -92,10 +89,7 @@ public ClientGroupImpl update() { } public ClientGroup apply() { - this.innerObject = serviceManager.serviceClient() - .getClientGroups() - .createOrUpdate(resourceGroupName, namespaceName, clientGroupName, this.innerModel(), Context.NONE); - return this; + return this.apply(Context.NONE); } public ClientGroup apply(Context context) { @@ -120,11 +114,7 @@ public ClientGroup apply(Context context) { } public ClientGroup refresh() { - this.innerObject = serviceManager.serviceClient() - .getClientGroups() - .getWithResponse(resourceGroupName, namespaceName, clientGroupName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public ClientGroup refresh(Context context) { 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 10eda61709073..5d3028601f136 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 @@ -212,22 +212,7 @@ private Mono getAsync(String resourceGroupName, String namespa .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a client group. - * - * Get properties of a client group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a client group. - * - * Get properties of a client group along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String clientGroupName, Context context) { @@ -236,21 +221,7 @@ public Response getWithResponse(String resourceGroupName, Stri resourceGroupName, namespaceName, clientGroupName, accept, context); } - /** - * Get a client group. - * - * Get properties of a client group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a client group. - * - * Get properties of a client group. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ClientGroupInner get(String resourceGroupName, String namespaceName, String clientGroupName) { return getWithResponse(resourceGroupName, namespaceName, clientGroupName, Context.NONE).getValue(); @@ -299,11 +270,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, contentType, accept, - clientGroupInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, + Context.NONE); } /** @@ -354,44 +322,14 @@ private PollerFlux, ClientGroupInner> beginCreateOr ClientGroupInner.class, ClientGroupInner.class, this.client.getContext()); } - /** - * Create or update a client group. - * - * Create or update a client group with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @param clientGroupInfo Client group information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Client group resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClientGroupInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo); - return this.client.getLroResult(response, ClientGroupInner.class, - ClientGroupInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, Context.NONE); } - /** - * Create or update a client group. - * - * Create or update a client group with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @param clientGroupInfo Client group information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Client group resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClientGroupInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo, Context context) { @@ -422,46 +360,19 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a client group. - * - * Create or update a client group with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @param clientGroupInfo Client group information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Client group resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ClientGroupInner createOrUpdate(String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, Context.NONE); } - /** - * Create or update a client group. - * - * Create or update a client group with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @param clientGroupInfo Client group information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Client group resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ClientGroupInner createOrUpdate(String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, context)); } /** @@ -502,8 +413,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String clientGroupName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientGroupName, Context.NONE); + return deleteWithResponse(resourceGroupName, namespaceName, clientGroupName, Context.NONE); } /** @@ -549,40 +459,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a client group. - * - * Delete an existing client group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String clientGroupName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, clientGroupName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, namespaceName, clientGroupName, Context.NONE); } - /** - * Delete a client group. - * - * Delete an existing client group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String clientGroupName, Context context) { @@ -609,39 +493,16 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a client group. - * - * Delete an existing client group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String clientGroupName) { - beginDelete(resourceGroupName, namespaceName, clientGroupName).getFinalResult(); + delete(resourceGroupName, namespaceName, clientGroupName, Context.NONE); } - /** - * Delete a client group. - * - * Delete an existing client group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientGroupName Name of the client group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String clientGroupName, Context context) { - beginDelete(resourceGroupName, namespaceName, clientGroupName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, namespaceName, clientGroupName, context)); } /** @@ -744,12 +605,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top, Context.NONE); } /** @@ -783,46 +639,15 @@ private PagedResponse listByNamespaceSinglePage(String resourc res.getValue().nextLink(), null); } - /** - * List all client groups under a namespace. - * - * Get all the client groups under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Client Group operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top), - nextLink -> listByNamespaceNextSinglePage(nextLink)); + return listByNamespace(resourceGroupName, namespaceName, filter, top, Context.NONE); } - /** - * List all client groups under a namespace. - * - * Get all the client groups under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Client Group operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { @@ -866,11 +691,7 @@ private Mono> listByNamespaceNextSinglePageAsync */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java index 128b84494c0a8..e58625a27f41a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java @@ -45,7 +45,7 @@ public ClientGroup get(String resourceGroupName, String namespaceName, String cl } public void delete(String resourceGroupName, String namespaceName, String clientGroupName) { - this.serviceClient().delete(resourceGroupName, namespaceName, clientGroupName); + this.delete(resourceGroupName, namespaceName, clientGroupName, Context.NONE); } public void delete(String resourceGroupName, String namespaceName, String clientGroupName, Context context) { @@ -65,102 +65,36 @@ public PagedIterable listByNamespace(String resourceGroupName, Stri } public ClientGroup getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String clientGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "clientGroupName"); - if (clientGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clientGroups'.", id))); - } - return this.getWithResponse(resourceGroupName, namespaceName, clientGroupName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String clientGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String clientGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "clientGroupName"); - if (clientGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clientGroups'.", id))); - } + "clientGroupName", "clientGroups", LOGGER); return this.getWithResponse(resourceGroupName, namespaceName, clientGroupName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String clientGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "clientGroupName"); - if (clientGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clientGroups'.", id))); - } - this.delete(resourceGroupName, namespaceName, clientGroupName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String clientGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String clientGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}", - "clientGroupName"); - if (clientGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clientGroups'.", id))); - } + "clientGroupName", "clientGroups", LOGGER); this.delete(resourceGroupName, namespaceName, clientGroupName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java index 37466026b1ac6..d99f00085d4c2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java @@ -89,10 +89,7 @@ public ClientImpl withExistingNamespace(String resourceGroupName, String namespa } public Client create() { - this.innerObject = serviceManager.serviceClient() - .getClients() - .createOrUpdate(resourceGroupName, namespaceName, clientName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public Client create(Context context) { @@ -113,10 +110,7 @@ public ClientImpl update() { } public Client apply() { - this.innerObject = serviceManager.serviceClient() - .getClients() - .createOrUpdate(resourceGroupName, namespaceName, clientName, this.innerModel(), Context.NONE); - return this; + return this.apply(Context.NONE); } public Client apply(Context context) { @@ -141,11 +135,7 @@ public Client apply(Context context) { } public Client refresh() { - this.innerObject = serviceManager.serviceClient() - .getClients() - .getWithResponse(resourceGroupName, namespaceName, clientName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public Client refresh(Context context) { 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 7b1e73983c9f9..e7d6609f8b721 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 @@ -209,22 +209,7 @@ private Mono getAsync(String resourceGroupName, String namespaceNam .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a client. - * - * Get properties of a client. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a client. - * - * Get properties of a client along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String clientName, Context context) { @@ -233,21 +218,7 @@ public Response getWithResponse(String resourceGroupName, String na resourceGroupName, namespaceName, clientName, accept, context); } - /** - * Get a client. - * - * Get properties of a client. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a client. - * - * Get properties of a client. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ClientInner get(String resourceGroupName, String namespaceName, String clientName) { return getWithResponse(resourceGroupName, namespaceName, clientName, Context.NONE).getValue(); @@ -296,11 +267,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, contentType, accept, - clientInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, namespaceName, clientName, clientInfo, Context.NONE); } /** @@ -351,44 +318,14 @@ private PollerFlux, ClientInner> beginCreateOrUpdateAsyn ClientInner.class, ClientInner.class, this.client.getContext()); } - /** - * Create or update a client. - * - * Create or update a client with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @param clientInfo Client information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Client resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClientInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, namespaceName, clientName, clientInfo); - return this.client.getLroResult(response, ClientInner.class, ClientInner.class, - Context.NONE); + return beginCreateOrUpdate(resourceGroupName, namespaceName, clientName, clientInfo, Context.NONE); } - /** - * Create or update a client. - * - * Create or update a client with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @param clientInfo Client information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Client resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClientInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context) { @@ -419,45 +356,19 @@ private Mono createOrUpdateAsync(String resourceGroupName, String n .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a client. - * - * Create or update a client with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @param clientInfo Client information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Client resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ClientInner createOrUpdate(String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, clientName, clientInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, namespaceName, clientName, clientInfo, Context.NONE); } - /** - * Create or update a client. - * - * Create or update a client with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @param clientInfo Client information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Client resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ClientInner createOrUpdate(String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, clientName, clientInfo, context).getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, namespaceName, clientName, clientInfo, context)); } /** @@ -497,8 +408,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String clientName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, clientName, Context.NONE); + return deleteWithResponse(resourceGroupName, namespaceName, clientName, Context.NONE); } /** @@ -543,40 +453,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a client. - * - * Delete an existing client. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String clientName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, clientName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, namespaceName, clientName, Context.NONE); } - /** - * Delete a client. - * - * Delete an existing client. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String clientName, Context context) { @@ -603,39 +487,16 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a client. - * - * Delete an existing client. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String clientName) { - beginDelete(resourceGroupName, namespaceName, clientName).getFinalResult(); + delete(resourceGroupName, namespaceName, clientName, Context.NONE); } - /** - * Delete a client. - * - * Delete an existing client. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param clientName Name of the client. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String clientName, Context context) { - beginDelete(resourceGroupName, namespaceName, clientName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, namespaceName, clientName, context)); } /** @@ -738,12 +599,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top, Context.NONE); } /** @@ -777,46 +633,15 @@ private PagedResponse listByNamespaceSinglePage(String resourceGrou res.getValue().nextLink(), null); } - /** - * List all permission bindings under a namespace. - * - * Get all the permission bindings under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Client operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top), - nextLink -> listByNamespaceNextSinglePage(nextLink)); + return listByNamespace(resourceGroupName, namespaceName, filter, top, Context.NONE); } - /** - * List all permission bindings under a namespace. - * - * Get all the permission bindings under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Client operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { @@ -860,11 +685,7 @@ private Mono> listByNamespaceNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java index 1ea74b3649135..8de145bf7049c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java @@ -44,7 +44,7 @@ public Client get(String resourceGroupName, String namespaceName, String clientN } public void delete(String resourceGroupName, String namespaceName, String clientName) { - this.serviceClient().delete(resourceGroupName, namespaceName, clientName); + this.delete(resourceGroupName, namespaceName, clientName, Context.NONE); } public void delete(String resourceGroupName, String namespaceName, String clientName, Context context) { @@ -64,102 +64,36 @@ public PagedIterable listByNamespace(String resourceGroupName, String na } public Client getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String clientName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "clientName"); - if (clientName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clients'.", id))); - } - return this.getWithResponse(resourceGroupName, namespaceName, clientName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String clientName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String clientName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "clientName"); - if (clientName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clients'.", id))); - } + "clientName", "clients", LOGGER); return this.getWithResponse(resourceGroupName, namespaceName, clientName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String clientName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "clientName"); - if (clientName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clients'.", id))); - } - this.delete(resourceGroupName, namespaceName, clientName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String clientName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String clientName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}", - "clientName"); - if (clientName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clients'.", id))); - } + "clientName", "clients", LOGGER); this.delete(resourceGroupName, namespaceName, clientName, context); } 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 a76b5615cd94b..457ad65c49baa 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 @@ -281,22 +281,7 @@ private Mono getAsync(String resourceGroupName, String d .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get an event subscription of a domain. - * - * Get properties of an event subscription of a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a domain. - * - * Get properties of an event subscription of a domain along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { @@ -305,21 +290,7 @@ public Response getWithResponse(String resourceGroupName resourceGroupName, domainName, eventSubscriptionName, accept, context); } - /** - * Get an event subscription of a domain. - * - * Get properties of an event subscription of a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a domain. - * - * Get properties of an event subscription of a domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String domainName, String eventSubscriptionName) { return getWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE).getValue(); @@ -368,11 +339,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, contentType, accept, - eventSubscriptionInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } /** @@ -425,45 +393,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Create or update an event subscription to a domain. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update an event subscription to a domain. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String domainName, String eventSubscriptionName, @@ -496,47 +435,20 @@ private Mono createOrUpdateAsync(String resourceGroupNam .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update an event subscription to a domain. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo) - .getFinalResult(); + return createOrUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update an event subscription to a domain. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, context)); } /** @@ -582,10 +494,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, contentType, accept, + return updateWithResponse(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, Context.NONE); } @@ -640,45 +549,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Update an event subscription for a domain. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, domainName, eventSubscriptionName, - eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } - /** - * Update an event subscription for a domain. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String domainName, String eventSubscriptionName, @@ -711,47 +591,20 @@ private Mono updateAsync(String resourceGroupName, Strin .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update an event subscription for a domain. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters) - .getFinalResult(); + return update(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } - /** - * Update an event subscription for a domain. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, - context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginUpdate(resourceGroupName, domainName, eventSubscriptionName, + eventSubscriptionUpdateParameters, context)); } /** @@ -792,8 +645,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, Context.NONE); + return deleteWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE); } /** @@ -839,40 +691,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String eventSubscriptionName) { - Response response = deleteWithResponse(resourceGroupName, domainName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, domainName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { @@ -900,39 +726,17 @@ private Mono deleteAsync(String resourceGroupName, String domainName, Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String domainName, String eventSubscriptionName) { - beginDelete(resourceGroupName, domainName, eventSubscriptionName).getFinalResult(); + delete(resourceGroupName, domainName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription for a domain. - * - * Delete an existing event subscription for a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { - beginDelete(resourceGroupName, domainName, eventSubscriptionName, context).getFinalResult(); + this.client + .getLroFinalResultOrError(beginDelete(resourceGroupName, domainName, eventSubscriptionName, context)); } /** @@ -1035,12 +839,7 @@ private PagedFlux listAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String domainName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, domainName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(resourceGroupName, domainName, filter, top, Context.NONE); } /** @@ -1074,46 +873,15 @@ private PagedResponse listSinglePage(String resourceGrou res.getValue().nextLink(), null); } - /** - * List all event subscriptions for a specific domain. - * - * List all event subscriptions that have been created for a specific topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String domainName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, domainName, filter, top), - nextLink -> listNextSinglePage(nextLink)); + return list(resourceGroupName, domainName, filter, top, Context.NONE); } - /** - * List all event subscriptions for a specific domain. - * - * List all event subscriptions that have been created for a specific topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String domainName, String filter, Integer top, Context context) { @@ -1170,22 +938,7 @@ private Mono getDeliveryAttributesAsync(String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { @@ -1194,21 +947,7 @@ public Response getDeliveryAttributesWithRespo this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, accept, context); } - /** - * Get delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription for domain. - * - * Get all delivery attributes for an event subscription for domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, String eventSubscriptionName) { @@ -1264,22 +1003,7 @@ private Mono getFullUrlAsync(String resourceGroup .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get full URL of an event subscription for domain. - * - * Get the full endpoint URL for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription for domain. - * - * Get the full endpoint URL for an event subscription for domain along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { @@ -1288,21 +1012,7 @@ public Response getFullUrlWithResponse(String res this.client.getSubscriptionId(), resourceGroupName, domainName, eventSubscriptionName, accept, context); } - /** - * Get full URL of an event subscription for domain. - * - * Get the full endpoint URL for an event subscription for domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription for domain. - * - * Get the full endpoint URL for an event subscription for domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName) { @@ -1343,11 +1053,7 @@ private Mono> listNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java index 2566f9f7e1bc3..45784165af291 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java @@ -51,13 +51,8 @@ public EventSubscription get(String resourceGroupName, String domainName, String public EventSubscription createOrUpdate(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - EventSubscriptionInner inner = this.serviceClient() - .createOrUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.createOrUpdate(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } public EventSubscription createOrUpdate(String resourceGroupName, String domainName, String eventSubscriptionName, @@ -73,13 +68,8 @@ public EventSubscription createOrUpdate(String resourceGroupName, String domainN public EventSubscription update(String resourceGroupName, String domainName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - EventSubscriptionInner inner = this.serviceClient() - .update(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.update(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } public EventSubscription update(String resourceGroupName, String domainName, String eventSubscriptionName, @@ -94,7 +84,7 @@ public EventSubscription update(String resourceGroupName, String domainName, Str } public void delete(String resourceGroupName, String domainName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, domainName, eventSubscriptionName); + this.delete(resourceGroupName, domainName, eventSubscriptionName, Context.NONE); } public void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java index 758bfba2c4731..aa72702e142b3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java @@ -172,10 +172,7 @@ public DomainImpl withExistingResourceGroup(String resourceGroupName) { } public Domain create() { - this.innerObject = serviceManager.serviceClient() - .getDomains() - .createOrUpdate(resourceGroupName, domainName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public Domain create(Context context) { @@ -197,10 +194,7 @@ public DomainImpl update() { } public Domain apply() { - this.innerObject = serviceManager.serviceClient() - .getDomains() - .update(resourceGroupName, domainName, updateDomainUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public Domain apply(Context context) { @@ -222,11 +216,7 @@ public Domain apply(Context context) { } public Domain refresh() { - this.innerObject = serviceManager.serviceClient() - .getDomains() - .getByResourceGroupWithResponse(resourceGroupName, domainName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public Domain refresh(Context context) { 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 af7fefc619c0c..81035cd51c103 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 @@ -286,23 +286,7 @@ private Mono getAsync(String resourceGroupName, String d .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a nested event subscription for domain topic. - * - * Get properties of a nested event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a nested event subscription for domain topic. - * - * Get properties of a nested event subscription for a domain topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { @@ -311,22 +295,7 @@ public Response getWithResponse(String resourceGroupName resourceGroupName, domainName, topicName, eventSubscriptionName, accept, context); } - /** - * Get a nested event subscription for domain topic. - * - * Get properties of a nested event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a nested event subscription for domain topic. - * - * Get properties of a nested event subscription for a domain topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { @@ -380,11 +349,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, - contentType, accept, eventSubscriptionInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionInfo, Context.NONE); } /** @@ -439,47 +405,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Create or update a nested event subscription to a domain topic. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, domainName, topicName, - eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionInfo, Context.NONE); } - /** - * Create or update a nested event subscription to a domain topic. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, @@ -512,49 +447,20 @@ private Mono createOrUpdateAsync(String resourceGroupNam eventSubscriptionInfo).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a nested event subscription to a domain topic. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, - eventSubscriptionInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update a nested event subscription to a domain topic. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, - eventSubscriptionInfo, context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, domainName, topicName, + eventSubscriptionName, eventSubscriptionInfo, context)); } /** @@ -603,11 +509,8 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, - contentType, accept, eventSubscriptionUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } /** @@ -663,47 +566,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Update a nested event subscription for a domain topic. - * - * Update an existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, domainName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } - /** - * Update a nested event subscription for a domain topic. - * - * Update an existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, @@ -736,50 +608,21 @@ private Mono updateAsync(String resourceGroupName, Strin eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a nested event subscription for a domain topic. - * - * Update an existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters).getFinalResult(); + return update(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } - /** - * Update a nested event subscription for a domain topic. - * - * Update an existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters, context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginUpdate(resourceGroupName, domainName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters, context)); } /** @@ -821,9 +664,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, eventSubscriptionName, - Context.NONE); + return deleteWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE); } /** @@ -871,43 +712,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a nested event subscription for a domain topic. - * - * Delete a nested existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - Response response - = deleteWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE); } - /** - * Delete a nested event subscription for a domain topic. - * - * Delete a nested existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { @@ -937,42 +749,18 @@ private Mono deleteAsync(String resourceGroupName, String domainName, Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a nested event subscription for a domain topic. - * - * Delete a nested existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, domainName, topicName, eventSubscriptionName).getFinalResult(); + delete(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE); } - /** - * Delete a nested event subscription for a domain topic. - * - * Delete a nested existing event subscription for a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - beginDelete(resourceGroupName, domainName, topicName, eventSubscriptionName, context).getFinalResult(); + this.client.getLroFinalResultOrError( + beginDelete(resourceGroupName, domainName, topicName, eventSubscriptionName, context)); } /** @@ -1078,12 +866,7 @@ private PagedFlux listAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String domainName, String topicName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, domainName, topicName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(resourceGroupName, domainName, topicName, filter, top, Context.NONE); } /** @@ -1118,48 +901,15 @@ private PagedResponse listSinglePage(String resourceGrou res.getValue().nextLink(), null); } - /** - * List all nested event subscriptions for a specific domain topic. - * - * List all event subscriptions that have been created for a specific domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String domainName, String topicName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, domainName, topicName, filter, top), - nextLink -> listNextSinglePage(nextLink)); + return list(resourceGroupName, domainName, topicName, filter, top, Context.NONE); } - /** - * List all nested event subscriptions for a specific domain topic. - * - * List all event subscriptions that have been created for a specific domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context) { @@ -1218,23 +968,7 @@ private Mono getDeliveryAttributesAsync(String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { @@ -1244,22 +978,7 @@ public Response getDeliveryAttributesWithRespo context); } - /** - * Get delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription for domain topic. - * - * Get all delivery attributes for an event subscription for domain topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { @@ -1319,23 +1038,7 @@ private Mono getFullUrlAsync(String resourceGroup .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get full URL of a nested event subscription for domain topic. - * - * Get the full endpoint URL for a nested event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of a nested event subscription for domain topic. - * - * Get the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { @@ -1345,22 +1048,7 @@ public Response getFullUrlWithResponse(String res context); } - /** - * Get full URL of a nested event subscription for domain topic. - * - * Get the full endpoint URL for a nested event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of a nested event subscription for domain topic. - * - * Get the full endpoint URL for a nested event subscription for domain topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { @@ -1402,11 +1090,7 @@ private Mono> listNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java index 4c85015d36bf9..71b397f3370bd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java @@ -53,13 +53,8 @@ public EventSubscription get(String resourceGroupName, String domainName, String public EventSubscription createOrUpdate(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - EventSubscriptionInner inner = this.serviceClient() - .createOrUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionInfo); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.createOrUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionInfo, Context.NONE); } public EventSubscription createOrUpdate(String resourceGroupName, String domainName, String topicName, @@ -76,13 +71,8 @@ public EventSubscription createOrUpdate(String resourceGroupName, String domainN public EventSubscription update(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - EventSubscriptionInner inner = this.serviceClient() - .update(resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.update(resourceGroupName, domainName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } public EventSubscription update(String resourceGroupName, String domainName, String topicName, @@ -99,7 +89,7 @@ public EventSubscription update(String resourceGroupName, String domainName, Str } public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, domainName, topicName, eventSubscriptionName); + this.delete(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE); } public void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, 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 d0612d407ac1b..adbfd87882e5f 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 @@ -211,22 +211,7 @@ private Mono getAsync(String resourceGroupName, String domainN .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a domain topic. - * - * Get properties of a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a domain topic. - * - * Get properties of a domain topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String domainName, String domainTopicName, Context context) { @@ -235,21 +220,7 @@ public Response getWithResponse(String resourceGroupName, Stri resourceGroupName, domainName, domainTopicName, accept, context); } - /** - * Get a domain topic. - * - * Get properties of a domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a domain topic. - * - * Get properties of a domain topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainTopicInner get(String resourceGroupName, String domainName, String domainTopicName) { return getWithResponse(resourceGroupName, domainName, domainTopicName, Context.NONE).getValue(); @@ -294,9 +265,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, String domainTopicName) { - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, accept, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, domainName, domainTopicName, Context.NONE); } /** @@ -343,41 +312,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName DomainTopicInner.class, DomainTopicInner.class, this.client.getContext()); } - /** - * Create or update a domain topic. - * - * Asynchronously creates or updates a new domain topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of domain Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainTopicInner> beginCreateOrUpdate(String resourceGroupName, String domainName, String domainTopicName) { - Response response = createOrUpdateWithResponse(resourceGroupName, domainName, domainTopicName); - return this.client.getLroResult(response, DomainTopicInner.class, - DomainTopicInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, Context.NONE); } - /** - * Create or update a domain topic. - * - * Asynchronously creates or updates a new domain topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of domain Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainTopicInner> beginCreateOrUpdate(String resourceGroupName, String domainName, String domainTopicName, Context context) { @@ -407,42 +349,18 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a domain topic. - * - * Asynchronously creates or updates a new domain topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return domain Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainTopicInner createOrUpdate(String resourceGroupName, String domainName, String domainTopicName) { - return beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName).getFinalResult(); + return createOrUpdate(resourceGroupName, domainName, domainTopicName, Context.NONE); } - /** - * Create or update a domain topic. - * - * Asynchronously creates or updates a new domain topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return domain Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainTopicInner createOrUpdate(String resourceGroupName, String domainName, String domainTopicName, Context context) { - return beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, context)); } /** @@ -483,8 +401,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String domainName, String domainTopicName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, domainTopicName, Context.NONE); + return deleteWithResponse(resourceGroupName, domainName, domainTopicName, Context.NONE); } /** @@ -529,40 +446,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a domain topic. - * - * Delete existing domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String domainTopicName) { - Response response = deleteWithResponse(resourceGroupName, domainName, domainTopicName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, domainName, domainTopicName, Context.NONE); } - /** - * Delete a domain topic. - * - * Delete existing domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String domainTopicName, Context context) { @@ -589,39 +480,16 @@ private Mono deleteAsync(String resourceGroupName, String domainName, Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a domain topic. - * - * Delete existing domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String domainName, String domainTopicName) { - beginDelete(resourceGroupName, domainName, domainTopicName).getFinalResult(); + delete(resourceGroupName, domainName, domainTopicName, Context.NONE); } - /** - * Delete a domain topic. - * - * Delete existing domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainTopicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String domainName, String domainTopicName, Context context) { - beginDelete(resourceGroupName, domainName, domainTopicName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, domainName, domainTopicName, context)); } /** @@ -724,12 +592,7 @@ private PagedFlux listByDomainAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByDomainSinglePage(String resourceGroupName, String domainName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByDomainSinglePage(resourceGroupName, domainName, filter, top, Context.NONE); } /** @@ -763,46 +626,15 @@ private PagedResponse listByDomainSinglePage(String resourceGr res.getValue().nextLink(), null); } - /** - * List domain topics. - * - * List all the topics in a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Domain Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDomain(String resourceGroupName, String domainName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByDomainSinglePage(resourceGroupName, domainName, filter, top), - nextLink -> listByDomainNextSinglePage(nextLink)); + return listByDomain(resourceGroupName, domainName, filter, top, Context.NONE); } - /** - * List domain topics. - * - * List all the topics in a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Domain Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDomain(String resourceGroupName, String domainName, String filter, Integer top, Context context) { @@ -845,11 +677,7 @@ private Mono> listByDomainNextSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByDomainNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByDomainNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByDomainNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java index fc53f6091a0cb..b16bf21598cf5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java @@ -45,12 +45,7 @@ public DomainTopic get(String resourceGroupName, String domainName, String domai } public DomainTopic createOrUpdate(String resourceGroupName, String domainName, String domainTopicName) { - DomainTopicInner inner = this.serviceClient().createOrUpdate(resourceGroupName, domainName, domainTopicName); - if (inner != null) { - return new DomainTopicImpl(inner, this.manager()); - } else { - return null; - } + return this.createOrUpdate(resourceGroupName, domainName, domainTopicName, Context.NONE); } public DomainTopic createOrUpdate(String resourceGroupName, String domainName, String domainTopicName, @@ -65,7 +60,7 @@ public DomainTopic createOrUpdate(String resourceGroupName, String domainName, S } public void delete(String resourceGroupName, String domainName, String domainTopicName) { - this.serviceClient().delete(resourceGroupName, domainName, domainTopicName); + this.delete(resourceGroupName, domainName, domainTopicName, Context.NONE); } public void delete(String resourceGroupName, String domainName, String domainTopicName, Context context) { 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 bb714f08fe2d1..4281ffc8a793b 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 @@ -296,21 +296,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Stri .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a domain. - * - * Get properties of a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a domain. - * - * Get properties of a domain along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context) { @@ -319,20 +305,7 @@ public Response getByResourceGroupWithResponse(String resourceGroup this.client.getSubscriptionId(), resourceGroupName, domainName, accept, context); } - /** - * Get a domain. - * - * Get properties of a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a domain. - * - * Get properties of a domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { return getByResourceGroupWithResponse(resourceGroupName, domainName, Context.NONE).getValue(); @@ -379,11 +352,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String domainName, DomainInner domainInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, domainInfo, - Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, domainName, domainInfo, Context.NONE); } /** @@ -431,41 +400,14 @@ private PollerFlux, DomainInner> beginCreateOrUpdateAsyn DomainInner.class, DomainInner.class, this.client.getContext()); } - /** - * Create or update a domain. - * - * Asynchronously creates or updates a new domain with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainInfo Domain information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid Domain. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainInner> beginCreateOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, domainName, domainInfo); - return this.client.getLroResult(response, DomainInner.class, DomainInner.class, - Context.NONE); + return beginCreateOrUpdate(resourceGroupName, domainName, domainInfo, Context.NONE); } - /** - * Create or update a domain. - * - * Asynchronously creates or updates a new domain with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainInfo Domain information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid Domain. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainInner> beginCreateOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo, Context context) { @@ -493,42 +435,18 @@ private Mono createOrUpdateAsync(String resourceGroupName, String d .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a domain. - * - * Asynchronously creates or updates a new domain with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainInfo Domain information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid Domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo) { - return beginCreateOrUpdate(resourceGroupName, domainName, domainInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, domainName, domainInfo, Context.NONE); } - /** - * Create or update a domain. - * - * Asynchronously creates or updates a new domain with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainInfo Domain information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid Domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, domainName, domainInfo, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, domainName, domainInfo, context)); } /** @@ -572,11 +490,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, contentType, accept, domainUpdateParameters, - Context.NONE); + return updateWithResponse(resourceGroupName, domainName, domainUpdateParameters, Context.NONE); } /** @@ -625,41 +539,14 @@ private PollerFlux, DomainInner> beginUpdateAsync(String DomainInner.class, DomainInner.class, this.client.getContext()); } - /** - * Update a domain. - * - * Asynchronously updates a domain with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, domainName, domainUpdateParameters); - return this.client.getLroResult(response, DomainInner.class, DomainInner.class, - Context.NONE); + return beginUpdate(resourceGroupName, domainName, domainUpdateParameters, Context.NONE); } - /** - * Update a domain. - * - * Asynchronously updates a domain with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainInner> beginUpdate(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters, Context context) { @@ -689,43 +576,19 @@ private Mono updateAsync(String resourceGroupName, String domainNam .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a domain. - * - * Asynchronously updates a domain with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainInner update(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters) { - return beginUpdate(resourceGroupName, domainName, domainUpdateParameters).getFinalResult(); + return update(resourceGroupName, domainName, domainUpdateParameters, Context.NONE); } - /** - * Update a domain. - * - * Asynchronously updates a domain with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param domainUpdateParameters Domain update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainInner update(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, domainName, domainUpdateParameters, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginUpdate(resourceGroupName, domainName, domainUpdateParameters, context)); } /** @@ -762,8 +625,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String domainName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, domainName, Context.NONE); + return deleteWithResponse(resourceGroupName, domainName, Context.NONE); } /** @@ -804,37 +666,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a domain. - * - * Delete existing domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName) { - Response response = deleteWithResponse(resourceGroupName, domainName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, domainName, Context.NONE); } - /** - * Delete a domain. - * - * Delete existing domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, Context context) { @@ -859,37 +697,16 @@ private Mono deleteAsync(String resourceGroupName, String domainName) { return beginDeleteAsync(resourceGroupName, domainName).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a domain. - * - * Delete existing domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String domainName) { - beginDelete(resourceGroupName, domainName).getFinalResult(); + delete(resourceGroupName, domainName, Context.NONE); } - /** - * Delete a domain. - * - * Delete existing domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String domainName, Context context) { - beginDelete(resourceGroupName, domainName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, domainName, context)); } /** @@ -987,12 +804,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -1025,44 +837,15 @@ private PagedResponse listByResourceGroupSinglePage(String resource res.getValue().nextLink(), null); } - /** - * List domains under a resource group. - * - * List all the domains under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Domains operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List domains under a resource group. - * - * List all the domains under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Domains operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -1158,11 +941,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1192,41 +971,15 @@ private PagedResponse listSinglePage(String filter, Integer top, Co res.getValue().nextLink(), null); } - /** - * List domains under an Azure subscription. - * - * List all the domains under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Domains operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List domains under an Azure subscription. - * - * List all the domains under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Domains operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1273,19 +1026,7 @@ private Mono listSharedAccessKeysAsync(String resou .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * List keys for a domain. - * - * List the two keys used to publish to a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Domain along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String domainName, Context context) { @@ -1294,18 +1035,7 @@ public Response listSharedAccessKeysWithResponse(St this.client.getSubscriptionId(), resourceGroupName, domainName, accept, context); } - /** - * List keys for a domain. - * - * List the two keys used to publish to a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String domainName) { return listSharedAccessKeysWithResponse(resourceGroupName, domainName, Context.NONE).getValue(); @@ -1356,20 +1086,7 @@ private Mono regenerateKeyAsync(String resourceGrou .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Regenerate key for a domain. - * - * Regenerate a shared access key for a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Domain along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeyWithResponse(String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest, Context context) { @@ -1380,19 +1097,7 @@ public Response regenerateKeyWithResponse(String re context); } - /** - * Regenerate key for a domain. - * - * Regenerate a shared access key for a domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the domain. - * @param regenerateKeyRequest Request body to regenerate key. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DomainSharedAccessKeysInner regenerateKey(String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest) { @@ -1435,11 +1140,7 @@ private Mono> listByResourceGroupNextSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1499,11 +1200,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(S */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** 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 510d891dd9e89..2b922c9aefe83 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 @@ -47,7 +47,7 @@ public Domain getByResourceGroup(String resourceGroupName, String domainName) { } public void deleteByResourceGroup(String resourceGroupName, String domainName) { - this.serviceClient().delete(resourceGroupName, domainName); + this.delete(resourceGroupName, domainName, Context.NONE); } public void delete(String resourceGroupName, String domainName, Context context) { @@ -113,74 +113,30 @@ public DomainSharedAccessKeys regenerateKey(String resourceGroupName, String dom } public Domain getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String domainName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - "domainName"); - if (domainName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, domainName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String domainName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String domainName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - "domainName"); - if (domainName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); - } + "domainName", "domains", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, domainName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String domainName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - "domainName"); - if (domainName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); - } - this.delete(resourceGroupName, domainName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String domainName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String domainName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - "domainName"); - if (domainName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); - } + "domainName", "domains", LOGGER); this.delete(resourceGroupName, domainName, context); } 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 dfd6c494fc882..dd2a1db085c17 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java @@ -22,6 +22,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; @@ -695,6 +696,24 @@ public SyncPoller, U> getLroResult(Response act defaultPollInterval, () -> activationResponse, context); } + /** + * Waits for completion and gets the final result, or throws an error. + * + * @param poller the synchronous poller. + * @param type of poll result. + * @param type of final result. + * @return the final result. + * @throws ManagementException if the long running operation fails. + */ + public U getLroFinalResultOrError(SyncPoller, U> poller) { + PollResponse> response = poller.waitForCompletion(); + ManagementException exception = getLroException(response.getStatus(), response.getValue()); + if (exception != null) { + throw exception; + } + return poller.getFinalResult(); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -704,17 +723,25 @@ public SyncPoller, U> getLroResult(Response act * @return the final result, or an error. */ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + ManagementException exception = getLroException(response.getStatus(), response.getValue()); + if (exception != null) { + return Mono.error(exception); + } + return response.getFinalResult(); + } + + private ManagementException getLroException(LongRunningOperationStatus status, PollResult result) { + PollResult.Error lroError = result == null ? null : result.getError(); + if (status != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED || lroError != null) { String errorMessage; ManagementError managementError = null; HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); + errorMessage = lroError.getMessage(); + String errorBody = lroError.getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { @@ -733,12 +760,11 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, } if (managementError == null) { // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); + managementError = new ManagementError(status.toString(), errorMessage); } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); + return new ManagementException(errorMessage, errorResponse, managementError); } + return null; } private static final class HttpResponseImpl extends HttpResponse { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java index 27ff025f57f86..50871c7d9505e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java @@ -115,10 +115,7 @@ public EventSubscriptionImpl withExistingScope(String scope) { } public EventSubscription create() { - this.innerObject = serviceManager.serviceClient() - .getEventSubscriptions() - .createOrUpdate(scope, eventSubscriptionName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public EventSubscription create(Context context) { @@ -140,10 +137,7 @@ public EventSubscriptionImpl update() { } public EventSubscription apply() { - this.innerObject = serviceManager.serviceClient() - .getEventSubscriptions() - .update(scope, eventSubscriptionName, updateEventSubscriptionUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public EventSubscription apply(Context context) { @@ -190,11 +184,7 @@ public EventSubscription apply(Context context) { } public EventSubscription refresh() { - this.innerObject = serviceManager.serviceClient() - .getEventSubscriptions() - .getWithResponse(scope, eventSubscriptionName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public EventSubscription refresh(Context context) { 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 37102919010ff..12c2ea3fcc22b 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 @@ -643,12 +643,7 @@ private PagedFlux listByResourceGroupAsync(String resour @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -681,44 +676,15 @@ private PagedResponse listByResourceGroupSinglePage(Stri res.getValue().nextLink(), null); } - /** - * List all global event subscriptions under an Azure subscription and resource group. - * - * List all global event subscriptions under a specific Azure subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listGlobalByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List all global event subscriptions under an Azure subscription and resource group. - * - * List all global event subscriptions under a specific Azure subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -834,12 +800,7 @@ private PagedFlux listByDomainTopicAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByDomainTopicSinglePage(String resourceGroupName, String domainName, String topicName, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listByDomainTopicSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, domainName, topicName, - filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByDomainTopicSinglePage(resourceGroupName, domainName, topicName, filter, top, Context.NONE); } /** @@ -874,50 +835,16 @@ private PagedResponse listByDomainTopicSinglePage(String res.getValue().nextLink(), null); } - /** - * List all event subscriptions for a specific domain topic. - * - * List all event subscriptions that have been created for a specific domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listByDomainTopicSinglePage(resourceGroupName, domainName, topicName, filter, top), - nextLink -> listByDomainTopicNextSinglePage(nextLink)); + return listByDomainTopic(resourceGroupName, domainName, topicName, filter, top, Context.NONE); } - /** - * List all event subscriptions for a specific domain topic. - * - * List all event subscriptions that have been created for a specific domain topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context) { @@ -968,21 +895,7 @@ private Mono getAsync(String scope, String eventSubscrip return getWithResponseAsync(scope, eventSubscriptionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get an event subscription. - * - * Get properties of an event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription. - * - * Get properties of an event subscription along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String scope, String eventSubscriptionName, Context context) { @@ -991,20 +904,7 @@ public Response getWithResponse(String scope, String eve accept, context); } - /** - * Get an event subscription. - * - * Get properties of an event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription. - * - * Get properties of an event subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String scope, String eventSubscriptionName) { return getWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); @@ -1052,10 +952,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, - eventSubscriptionName, contentType, accept, eventSubscriptionInfo, Context.NONE); + return createOrUpdateWithResponse(scope, eventSubscriptionName, eventSubscriptionInfo, Context.NONE); } /** @@ -1106,43 +1003,14 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Create or update an event subscription. - * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - Response response = createOrUpdateWithResponse(scope, eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, Context.NONE); } - /** - * Create or update an event subscription. - * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { @@ -1173,45 +1041,19 @@ private Mono createOrUpdateAsync(String scope, String ev .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update an event subscription. - * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo).getFinalResult(); + return createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, Context.NONE); } - /** - * Create or update an event subscription. - * - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, context).getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, context)); } /** @@ -1254,10 +1096,7 @@ private Mono>> updateWithResponseAsync(String scope, S @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, eventSubscriptionName, - contentType, accept, eventSubscriptionUpdateParameters, Context.NONE); + return updateWithResponse(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, Context.NONE); } /** @@ -1306,42 +1145,14 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Update an event subscription. - * - * Asynchronously updates an existing event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response - = updateWithResponse(scope, eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, Context.NONE); } - /** - * Update an event subscription. - * - * Asynchronously updates an existing event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, @@ -1372,43 +1183,19 @@ private Mono updateAsync(String scope, String eventSubsc .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update an event subscription. - * - * Asynchronously updates an existing event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).getFinalResult(); + return update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, Context.NONE); } - /** - * Update an event subscription. - * - * Asynchronously updates an existing event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, context).getFinalResult(); + return this.client.getLroFinalResultOrError( + beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, context)); } /** @@ -1445,8 +1232,7 @@ private Mono>> deleteWithResponseAsync(String scope, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String scope, String eventSubscriptionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, eventSubscriptionName, - Context.NONE); + return deleteWithResponse(scope, eventSubscriptionName, Context.NONE); } /** @@ -1487,37 +1273,13 @@ private PollerFlux, Void> beginDeleteAsync(String scope, String this.client.getContext()); } - /** - * Delete an event subscription. - * - * Delete an existing event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName) { - Response response = deleteWithResponse(scope, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(scope, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription. - * - * Delete an existing event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName, Context context) { Response response = deleteWithResponse(scope, eventSubscriptionName, context); @@ -1541,37 +1303,16 @@ private Mono deleteAsync(String scope, String eventSubscriptionName) { return beginDeleteAsync(scope, eventSubscriptionName).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete an event subscription. - * - * Delete an existing event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String scope, String eventSubscriptionName) { - beginDelete(scope, eventSubscriptionName).getFinalResult(); + delete(scope, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription. - * - * Delete an existing event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String scope, String eventSubscriptionName, Context context) { - beginDelete(scope, eventSubscriptionName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(scope, eventSubscriptionName, context)); } /** @@ -1673,11 +1414,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1710,47 +1447,15 @@ private PagedResponse listSinglePage(String filter, Inte res.getValue().nextLink(), null); } - /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. - * - * List all aggregated global event subscriptions under a specific Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an aggregated list of all global event subscriptions under an Azure subscription. - * - * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with - * {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listGlobalBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * Get an aggregated list of all global event subscriptions under an Azure subscription. - * - * List all aggregated global event subscriptions under a specific Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an aggregated list of all global event subscriptions under an Azure subscription. - * - * List all aggregated global event subscriptions under a specific Azure subscription as paginated response with - * {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1867,12 +1572,8 @@ private PagedFlux listByResourceAsync(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceSinglePage(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listByResourceSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, providerNamespace, - resourceTypeName, resourceName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceSinglePage(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, + top, Context.NONE); } /** @@ -1909,51 +1610,17 @@ private PagedResponse listByResourceSinglePage(String re res.getValue().nextLink(), null); } - /** - * List all event subscriptions. - * - * List all event subscriptions that have been created for a specific resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceSinglePage(resourceGroupName, providerNamespace, - resourceTypeName, resourceName, filter, top), nextLink -> listByResourceNextSinglePage(nextLink)); + return listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, top, + Context.NONE); } - /** - * List all event subscriptions. - * - * List all event subscriptions that have been created for a specific resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param providerNamespace Namespace of the provider of the topic. - * @param resourceTypeName Name of the resource type. - * @param resourceName Name of the resource. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName, String filter, Integer top, Context context) { @@ -2008,21 +1675,7 @@ private Mono getDeliveryAttributesAsync(String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String scope, String eventSubscriptionName, Context context) { @@ -2031,20 +1684,7 @@ public Response getDeliveryAttributesWithRespo eventSubscriptionName, accept, context); } - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName) { return getDeliveryAttributesWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); @@ -2095,21 +1735,7 @@ private Mono getFullUrlAsync(String scope, String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get full URL of an event subscription. - * - * Get the full endpoint URL for an event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription. - * - * Get the full endpoint URL for an event subscription along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String scope, String eventSubscriptionName, Context context) { @@ -2117,21 +1743,8 @@ public Response getFullUrlWithResponse(String sco return service.getFullUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, eventSubscriptionName, accept, context); } - - /** - * Get full URL of an event subscription. - * - * Get the full endpoint URL for an event subscription. - * - * @param scope undefined. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription. - * - * Get the full endpoint URL for an event subscription. - */ + + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName) { return getFullUrlWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); @@ -2232,12 +1845,7 @@ private PagedFlux listGlobalBySubscriptionForTopicTypeAs @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listGlobalBySubscriptionForTopicTypeSinglePage(String topicTypeName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listGlobalBySubscriptionForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), topicTypeName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listGlobalBySubscriptionForTopicTypeSinglePage(topicTypeName, filter, top, Context.NONE); } /** @@ -2270,44 +1878,15 @@ private PagedResponse listGlobalBySubscriptionForTopicTy res.getValue().nextLink(), null); } - /** - * List all global event subscriptions for a topic type. - * - * List all global event subscriptions under an Azure subscription for a topic type. - * - * @param topicTypeName Name of the topic type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listGlobalBySubscriptionForTopicTypeSinglePage(topicTypeName, filter, top), - nextLink -> listGlobalBySubscriptionForTopicTypeNextSinglePage(nextLink)); + return listGlobalBySubscriptionForTopicType(topicTypeName, filter, top, Context.NONE); } - /** - * List all global event subscriptions for a topic type. - * - * List all global event subscriptions under an Azure subscription for a topic type. - * - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName, String filter, Integer top, Context context) { @@ -2420,12 +1999,8 @@ private PagedFlux listGlobalByResourceGroupForTopicTypeA @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listGlobalByResourceGroupForTopicTypeSinglePage( String resourceGroupName, String topicTypeName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listGlobalByResourceGroupForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, topicTypeName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listGlobalByResourceGroupForTopicTypeSinglePage(resourceGroupName, topicTypeName, filter, top, + Context.NONE); } /** @@ -2459,48 +2034,16 @@ private PagedResponse listGlobalByResourceGroupForTopicT res.getValue().nextLink(), null); } - /** - * List all global event subscriptions under a resource group for a topic type. - * - * List all global event subscriptions under a resource group for a specific topic type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicTypeName Name of the topic type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName, String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listGlobalByResourceGroupForTopicTypeSinglePage(resourceGroupName, topicTypeName, filter, top), - nextLink -> listGlobalByResourceGroupForTopicTypeNextSinglePage(nextLink)); + return listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, filter, top, Context.NONE); } - /** - * List all global event subscriptions under a resource group for a topic type. - * - * List all global event subscriptions under a resource group for a specific topic type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName, String topicTypeName, String filter, Integer top, Context context) { @@ -2605,11 +2148,7 @@ private PagedFlux listRegionalBySubscriptionAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRegionalBySubscriptionSinglePage(String location, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listRegionalBySubscriptionSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listRegionalBySubscriptionSinglePage(location, filter, top, Context.NONE); } /** @@ -2641,44 +2180,15 @@ private PagedResponse listRegionalBySubscriptionSinglePa res.getValue().nextLink(), null); } - /** - * List all regional event subscriptions under an Azure subscription. - * - * List all event subscriptions from the given location under a specific Azure subscription. - * - * @param location The location name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRegionalBySubscription(String location) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listRegionalBySubscriptionSinglePage(location, filter, top), - nextLink -> listRegionalBySubscriptionNextSinglePage(nextLink)); + return listRegionalBySubscription(location, filter, top, Context.NONE); } - /** - * List all regional event subscriptions under an Azure subscription. - * - * List all event subscriptions from the given location under a specific Azure subscription. - * - * @param location The location name. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRegionalBySubscription(String location, String filter, Integer top, Context context) { @@ -2790,12 +2300,7 @@ private PagedFlux listRegionalByResourceGroupAsync(Strin @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRegionalByResourceGroupSinglePage(String resourceGroupName, String location, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listRegionalByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, location, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listRegionalByResourceGroupSinglePage(resourceGroupName, location, filter, top, Context.NONE); } /** @@ -2829,48 +2334,16 @@ private PagedResponse listRegionalByResourceGroupSingleP res.getValue().nextLink(), null); } - /** - * List all regional event subscriptions under an Azure subscription and resource group. - * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The location name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRegionalByResourceGroup(String resourceGroupName, String location) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listRegionalByResourceGroupSinglePage(resourceGroupName, location, filter, top), - nextLink -> listRegionalByResourceGroupNextSinglePage(nextLink)); + return listRegionalByResourceGroup(resourceGroupName, location, filter, top, Context.NONE); } - /** - * List all regional event subscriptions under an Azure subscription and resource group. - * - * List all event subscriptions from the given location under a specific Azure subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The location name. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRegionalByResourceGroup(String resourceGroupName, String location, String filter, Integer top, Context context) { @@ -2983,12 +2456,7 @@ private PagedFlux listRegionalBySubscriptionForTopicType @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRegionalBySubscriptionForTopicTypeSinglePage(String location, String topicTypeName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listRegionalBySubscriptionForTopicTypeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, topicTypeName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listRegionalBySubscriptionForTopicTypeSinglePage(location, topicTypeName, filter, top, Context.NONE); } /** @@ -3022,48 +2490,16 @@ private PagedResponse listRegionalBySubscriptionForTopic res.getValue().nextLink(), null); } - /** - * List all regional event subscriptions under an Azure subscription for a topic type. - * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. - * - * @param location The location name. - * @param topicTypeName Name of the topic type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRegionalBySubscriptionForTopicType(String location, String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listRegionalBySubscriptionForTopicTypeSinglePage(location, topicTypeName, filter, top), - nextLink -> listRegionalBySubscriptionForTopicTypeNextSinglePage(nextLink)); + return listRegionalBySubscriptionForTopicType(location, topicTypeName, filter, top, Context.NONE); } - /** - * List all regional event subscriptions under an Azure subscription for a topic type. - * - * List all event subscriptions from the given location under a specific Azure subscription and topic type. - * - * @param location The location name. - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRegionalBySubscriptionForTopicType(String location, String topicTypeName, String filter, Integer top, Context context) { @@ -3184,12 +2620,8 @@ private PagedFlux listRegionalByResourceGroupForTopicTyp @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRegionalByResourceGroupForTopicTypeSinglePage( String resourceGroupName, String location, String topicTypeName, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listRegionalByResourceGroupForTopicTypeSync( - this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - location, topicTypeName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listRegionalByResourceGroupForTopicTypeSinglePage(resourceGroupName, location, topicTypeName, filter, + top, Context.NONE); } /** @@ -3225,51 +2657,17 @@ private PagedResponse listRegionalByResourceGroupForTopi res.getValue().nextLink(), null); } - /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. - * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The location name. - * @param topicTypeName Name of the topic type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName, String location, String topicTypeName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listRegionalByResourceGroupForTopicTypeSinglePage(resourceGroupName, location, - topicTypeName, filter, top), nextLink -> listRegionalByResourceGroupForTopicTypeNextSinglePage(nextLink)); + return listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, filter, top, + Context.NONE); } - /** - * List all regional event subscriptions under an Azure subscription and resource group for a topic type. - * - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The location name. - * @param topicTypeName Name of the topic type. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName, String location, String topicTypeName, String filter, Integer top, Context context) { @@ -3314,11 +2712,7 @@ private Mono> listGlobalByResourceGroupNex */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listGlobalByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listGlobalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listGlobalByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -3378,11 +2772,7 @@ private Mono> listByDomainTopicNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByDomainTopicNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByDomainTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByDomainTopicNextSinglePage(nextLink, Context.NONE); } /** @@ -3447,11 +2837,7 @@ private Mono> listGlobalBySubscriptionNext */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listGlobalBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listGlobalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listGlobalBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** @@ -3514,11 +2900,7 @@ private Mono> listByResourceNextSinglePage */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceNextSinglePage(nextLink, Context.NONE); } /** @@ -3579,11 +2961,7 @@ private PagedResponse listByResourceNextSinglePage(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listGlobalBySubscriptionForTopicTypeNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res = service.listGlobalBySubscriptionForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listGlobalBySubscriptionForTopicTypeNextSinglePage(nextLink, Context.NONE); } /** @@ -3645,11 +3023,7 @@ private PagedResponse listGlobalBySubscriptionForTopicTy */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listGlobalByResourceGroupForTopicTypeNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res = service.listGlobalByResourceGroupForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listGlobalByResourceGroupForTopicTypeNextSinglePage(nextLink, Context.NONE); } /** @@ -3710,11 +3084,7 @@ private Mono> listRegionalBySubscriptionNe */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRegionalBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listRegionalBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listRegionalBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** @@ -3775,11 +3145,7 @@ private PagedResponse listRegionalBySubscriptionNextSing */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRegionalByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listRegionalByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listRegionalByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -3842,11 +3208,7 @@ private PagedResponse listRegionalByResourceGroupNextSin @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRegionalBySubscriptionForTopicTypeNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res = service.listRegionalBySubscriptionForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listRegionalBySubscriptionForTopicTypeNextSinglePage(nextLink, Context.NONE); } /** @@ -3909,11 +3271,7 @@ private PagedResponse listRegionalBySubscriptionForTopic @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRegionalByResourceGroupForTopicTypeNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res = service.listRegionalByResourceGroupForTopicTypeNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listRegionalByResourceGroupForTopicTypeNextSinglePage(nextLink, Context.NONE); } /** 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 7bf2b83c088d2..90b6d1886e8d6 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 @@ -74,7 +74,7 @@ public EventSubscription get(String scope, String eventSubscriptionName) { } public void deleteByResourceGroup(String scope, String eventSubscriptionName) { - this.serviceClient().delete(scope, eventSubscriptionName); + this.delete(scope, eventSubscriptionName, Context.NONE); } public void delete(String scope, String eventSubscriptionName, Context context) { @@ -221,70 +221,30 @@ public PagedIterable listRegionalByResourceGroupForTopicType( } public EventSubscription getById(String id) { - String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", "scope"); - if (scope == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); - } - String eventSubscriptionName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", - "eventSubscriptionName"); - if (eventSubscriptionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } - return this.getWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", "scope"); - if (scope == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); - } - String eventSubscriptionName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String scope = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", "scope", "scope", + LOGGER); + String eventSubscriptionName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", - "eventSubscriptionName"); - if (eventSubscriptionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } + "eventSubscriptionName", "eventSubscriptions", LOGGER); return this.getWithResponse(scope, eventSubscriptionName, context); } public void deleteById(String id) { - String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", "scope"); - if (scope == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); - } - String eventSubscriptionName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", - "eventSubscriptionName"); - if (eventSubscriptionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } - this.delete(scope, eventSubscriptionName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", "scope"); - if (scope == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); - } - String eventSubscriptionName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String scope = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", "scope", "scope", + LOGGER); + String eventSubscriptionName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", - "eventSubscriptionName"); - if (eventSubscriptionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } + "eventSubscriptionName", "eventSubscriptions", LOGGER); this.delete(scope, eventSubscriptionName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java index 33f1cf78ea1f4..a6022b3509e95 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java @@ -114,39 +114,14 @@ private Mono getAsync(String scope) { return getWithResponseAsync(scope).flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get properties of an extension topic. - * - * Get the properties of an extension topic. - * - * @param scope The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an extension topic. - * - * Get the properties of an extension topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String scope, Context context) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context); } - /** - * Get properties of an extension topic. - * - * Get the properties of an extension topic. - * - * @param scope The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of an extension topic. - * - * Get the properties of an extension topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ExtensionTopicInner get(String scope) { return getWithResponse(scope, Context.NONE).getValue(); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java index 8372d2f268707..af656b2b8ffad 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 @@ -160,10 +160,7 @@ public NamespaceImpl withExistingResourceGroup(String resourceGroupName) { } public Namespace create() { - this.innerObject = serviceManager.serviceClient() - .getNamespaces() - .createOrUpdate(resourceGroupName, namespaceName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public Namespace create(Context context) { @@ -185,10 +182,7 @@ public NamespaceImpl update() { } public Namespace apply() { - this.innerObject = serviceManager.serviceClient() - .getNamespaces() - .update(resourceGroupName, namespaceName, updateNamespaceUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public Namespace apply(Context context) { @@ -210,11 +204,7 @@ public Namespace apply(Context context) { } public Namespace refresh() { - this.innerObject = serviceManager.serviceClient() - .getNamespaces() - .getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public Namespace refresh(Context context) { 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 2f2ffbdaa4406..92fd10bc14102 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 @@ -286,23 +286,7 @@ private Mono getAsync(String resourceGroupName, String namesp .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get an event subscription of a namespace topic. - * - * Get properties of an event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a namespace topic. - * - * Get properties of an event subscription of a namespace topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context) { @@ -311,22 +295,7 @@ public Response getWithResponse(String resourceGroupName, Str resourceGroupName, namespaceName, topicName, eventSubscriptionName, accept, context); } - /** - * Get an event subscription of a namespace topic. - * - * Get properties of an event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a namespace topic. - * - * Get properties of an event subscription of a namespace topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SubscriptionInner get(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { @@ -383,11 +352,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, - contentType, accept, eventSubscriptionInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, + eventSubscriptionInfo, Context.NONE); } /** @@ -445,50 +411,15 @@ private PollerFlux, SubscriptionInner> beginCreate SubscriptionInner.class, SubscriptionInner.class, this.client.getContext()); } - /** - * Create or update an event subscription of a namespace topic. - * - * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. - * Existing event subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and - * others. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SubscriptionInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, namespaceName, topicName, - eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(response, SubscriptionInner.class, - SubscriptionInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, + eventSubscriptionInfo, Context.NONE); } - /** - * Create or update an event subscription of a namespace topic. - * - * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. - * Existing event subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and - * others. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SubscriptionInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo, @@ -523,53 +454,20 @@ private Mono createOrUpdateAsync(String resourceGroupName, St eventSubscriptionInfo).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update an event subscription of a namespace topic. - * - * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. - * Existing event subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and - * others. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SubscriptionInner createOrUpdate(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, - eventSubscriptionInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update an event subscription of a namespace topic. - * - * Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. - * Existing event subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and - * others. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SubscriptionInner createOrUpdate(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, - eventSubscriptionInfo, context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, namespaceName, topicName, + eventSubscriptionName, eventSubscriptionInfo, context)); } /** @@ -618,11 +516,8 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, - contentType, accept, eventSubscriptionUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } /** @@ -676,47 +571,16 @@ private PollerFlux, SubscriptionInner> beginUpdate SubscriptionInner.class, SubscriptionInner.class, this.client.getContext()); } - /** - * Update event subscription of a namespace topic. - * - * Update an existing event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, namespaceName, topicName, - eventSubscriptionName, eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, SubscriptionInner.class, - SubscriptionInner.class, Context.NONE); + return beginUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } - /** - * Update event subscription of a namespace topic. - * - * Update an existing event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SubscriptionInner> beginUpdate(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, @@ -749,49 +613,20 @@ private Mono updateAsync(String resourceGroupName, String nam eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Update event subscription of a namespace topic. - * - * Update an existing event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters).getFinalResult(); + return update(resourceGroupName, namespaceName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } - /** - * Update event subscription of a namespace topic. - * - * Update an existing event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SubscriptionInner update(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, SubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters, context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginUpdate(resourceGroupName, namespaceName, topicName, + eventSubscriptionName, eventSubscriptionUpdateParameters, context)); } /** @@ -835,9 +670,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, eventSubscriptionName, - Context.NONE); + return deleteWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE); } /** @@ -886,43 +719,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete an event subscription of a namespace topic. - * - * Delete an existing event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { - Response response - = deleteWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription of a namespace topic. - * - * Delete an existing event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context) { @@ -952,42 +756,18 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete an event subscription of a namespace topic. - * - * Delete an existing event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, namespaceName, topicName, eventSubscriptionName).getFinalResult(); + delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription of a namespace topic. - * - * Delete an existing event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context) { - beginDelete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context).getFinalResult(); + this.client.getLroFinalResultOrError( + beginDelete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context)); } /** @@ -1098,12 +878,7 @@ private PagedFlux listByNamespaceTopicAsync(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceTopicSinglePage(String resourceGroupName, String namespaceName, String topicName, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listByNamespaceTopicSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, - filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceTopicSinglePage(resourceGroupName, namespaceName, topicName, filter, top, Context.NONE); } /** @@ -1138,50 +913,16 @@ private PagedResponse listByNamespaceTopicSinglePage(String r res.getValue().nextLink(), null); } - /** - * List event subscriptions of a namespace topic. - * - * List event subscriptions that belong to a specific namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List event subscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespaceTopic(String resourceGroupName, String namespaceName, String topicName) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listByNamespaceTopicSinglePage(resourceGroupName, namespaceName, topicName, filter, top), - nextLink -> listByNamespaceTopicNextSinglePage(nextLink)); + return listByNamespaceTopic(resourceGroupName, namespaceName, topicName, filter, top, Context.NONE); } - /** - * List event subscriptions of a namespace topic. - * - * List event subscriptions that belong to a specific namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List event subscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespaceTopic(String resourceGroupName, String namespaceName, String topicName, String filter, Integer top, Context context) { @@ -1242,23 +983,7 @@ private Mono getDeliveryAttributesAsync(String eventSubscriptionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get delivery attributes for an event subscription of a namespace topic. - * - * Get all delivery attributes for an event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription of a namespace topic. - * - * Get all delivery attributes for an event subscription of a namespace topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context) { @@ -1268,22 +993,7 @@ public Response getDeliveryAttributesWithRespo context); } - /** - * Get delivery attributes for an event subscription of a namespace topic. - * - * Get all delivery attributes for an event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription of a namespace topic. - * - * Get all delivery attributes for an event subscription of a namespace topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { @@ -1343,23 +1053,7 @@ private Mono getFullUrlAsync(String resourceGroupName, .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get full URL of an event subscription of a namespace topic. - * - * Get the full endpoint URL for an event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription of a namespace topic. - * - * Get the full endpoint URL for an event subscription of a namespace topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, Context context) { @@ -1369,22 +1063,7 @@ public Response getFullUrlWithResponse(String resource context); } - /** - * Get full URL of an event subscription of a namespace topic. - * - * Get the full endpoint URL for an event subscription of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription of a namespace topic. - * - * Get the full endpoint URL for an event subscription of a namespace topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SubscriptionFullUrlInner getFullUrl(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { @@ -1428,11 +1107,7 @@ private Mono> listByNamespaceTopicNextSinglePag */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceTopicNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByNamespaceTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceTopicNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java index 4a3a7d8b0977c..7309c52271162 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java @@ -51,7 +51,7 @@ public Subscription get(String resourceGroupName, String namespaceName, String t } public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName); + this.delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE); } public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName, @@ -113,131 +113,42 @@ public SubscriptionFullUrl getFullUrl(String resourceGroupName, String namespace } public Subscription getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - String eventSubscriptionName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "eventSubscriptionName"); - if (eventSubscriptionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE) - .getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String topicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - String eventSubscriptionName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "topicName", "topics", LOGGER); + String eventSubscriptionName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "eventSubscriptionName"); - if (eventSubscriptionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } + "eventSubscriptionName", "eventSubscriptions", LOGGER); return this.getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - String eventSubscriptionName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "eventSubscriptionName"); - if (eventSubscriptionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } - this.delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String topicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - String eventSubscriptionName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "topicName", "topics", LOGGER); + String eventSubscriptionName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}", - "eventSubscriptionName"); - if (eventSubscriptionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } + "eventSubscriptionName", "eventSubscriptions", LOGGER); this.delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java index 0f01969b2c320..bda448870b1db 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java @@ -80,10 +80,7 @@ public NamespaceTopicImpl withExistingNamespace(String resourceGroupName, String } public NamespaceTopic create() { - this.innerObject = serviceManager.serviceClient() - .getNamespaceTopics() - .createOrUpdate(resourceGroupName, namespaceName, topicName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public NamespaceTopic create(Context context) { @@ -105,10 +102,7 @@ public NamespaceTopicImpl update() { } public NamespaceTopic apply() { - this.innerObject = serviceManager.serviceClient() - .getNamespaceTopics() - .update(resourceGroupName, namespaceName, topicName, updateNamespaceTopicUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public NamespaceTopic apply(Context context) { @@ -134,11 +128,7 @@ public NamespaceTopic apply(Context context) { } public NamespaceTopic refresh() { - this.innerObject = serviceManager.serviceClient() - .getNamespaceTopics() - .getWithResponse(resourceGroupName, namespaceName, topicName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public NamespaceTopic refresh(Context context) { 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 568dcf7278278..ffb0d8f4198be 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 @@ -275,22 +275,7 @@ private Mono getAsync(String resourceGroupName, String name .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a namespace topic. - * - * Get properties of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a namespace topic. - * - * Get properties of a namespace topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String topicName, Context context) { @@ -299,21 +284,7 @@ public Response getWithResponse(String resourceGroupName, S resourceGroupName, namespaceName, topicName, accept, context); } - /** - * Get a namespace topic. - * - * Get properties of a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a namespace topic. - * - * Get properties of a namespace topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceTopicInner get(String resourceGroupName, String namespaceName, String topicName) { return getWithResponse(resourceGroupName, namespaceName, topicName, Context.NONE).getValue(); @@ -362,11 +333,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, - namespaceTopicInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, + Context.NONE); } /** @@ -417,44 +385,14 @@ private PollerFlux, NamespaceTopicInner> beginCr NamespaceTopicInner.class, NamespaceTopicInner.class, this.client.getContext()); } - /** - * Create a namespace topic. - * - * Asynchronously creates a new namespace topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param namespaceTopicInfo Namespace topic information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace topic details. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceTopicInner> beginCreateOrUpdate( String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, namespaceName, topicName, namespaceTopicInfo); - return this.client.getLroResult(response, NamespaceTopicInner.class, - NamespaceTopicInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, Context.NONE); } - /** - * Create a namespace topic. - * - * Asynchronously creates a new namespace topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param namespaceTopicInfo Namespace topic information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace topic details. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceTopicInner> beginCreateOrUpdate( String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo, @@ -486,46 +424,19 @@ private Mono createOrUpdateAsync(String resourceGroupName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a namespace topic. - * - * Asynchronously creates a new namespace topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param namespaceTopicInfo Namespace topic information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceTopicInner createOrUpdate(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, Context.NONE); } - /** - * Create a namespace topic. - * - * Asynchronously creates a new namespace topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param namespaceTopicInfo Namespace topic information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceTopicInner createOrUpdate(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, context)); } /** @@ -571,11 +482,8 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, - namespaceTopicUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, + Context.NONE); } /** @@ -626,44 +534,14 @@ private PollerFlux, NamespaceTopicInner> beginUp NamespaceTopicInner.class, NamespaceTopicInner.class, this.client.getContext()); } - /** - * Update a namespace topic. - * - * Asynchronously updates a namespace topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace topic details. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters); - return this.client.getLroResult(response, NamespaceTopicInner.class, - NamespaceTopicInner.class, Context.NONE); + return beginUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, Context.NONE); } - /** - * Update a namespace topic. - * - * Asynchronously updates a namespace topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace topic details. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceTopicInner> beginUpdate(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, @@ -695,47 +573,19 @@ private Mono updateAsync(String resourceGroupName, String n .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a namespace topic. - * - * Asynchronously updates a namespace topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { - return beginUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters) - .getFinalResult(); + return update(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, Context.NONE); } - /** - * Update a namespace topic. - * - * Asynchronously updates a namespace topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param namespaceTopicUpdateParameters Namespace topic update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace topic details. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceTopicInner update(String resourceGroupName, String namespaceName, String topicName, NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginUpdate(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context)); } /** @@ -775,8 +625,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, Context.NONE); + return deleteWithResponse(resourceGroupName, namespaceName, topicName, Context.NONE); } /** @@ -821,40 +670,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a namespace topic. - * - * Delete existing namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, topicName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, namespaceName, topicName, Context.NONE); } - /** - * Delete a namespace topic. - * - * Delete existing namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName, Context context) { @@ -881,39 +704,16 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a namespace topic. - * - * Delete existing namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String topicName) { - beginDelete(resourceGroupName, namespaceName, topicName).getFinalResult(); + delete(resourceGroupName, namespaceName, topicName, Context.NONE); } - /** - * Delete a namespace topic. - * - * Delete existing namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String topicName, Context context) { - beginDelete(resourceGroupName, namespaceName, topicName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, namespaceName, topicName, context)); } /** @@ -1016,12 +816,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top, Context.NONE); } /** @@ -1055,46 +850,15 @@ private PagedResponse listByNamespaceSinglePage(String reso res.getValue().nextLink(), null); } - /** - * List namespace topics under a namespace. - * - * List all the namespace topics under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List namespace topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top), - nextLink -> listByNamespaceNextSinglePage(nextLink)); + return listByNamespace(resourceGroupName, namespaceName, filter, top, Context.NONE); } - /** - * List namespace topics under a namespace. - * - * List all the namespace topics under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List namespace topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { @@ -1146,20 +910,7 @@ private Mono listSharedAccessKeysAsync(String resour .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * List keys for a namespace topic. - * - * List the two keys used to publish to a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String namespaceName, String topicName, Context context) { @@ -1168,19 +919,7 @@ public Response listSharedAccessKeysWithResponse(Str this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, accept, context); } - /** - * List keys for a namespace topic. - * - * List the two keys used to publish to a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String namespaceName, String topicName) { @@ -1230,11 +969,8 @@ private Mono>> regenerateKeyWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String namespaceName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicName, contentType, accept, - regenerateKeyRequest, Context.NONE); + return regenerateKeyWithResponse(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, + Context.NONE); } /** @@ -1287,45 +1023,15 @@ private PollerFlux, TopicSharedAccessKeys this.client.getContext()); } - /** - * Regenerate key for a namespace topic. - * - * Regenerate a shared access key for a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param regenerateKeyRequest Request body to regenerate key. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( String resourceGroupName, String namespaceName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - Response response - = regenerateKeyWithResponse(resourceGroupName, namespaceName, topicName, regenerateKeyRequest); - return this.client.getLroResult(response, - TopicSharedAccessKeysInner.class, TopicSharedAccessKeysInner.class, Context.NONE); + return beginRegenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, Context.NONE); } - /** - * Regenerate key for a namespace topic. - * - * Regenerate a shared access key for a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( String resourceGroupName, String namespaceName, String topicName, @@ -1357,46 +1063,19 @@ private Mono regenerateKeyAsync(String resourceGroup .flatMap(this.client::getLroFinalResultOrError); } - /** - * Regenerate key for a namespace topic. - * - * Regenerate a shared access key for a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param regenerateKeyRequest Request body to regenerate key. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String namespaceName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - return beginRegenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest).getFinalResult(); + return regenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, Context.NONE); } - /** - * Regenerate key for a namespace topic. - * - * Regenerate a shared access key for a namespace topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicName Name of the namespace topic. - * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String namespaceName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context) { - return beginRegenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginRegenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, context)); } /** @@ -1434,11 +1113,7 @@ private Mono> listByNamespaceNextSinglePageAs */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java index c987dfc743533..9e807b115e556 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java @@ -48,7 +48,7 @@ public NamespaceTopic get(String resourceGroupName, String namespaceName, String } public void delete(String resourceGroupName, String namespaceName, String topicName) { - this.serviceClient().delete(resourceGroupName, namespaceName, topicName); + this.delete(resourceGroupName, namespaceName, topicName, Context.NONE); } public void delete(String resourceGroupName, String namespaceName, String topicName, Context context) { @@ -89,13 +89,7 @@ public TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, Stri public TopicSharedAccessKeys regenerateKey(String resourceGroupName, String namespaceName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - TopicSharedAccessKeysInner inner - = this.serviceClient().regenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest); - if (inner != null) { - return new TopicSharedAccessKeysImpl(inner, this.manager()); - } else { - return null; - } + return this.regenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, Context.NONE); } public TopicSharedAccessKeys regenerateKey(String resourceGroupName, String namespaceName, String topicName, @@ -110,102 +104,36 @@ public TopicSharedAccessKeys regenerateKey(String resourceGroupName, String name } public NamespaceTopic getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - return this.getWithResponse(resourceGroupName, namespaceName, topicName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String topicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } + "topicName", "topics", LOGGER); return this.getWithResponse(resourceGroupName, namespaceName, topicName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - this.delete(resourceGroupName, namespaceName, topicName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String topicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } + "topicName", "topics", LOGGER); this.delete(resourceGroupName, namespaceName, topicName, context); } 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 16eb98474fd3e..45df37913a516 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 @@ -316,21 +316,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a namespace. - * - * Get properties of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a namespace. - * - * Get properties of a namespace along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, Context context) { @@ -339,20 +325,7 @@ public Response getByResourceGroupWithResponse(String resourceGr this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context); } - /** - * Get a namespace. - * - * Get properties of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a namespace. - * - * Get properties of a namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { return getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); @@ -399,11 +372,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, namespaceInfo, - Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, namespaceName, namespaceInfo, Context.NONE); } /** @@ -452,41 +421,14 @@ private PollerFlux, NamespaceInner> beginCreateOrUpda NamespaceInner.class, NamespaceInner.class, this.client.getContext()); } - /** - * Create or update a namespace. - * - * Asynchronously creates or updates a new namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param namespaceInfo Namespace information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, namespaceName, namespaceInfo); - return this.client.getLroResult(response, NamespaceInner.class, - NamespaceInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, namespaceName, namespaceInfo, Context.NONE); } - /** - * Create or update a namespace. - * - * Asynchronously creates or updates a new namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param namespaceInfo Namespace information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context) { @@ -516,42 +458,18 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a namespace. - * - * Asynchronously creates or updates a new namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param namespaceInfo Namespace information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, namespaceInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, namespaceName, namespaceInfo, Context.NONE); } - /** - * Create or update a namespace. - * - * Asynchronously creates or updates a new namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param namespaceInfo Namespace information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, namespaceInfo, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, namespaceName, namespaceInfo, context)); } /** @@ -595,11 +513,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, - namespaceUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, namespaceName, namespaceUpdateParameters, Context.NONE); } /** @@ -648,41 +562,14 @@ private PollerFlux, NamespaceInner> beginUpdateAsync( NamespaceInner.class, NamespaceInner.class, this.client.getContext()); } - /** - * Update a namespace. - * - * Asynchronously updates a namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, namespaceName, namespaceUpdateParameters); - return this.client.getLroResult(response, NamespaceInner.class, - NamespaceInner.class, Context.NONE); + return beginUpdate(resourceGroupName, namespaceName, namespaceUpdateParameters, Context.NONE); } - /** - * Update a namespace. - * - * Asynchronously updates a namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceInner> beginUpdate(String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters, Context context) { @@ -712,43 +599,19 @@ private Mono updateAsync(String resourceGroupName, String namesp .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a namespace. - * - * Asynchronously updates a namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceInner update(String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { - return beginUpdate(resourceGroupName, namespaceName, namespaceUpdateParameters).getFinalResult(); + return update(resourceGroupName, namespaceName, namespaceUpdateParameters, Context.NONE); } - /** - * Update a namespace. - * - * Asynchronously updates a namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param namespaceUpdateParameters Namespace update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceInner update(String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, namespaceName, namespaceUpdateParameters, context).getFinalResult(); + return this.client.getLroFinalResultOrError( + beginUpdate(resourceGroupName, namespaceName, namespaceUpdateParameters, context)); } /** @@ -785,8 +648,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, Context.NONE); + return deleteWithResponse(resourceGroupName, namespaceName, Context.NONE); } /** @@ -827,37 +689,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a namespace. - * - * Delete existing namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, namespaceName, Context.NONE); } - /** - * Delete a namespace. - * - * Delete existing namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, Context context) { @@ -882,37 +720,16 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName) { return beginDeleteAsync(resourceGroupName, namespaceName).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a namespace. - * - * Delete existing namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName) { - beginDelete(resourceGroupName, namespaceName).getFinalResult(); + delete(resourceGroupName, namespaceName, Context.NONE); } - /** - * Delete a namespace. - * - * Delete existing namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, Context context) { - beginDelete(resourceGroupName, namespaceName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, namespaceName, context)); } /** @@ -1010,12 +827,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -1048,44 +860,15 @@ private PagedResponse listByResourceGroupSinglePage(String resou res.getValue().nextLink(), null); } - /** - * List namespaces under a resource group. - * - * List all the namespaces under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List namespaces under a resource group. - * - * List all the namespaces under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -1181,11 +964,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1215,41 +994,15 @@ private PagedResponse listSinglePage(String filter, Integer top, res.getValue().nextLink(), null); } - /** - * List namespaces under an Azure subscription. - * - * List all the namespaces under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List namespaces under an Azure subscription. - * - * List all the namespaces under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Namespaces operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1297,19 +1050,7 @@ private Mono listSharedAccessKeysAsync(String re .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * List keys for a namespace. - * - * List the two keys used to publish to a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Namespace along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String namespaceName, Context context) { @@ -1318,18 +1059,7 @@ public Response listSharedAccessKeysWithResponse this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context); } - /** - * List keys for a namespace. - * - * List the two keys used to publish to a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String namespaceName) { return listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); @@ -1376,11 +1106,7 @@ private Mono>> regenerateKeyWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, - regenerateKeyRequest, Context.NONE); + return regenerateKeyWithResponse(resourceGroupName, namespaceName, regenerateKeyRequest, Context.NONE); } /** @@ -1431,42 +1157,14 @@ private Response regenerateKeyWithResponse(String resourceGroupName, this.client.getContext()); } - /** - * Regenerate key for a namespace. - * - * Regenerate a shared access key for a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of shared access keys of the Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceSharedAccessKeysInner> beginRegenerateKey( String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { - Response response - = regenerateKeyWithResponse(resourceGroupName, namespaceName, regenerateKeyRequest); - return this.client.getLroResult(response, - NamespaceSharedAccessKeysInner.class, NamespaceSharedAccessKeysInner.class, Context.NONE); + return beginRegenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest, Context.NONE); } - /** - * Regenerate key for a namespace. - * - * Regenerate a shared access key for a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of shared access keys of the Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NamespaceSharedAccessKeysInner> beginRegenerateKey( String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest, @@ -1497,43 +1195,19 @@ private Mono regenerateKeyAsync(String resourceG .flatMap(this.client::getLroFinalResultOrError); } - /** - * Regenerate key for a namespace. - * - * Regenerate a shared access key for a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { - return beginRegenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest).getFinalResult(); + return regenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest, Context.NONE); } - /** - * Regenerate key for a namespace. - * - * Regenerate a shared access key for a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest, Context context) { - return beginRegenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest, context).getFinalResult(); + return this.client.getLroFinalResultOrError( + beginRegenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest, context)); } /** @@ -1575,9 +1249,7 @@ private Mono>> validateCustomDomainOwnershipWithRespon @ServiceMethod(returns = ReturnType.SINGLE) private Response validateCustomDomainOwnershipWithResponse(String resourceGroupName, String namespaceName) { - final String accept = "application/json"; - return service.validateCustomDomainOwnershipSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, Context.NONE); + return validateCustomDomainOwnershipWithResponse(resourceGroupName, namespaceName, Context.NONE); } /** @@ -1625,42 +1297,15 @@ private Response validateCustomDomainOwnershipWithResponse(String re CustomDomainOwnershipValidationResultInner.class, this.client.getContext()); } - /** - * Validate ownership for all custom domains in a namespace. - * - * Performs ownership validation via checking TXT records for all custom domains in a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace custom domain ownership validation result. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomDomainOwnershipValidationResultInner> beginValidateCustomDomainOwnership(String resourceGroupName, String namespaceName) { - Response response = validateCustomDomainOwnershipWithResponse(resourceGroupName, namespaceName); - return this.client - .getLroResult( - response, CustomDomainOwnershipValidationResultInner.class, - CustomDomainOwnershipValidationResultInner.class, Context.NONE); + return beginValidateCustomDomainOwnership(resourceGroupName, namespaceName, Context.NONE); } - /** - * Validate ownership for all custom domains in a namespace. - * - * Performs ownership validation via checking TXT records for all custom domains in a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace custom domain ownership validation result. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomDomainOwnershipValidationResultInner> @@ -1692,41 +1337,19 @@ private Response validateCustomDomainOwnershipWithResponse(String re .flatMap(this.client::getLroFinalResultOrError); } - /** - * Validate ownership for all custom domains in a namespace. - * - * Performs ownership validation via checking TXT records for all custom domains in a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace custom domain ownership validation result. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public CustomDomainOwnershipValidationResultInner validateCustomDomainOwnership(String resourceGroupName, String namespaceName) { - return beginValidateCustomDomainOwnership(resourceGroupName, namespaceName).getFinalResult(); + return validateCustomDomainOwnership(resourceGroupName, namespaceName, Context.NONE); } - /** - * Validate ownership for all custom domains in a namespace. - * - * Performs ownership validation via checking TXT records for all custom domains in a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return namespace custom domain ownership validation result. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public CustomDomainOwnershipValidationResultInner validateCustomDomainOwnership(String resourceGroupName, String namespaceName, Context context) { - return beginValidateCustomDomainOwnership(resourceGroupName, namespaceName, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginValidateCustomDomainOwnership(resourceGroupName, namespaceName, context)); } /** @@ -1765,11 +1388,7 @@ private Mono> listByResourceGroupNextSinglePageAsy */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1829,11 +1448,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** 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 43542a88019e1..93a1d4e4c9174 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 @@ -50,7 +50,7 @@ public Namespace getByResourceGroup(String resourceGroupName, String namespaceNa } public void deleteByResourceGroup(String resourceGroupName, String namespaceName) { - this.serviceClient().delete(resourceGroupName, namespaceName); + this.delete(resourceGroupName, namespaceName, Context.NONE); } public void delete(String resourceGroupName, String namespaceName, Context context) { @@ -99,13 +99,7 @@ public NamespaceSharedAccessKeys listSharedAccessKeys(String resourceGroupName, public NamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { - NamespaceSharedAccessKeysInner inner - = this.serviceClient().regenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest); - if (inner != null) { - return new NamespaceSharedAccessKeysImpl(inner, this.manager()); - } else { - return null; - } + return this.regenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest, Context.NONE); } public NamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String namespaceName, @@ -121,13 +115,7 @@ public NamespaceSharedAccessKeys regenerateKey(String resourceGroupName, String public CustomDomainOwnershipValidationResult validateCustomDomainOwnership(String resourceGroupName, String namespaceName) { - CustomDomainOwnershipValidationResultInner inner - = this.serviceClient().validateCustomDomainOwnership(resourceGroupName, namespaceName); - if (inner != null) { - return new CustomDomainOwnershipValidationResultImpl(inner, this.manager()); - } else { - return null; - } + return this.validateCustomDomainOwnership(resourceGroupName, namespaceName, Context.NONE); } public CustomDomainOwnershipValidationResult validateCustomDomainOwnership(String resourceGroupName, @@ -142,74 +130,30 @@ public CustomDomainOwnershipValidationResult validateCustomDomainOwnership(Strin } public Namespace getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } + "namespaceName", "namespaces", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, namespaceName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - this.delete(resourceGroupName, namespaceName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } + "namespaceName", "namespaces", LOGGER); this.delete(resourceGroupName, namespaceName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java index bc92c809c0bf9..d281106edcef3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java @@ -213,24 +213,7 @@ private Mono getAsync(String resourc .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. - * @param resourceName The name of the resource group within the user's subscription. - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, @@ -240,23 +223,7 @@ public Response getWithResponse(Stri resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, accept, context); } - /** - * Get a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. - * @param resourceName The name of the resource group within the user's subscription. - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network security perimeter configuration. - * - * Get a specific network security perimeter configuration with a topic or domain. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, @@ -336,12 +303,7 @@ private PagedFlux listAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceType, resourceName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(resourceGroupName, resourceType, resourceName, Context.NONE); } /** @@ -372,46 +334,14 @@ private PagedResponse listSinglePage res.getValue().nextLink(), null); } - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. - * @param resourceName The name of the resource group within the user's subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain as paginated response with - * {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceType, resourceName), - nextLink -> listNextSinglePage(nextLink)); + return list(resourceGroupName, resourceType, resourceName, Context.NONE); } - /** - * Get all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. - * @param resourceName The name of the resource group within the user's subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all network security perimeter configurations for resource. - * - * Get all network security perimeter configurations associated with a topic or domain as paginated response with - * {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, Context context) { @@ -468,10 +398,8 @@ private Mono>> reconcileWithResponseAsync(String resou private Response reconcileWithResponse(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName) { - final String accept = "application/json"; - return service.reconcileSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceType, resourceName, perimeterGuid, - associationName, accept, Context.NONE); + return reconcileWithResponse(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, + Context.NONE); } /** @@ -530,52 +458,17 @@ private Response reconcileWithResponse(String resourceGroupName, NetworkSecurityPerimeterConfigurationInner.class, this.client.getContext()); } - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. - * @param resourceName The name of the resource group within the user's subscription. - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network security perimeter configuration. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkSecurityPerimeterConfigurationInner> beginReconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName) { - Response response - = reconcileWithResponse(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); - return this.client - .getLroResult( - response, NetworkSecurityPerimeterConfigurationInner.class, - NetworkSecurityPerimeterConfigurationInner.class, Context.NONE); + return beginReconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, + Context.NONE); } - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. - * @param resourceName The name of the resource group within the user's subscription. - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network security perimeter configuration. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkSecurityPerimeterConfigurationInner> @@ -613,53 +506,21 @@ private Mono reconcileAsync(String r .flatMap(this.client::getLroFinalResultOrError); } - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. - * @param resourceName The name of the resource group within the user's subscription. - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName) { - return beginReconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName) - .getFinalResult(); + return reconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, Context.NONE); } - /** - * Reconcile a specific network security perimeter configuration for a given network security perimeter association. - * - * Reconcile a specific network security perimeter configuration for a given network security perimeter association - * with a topic or domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceType The type of the resource. This can be either \\'topics\\', or \\'domains\\'. - * @param resourceName The name of the resource group within the user's subscription. - * @param perimeterGuid Unique identifier for perimeter. - * @param associationName Association name to association network security perimeter resource to profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network security perimeter configuration. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName, Context context) { - return beginReconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginReconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, context)); } /** @@ -702,11 +563,7 @@ private Mono> listNext */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java index aeca57e2ee71c..cf73ce09499fd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NetworkSecurityPerimeterConfigurationsImpl.java @@ -51,10 +51,7 @@ public NetworkSecurityPerimeterConfiguration get(String resourceGroupName, public PagedIterable list(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, resourceType, resourceName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); + return this.list(resourceGroupName, resourceType, resourceName, Context.NONE); } public PagedIterable list(String resourceGroupName, @@ -68,13 +65,8 @@ public PagedIterable list(String resource public NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, NetworkSecurityPerimeterResourceType resourceType, String resourceName, String perimeterGuid, String associationName) { - NetworkSecurityPerimeterConfigurationInner inner = this.serviceClient() - .reconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName); - if (inner != null) { - return new NetworkSecurityPerimeterConfigurationImpl(inner, this.manager()); - } else { - return null; - } + return this.reconcile(resourceGroupName, resourceType, resourceName, perimeterGuid, associationName, + Context.NONE); } public NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java index 97a9d9358c8c0..88aa3564c3468 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java @@ -137,11 +137,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(Context.NONE); } /** @@ -164,31 +160,13 @@ private PagedResponse listSinglePage(Context context) { res.getValue().nextLink(), null); } - /** - * List available operations. - * - * List the available operations supported by the Microsoft.EventGrid resource provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Operations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + return list(Context.NONE); } - /** - * List available operations. - * - * List the available operations supported by the Microsoft.EventGrid resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Operations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); @@ -228,11 +206,7 @@ private Mono> listNextSinglePageAsync(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java index b3e4fbd5ee019..8ca7047e1f428 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsImpl.java @@ -26,8 +26,7 @@ public OperationsImpl(OperationsClient innerClient, } public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return this.list(Context.NONE); } public PagedIterable list(Context context) { 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 ae3421261e739..9a5629618bbed 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 @@ -288,20 +288,7 @@ private Mono getByResourceGroupAsync(String resourceG return getByResourceGroupWithResponseAsync(resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a partner configuration. - * - * Get properties of a partner configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner configuration. - * - * Get properties of a partner configuration along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, Context context) { @@ -310,19 +297,7 @@ public Response getByResourceGroupWithResponse(String this.client.getSubscriptionId(), resourceGroupName, accept, context); } - /** - * Get a partner configuration. - * - * Get properties of a partner configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner configuration. - * - * Get properties of a partner configuration. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerConfigurationInner getByResourceGroup(String resourceGroupName) { return getByResourceGroupWithResponse(resourceGroupName, Context.NONE).getValue(); @@ -367,11 +342,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerConfigurationInfo, - Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, partnerConfigurationInfo, Context.NONE); } /** @@ -418,39 +389,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName this.client.getContext()); } - /** - * Create or update a partner configuration. - * - * Synchronously creates or updates a partner configuration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerConfigurationInfo Partner configuration information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerConfigurationInner> beginCreateOrUpdate(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, partnerConfigurationInfo); - return this.client.getLroResult(response, - PartnerConfigurationInner.class, PartnerConfigurationInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, partnerConfigurationInfo, Context.NONE); } - /** - * Create or update a partner configuration. - * - * Synchronously creates or updates a partner configuration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerConfigurationInfo Partner configuration information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerConfigurationInner> beginCreateOrUpdate( String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo, Context context) { @@ -479,41 +425,19 @@ private Mono createOrUpdateAsync(String resourceGroup .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a partner configuration. - * - * Synchronously creates or updates a partner configuration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerConfigurationInfo Partner configuration information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerConfigurationInner createOrUpdate(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo) { - return beginCreateOrUpdate(resourceGroupName, partnerConfigurationInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, partnerConfigurationInfo, Context.NONE); } - /** - * Create or update a partner configuration. - * - * Synchronously creates or updates a partner configuration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerConfigurationInfo Partner configuration information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerConfigurationInner createOrUpdate(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, partnerConfigurationInfo, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, partnerConfigurationInfo, context)); } /** @@ -555,11 +479,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, contentType, accept, - partnerConfigurationUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, partnerConfigurationUpdateParameters, Context.NONE); } /** @@ -607,39 +527,14 @@ private PollerFlux, PartnerConfigurationIn this.client.getContext()); } - /** - * Update a partner configuration. - * - * Synchronously updates a partner configuration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerConfigurationUpdateParameters Partner configuration update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerConfigurationInner> beginUpdate( String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, partnerConfigurationUpdateParameters); - return this.client.getLroResult(response, - PartnerConfigurationInner.class, PartnerConfigurationInner.class, Context.NONE); + return beginUpdate(resourceGroupName, partnerConfigurationUpdateParameters, Context.NONE); } - /** - * Update a partner configuration. - * - * Synchronously updates a partner configuration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerConfigurationUpdateParameters Partner configuration update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerConfigurationInner> beginUpdate( String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, @@ -669,41 +564,19 @@ private Mono updateAsync(String resourceGroupName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a partner configuration. - * - * Synchronously updates a partner configuration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerConfigurationUpdateParameters Partner configuration update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerConfigurationInner update(String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - return beginUpdate(resourceGroupName, partnerConfigurationUpdateParameters).getFinalResult(); + return update(resourceGroupName, partnerConfigurationUpdateParameters, Context.NONE); } - /** - * Update a partner configuration. - * - * Synchronously updates a partner configuration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerConfigurationUpdateParameters Partner configuration update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerConfigurationInner update(String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerConfigurationUpdateParameters, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginUpdate(resourceGroupName, partnerConfigurationUpdateParameters, context)); } /** @@ -738,8 +611,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, Context.NONE); + return deleteWithResponse(resourceGroupName, Context.NONE); } /** @@ -778,35 +650,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a partner configuration. - * - * Delete existing partner configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName) { - Response response = deleteWithResponse(resourceGroupName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, Context.NONE); } - /** - * Delete a partner configuration. - * - * Delete existing partner configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, Context context) { Response response = deleteWithResponse(resourceGroupName, context); @@ -829,35 +679,16 @@ private Mono deleteAsync(String resourceGroupName) { return beginDeleteAsync(resourceGroupName).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a partner configuration. - * - * Delete existing partner configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName) { - beginDelete(resourceGroupName).getFinalResult(); + delete(resourceGroupName, Context.NONE); } - /** - * Delete a partner configuration. - * - * Delete existing partner configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, Context context) { - beginDelete(resourceGroupName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, context)); } /** @@ -914,11 +745,7 @@ private PagedFlux listByResourceGroupAsync(String res */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, Context.NONE); } /** @@ -943,35 +770,13 @@ private PagedResponse listByResourceGroupSinglePage(S res.getValue().nextLink(), null); } - /** - * List partner configurations under a resource group. - * - * List all the partner configurations under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List partner configurations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, Context.NONE); } - /** - * List partner configurations under a resource group. - * - * List all the partner configurations under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List partner configurations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), @@ -1066,11 +871,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1100,41 +901,15 @@ private PagedResponse listSinglePage(String filter, I res.getValue().nextLink(), null); } - /** - * List partner configurations under an Azure subscription. - * - * List all the partner configurations under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List partner configurations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List partner configurations under an Azure subscription. - * - * List all the partner configurations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List partner configurations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1182,19 +957,7 @@ private Mono authorizePartnerAsync(String resourceGro .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Authorize a partner. - * - * Authorize a single partner either by partner registration immutable Id or by partner name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerInfo The information of the partner to be authorized. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response authorizePartnerWithResponse(String resourceGroupName, Partner partnerInfo, Context context) { @@ -1204,18 +967,7 @@ public Response authorizePartnerWithResponse(String r this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerInfo, context); } - /** - * Authorize a partner. - * - * Authorize a single partner either by partner registration immutable Id or by partner name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerInfo The information of the partner to be authorized. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerConfigurationInner authorizePartner(String resourceGroupName, Partner partnerInfo) { return authorizePartnerWithResponse(resourceGroupName, partnerInfo, Context.NONE).getValue(); @@ -1262,19 +1014,7 @@ private Mono unauthorizePartnerAsync(String resourceG .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Unauthorize a partner. - * - * Unauthorize a single partner either by partner registration immutable Id or by partner name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerInfo The information of the partner to be unauthorized. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response unauthorizePartnerWithResponse(String resourceGroupName, Partner partnerInfo, Context context) { @@ -1284,18 +1024,7 @@ public Response unauthorizePartnerWithResponse(String this.client.getSubscriptionId(), resourceGroupName, contentType, accept, partnerInfo, context); } - /** - * Unauthorize a partner. - * - * Unauthorize a single partner either by partner registration immutable Id or by partner name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerInfo The information of the partner to be unauthorized. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return partner configuration information. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerConfigurationInner unauthorizePartner(String resourceGroupName, Partner partnerInfo) { return unauthorizePartnerWithResponse(resourceGroupName, partnerInfo, Context.NONE).getValue(); @@ -1337,11 +1066,7 @@ private Mono> listByResourceGroupNextSi */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1402,11 +1127,7 @@ private Mono> listBySubscriptionNextSin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** 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 4a499a86f6fe1..20862134be19d 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 @@ -47,13 +47,7 @@ public PartnerConfiguration getByResourceGroup(String resourceGroupName) { public PartnerConfiguration createOrUpdate(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo) { - PartnerConfigurationInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, partnerConfigurationInfo); - if (inner != null) { - return new PartnerConfigurationImpl(inner, this.manager()); - } else { - return null; - } + return this.createOrUpdate(resourceGroupName, partnerConfigurationInfo, Context.NONE); } public PartnerConfiguration createOrUpdate(String resourceGroupName, @@ -69,13 +63,7 @@ public PartnerConfiguration createOrUpdate(String resourceGroupName, public PartnerConfiguration update(String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - PartnerConfigurationInner inner - = this.serviceClient().update(resourceGroupName, partnerConfigurationUpdateParameters); - if (inner != null) { - return new PartnerConfigurationImpl(inner, this.manager()); - } else { - return null; - } + return this.update(resourceGroupName, partnerConfigurationUpdateParameters, Context.NONE); } public PartnerConfiguration update(String resourceGroupName, @@ -90,7 +78,7 @@ public PartnerConfiguration update(String resourceGroupName, } public void delete(String resourceGroupName) { - this.serviceClient().delete(resourceGroupName); + this.delete(resourceGroupName, Context.NONE); } public void delete(String resourceGroupName, Context context) { @@ -98,8 +86,7 @@ public void delete(String resourceGroupName, Context context) { } public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerConfigurationImpl(inner1, this.manager())); + return this.listByResourceGroup(resourceGroupName, Context.NONE); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java index 7133ddce56841..3f672d78c6d77 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java @@ -112,10 +112,7 @@ public PartnerDestinationImpl withExistingResourceGroup(String resourceGroupName } public PartnerDestination create() { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .createOrUpdate(resourceGroupName, partnerDestinationName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public PartnerDestination create(Context context) { @@ -137,10 +134,7 @@ public PartnerDestinationImpl update() { } public PartnerDestination apply() { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .update(resourceGroupName, partnerDestinationName, updatePartnerDestinationUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public PartnerDestination apply(Context context) { @@ -163,11 +157,7 @@ public PartnerDestination apply(Context context) { } public PartnerDestination refresh() { - this.innerObject = serviceManager.serviceClient() - .getPartnerDestinations() - .getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public PartnerDestination refresh(Context context) { 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 a2fdfa4e6f9db..d824ac6834f20 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 @@ -288,21 +288,7 @@ private Mono getByResourceGroupAsync(String resourceGro .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner destination. - * - * Get properties of a partner destination along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String partnerDestinationName, Context context) { @@ -311,20 +297,7 @@ public Response getByResourceGroupWithResponse(String r this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, accept, context); } - /** - * Get a partner destination. - * - * Get properties of a partner destination. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner destination. - * - * Get properties of a partner destination. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerDestinationInner getByResourceGroup(String resourceGroupName, String partnerDestinationName) { return getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); @@ -371,11 +344,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, contentType, accept, - partnerDestination, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, partnerDestinationName, partnerDestination, Context.NONE); } /** @@ -425,42 +394,14 @@ private PollerFlux, PartnerDestinationInner> this.client.getContext()); } - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { - Response response - = createOrUpdateWithResponse(resourceGroupName, partnerDestinationName, partnerDestination); - return this.client.getLroResult(response, - PartnerDestinationInner.class, PartnerDestinationInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, partnerDestinationName, partnerDestination, Context.NONE); } - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination, @@ -491,44 +432,19 @@ private Mono createOrUpdateAsync(String resourceGroupNa .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerDestinationInner createOrUpdate(String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { - return beginCreateOrUpdate(resourceGroupName, partnerDestinationName, partnerDestination).getFinalResult(); + return createOrUpdate(resourceGroupName, partnerDestinationName, partnerDestination, Context.NONE); } - /** - * Create a partner destination. - * - * Asynchronously creates a new partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestination Partner destination create information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerDestinationInner createOrUpdate(String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination, Context context) { - return beginCreateOrUpdate(resourceGroupName, partnerDestinationName, partnerDestination, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, partnerDestinationName, partnerDestination, context)); } /** @@ -572,11 +488,8 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, contentType, accept, - partnerDestinationUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, + Context.NONE); } /** @@ -627,43 +540,15 @@ private PollerFlux, PartnerDestinationInner> this.client.getContext()); } - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerDestinationInner> beginUpdate( String resourceGroupName, String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters); - return this.client.getLroResult(response, - PartnerDestinationInner.class, PartnerDestinationInner.class, Context.NONE); + return beginUpdate(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, Context.NONE); } - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerDestinationInner> beginUpdate( String resourceGroupName, String partnerDestinationName, @@ -694,45 +579,19 @@ private Mono updateAsync(String resourceGroupName, Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { - return beginUpdate(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters) - .getFinalResult(); + return update(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, Context.NONE); } - /** - * Update a partner destination. - * - * Asynchronously updates a partner destination with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param partnerDestinationUpdateParameters Partner destination update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerDestinationInner update(String resourceGroupName, String partnerDestinationName, PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginUpdate(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context)); } /** @@ -770,8 +629,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerDestinationName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, Context.NONE); + return deleteWithResponse(resourceGroupName, partnerDestinationName, Context.NONE); } /** @@ -814,37 +672,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName) { - Response response = deleteWithResponse(resourceGroupName, partnerDestinationName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, partnerDestinationName, Context.NONE); } - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName, Context context) { @@ -870,37 +704,16 @@ private Mono deleteAsync(String resourceGroupName, String partnerDestinati .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerDestinationName) { - beginDelete(resourceGroupName, partnerDestinationName).getFinalResult(); + delete(resourceGroupName, partnerDestinationName, Context.NONE); } - /** - * Delete a partner destination. - * - * Delete existing partner destination. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerDestinationName, Context context) { - beginDelete(resourceGroupName, partnerDestinationName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, partnerDestinationName, context)); } /** @@ -999,12 +812,7 @@ private PagedFlux listByResourceGroupAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -1037,44 +845,15 @@ private PagedResponse listByResourceGroupSinglePage(Str res.getValue().nextLink(), null); } - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List partner destinations under a resource group. - * - * List all the partner destinations under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -1170,11 +949,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1204,41 +979,15 @@ private PagedResponse listSinglePage(String filter, Int res.getValue().nextLink(), null); } - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List partner destinations under an Azure subscription. - * - * List all the partner destinations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1285,19 +1034,7 @@ private Mono activateAsync(String resourceGroupName, St .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response activateWithResponse(String resourceGroupName, String partnerDestinationName, Context context) { @@ -1306,18 +1043,7 @@ public Response activateWithResponse(String resourceGro this.client.getSubscriptionId(), resourceGroupName, partnerDestinationName, accept, context); } - /** - * Activate a partner destination. - * - * Activate a newly created partner destination. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerDestinationName Name of the partner destination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Destination. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerDestinationInner activate(String resourceGroupName, String partnerDestinationName) { return activateWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); @@ -1359,11 +1085,7 @@ private Mono> listByResourceGroupNextSing */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1423,11 +1145,7 @@ private Mono> listBySubscriptionNextSingl */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java index 6c628ce03a6fb..74c9dc43fd4a5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java @@ -46,7 +46,7 @@ public PartnerDestination getByResourceGroup(String resourceGroupName, String pa } public void deleteByResourceGroup(String resourceGroupName, String partnerDestinationName) { - this.serviceClient().delete(resourceGroupName, partnerDestinationName); + this.delete(resourceGroupName, partnerDestinationName, Context.NONE); } public void delete(String resourceGroupName, String partnerDestinationName, Context context) { @@ -93,74 +93,30 @@ public PartnerDestination activate(String resourceGroupName, String partnerDesti } public PartnerDestination getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerDestinationName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}", - "partnerDestinationName"); - if (partnerDestinationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerDestinationName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerDestinationName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}", - "partnerDestinationName"); - if (partnerDestinationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); - } + "partnerDestinationName", "partnerDestinations", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerDestinationName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}", - "partnerDestinationName"); - if (partnerDestinationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); - } - this.delete(resourceGroupName, partnerDestinationName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerDestinationName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerDestinationName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}", - "partnerDestinationName"); - if (partnerDestinationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); - } + "partnerDestinationName", "partnerDestinations", LOGGER); this.delete(resourceGroupName, partnerDestinationName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java index 246b0fdeddc6a..bb3662eb20f92 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java @@ -140,10 +140,7 @@ public PartnerNamespaceImpl withExistingResourceGroup(String resourceGroupName) } public PartnerNamespace create() { - this.innerObject = serviceManager.serviceClient() - .getPartnerNamespaces() - .createOrUpdate(resourceGroupName, partnerNamespaceName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public PartnerNamespace create(Context context) { @@ -165,10 +162,7 @@ public PartnerNamespaceImpl update() { } public PartnerNamespace apply() { - this.innerObject = serviceManager.serviceClient() - .getPartnerNamespaces() - .update(resourceGroupName, partnerNamespaceName, updatePartnerNamespaceUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public PartnerNamespace apply(Context context) { @@ -191,11 +185,7 @@ public PartnerNamespace apply(Context context) { } public PartnerNamespace refresh() { - this.innerObject = serviceManager.serviceClient() - .getPartnerNamespaces() - .getByResourceGroupWithResponse(resourceGroupName, partnerNamespaceName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public PartnerNamespace refresh(Context context) { 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 9b129dabbcb2e..8ed9fb5ac5b7c 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 @@ -310,21 +310,7 @@ private Mono getByResourceGroupAsync(String resourceGroup .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a partner namespace. - * - * Get properties of a partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner namespace. - * - * Get properties of a partner namespace along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String partnerNamespaceName, Context context) { @@ -333,20 +319,7 @@ public Response getByResourceGroupWithResponse(String res this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, accept, context); } - /** - * Get a partner namespace. - * - * Get properties of a partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner namespace. - * - * Get properties of a partner namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String partnerNamespaceName) { return getByResourceGroupWithResponse(resourceGroupName, partnerNamespaceName, Context.NONE).getValue(); @@ -393,11 +366,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, - partnerNamespaceInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo, Context.NONE); } /** @@ -447,42 +416,14 @@ private PollerFlux, PartnerNamespaceInner> beg this.client.getContext()); } - /** - * Create a partner namespace. - * - * Asynchronously creates a new partner namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceInfo PartnerNamespace information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid Partner Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerNamespaceInner> beginCreateOrUpdate( String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo); - return this.client.getLroResult(response, - PartnerNamespaceInner.class, PartnerNamespaceInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo, Context.NONE); } - /** - * Create a partner namespace. - * - * Asynchronously creates a new partner namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceInfo PartnerNamespace information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid Partner Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerNamespaceInner> beginCreateOrUpdate( String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo, @@ -513,44 +454,19 @@ private Mono createOrUpdateAsync(String resourceGroupName .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a partner namespace. - * - * Asynchronously creates a new partner namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceInfo PartnerNamespace information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid Partner Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerNamespaceInner createOrUpdate(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo) { - return beginCreateOrUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo, Context.NONE); } - /** - * Create a partner namespace. - * - * Asynchronously creates a new partner namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceInfo PartnerNamespace information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid Partner Namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerNamespaceInner createOrUpdate(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo, context)); } /** @@ -594,11 +510,8 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, contentType, accept, - partnerNamespaceUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, + Context.NONE); } /** @@ -649,42 +562,14 @@ private PollerFlux, PartnerNamespaceInner> beg this.client.getContext()); } - /** - * Update a partner namespace. - * - * Asynchronously updates a partner namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters); - return this.client.getLroResult(response, - PartnerNamespaceInner.class, PartnerNamespaceInner.class, Context.NONE); + return beginUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, Context.NONE); } - /** - * Update a partner namespace. - * - * Asynchronously updates a partner namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerNamespaceInner> beginUpdate(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, @@ -715,44 +600,19 @@ private Mono updateAsync(String resourceGroupName, String .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a partner namespace. - * - * Asynchronously updates a partner namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - return beginUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters).getFinalResult(); + return update(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, Context.NONE); } - /** - * Update a partner namespace. - * - * Asynchronously updates a partner namespace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param partnerNamespaceUpdateParameters Partner namespace update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerNamespaceInner update(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginUpdate(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, context)); } /** @@ -790,8 +650,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerNamespaceName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, Context.NONE); + return deleteWithResponse(resourceGroupName, partnerNamespaceName, Context.NONE); } /** @@ -833,37 +692,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a partner namespace. - * - * Delete existing partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName) { - Response response = deleteWithResponse(resourceGroupName, partnerNamespaceName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, partnerNamespaceName, Context.NONE); } - /** - * Delete a partner namespace. - * - * Delete existing partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName, Context context) { @@ -889,37 +724,16 @@ private Mono deleteAsync(String resourceGroupName, String partnerNamespace .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a partner namespace. - * - * Delete existing partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerNamespaceName) { - beginDelete(resourceGroupName, partnerNamespaceName).getFinalResult(); + delete(resourceGroupName, partnerNamespaceName, Context.NONE); } - /** - * Delete a partner namespace. - * - * Delete existing partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerNamespaceName, Context context) { - beginDelete(resourceGroupName, partnerNamespaceName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, partnerNamespaceName, context)); } /** @@ -1018,12 +832,7 @@ private PagedFlux listByResourceGroupAsync(String resourc @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -1056,44 +865,15 @@ private PagedResponse listByResourceGroupSinglePage(Strin res.getValue().nextLink(), null); } - /** - * List partner namespaces under a resource group. - * - * List all the partner namespaces under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List partner namespaces under a resource group. - * - * List all the partner namespaces under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -1189,11 +969,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1223,41 +999,15 @@ private PagedResponse listSinglePage(String filter, Integ res.getValue().nextLink(), null); } - /** - * List partner namespaces under an Azure subscription. - * - * List all the partner namespaces under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List partner namespaces under an Azure subscription. - * - * List all the partner namespaces under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Namespaces operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1306,19 +1056,7 @@ private Mono listSharedAccessKeysAsync(St .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * List keys for a partner namespace. - * - * List the two keys used to publish to a partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the partner namespace along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String partnerNamespaceName, Context context) { @@ -1327,18 +1065,7 @@ public Response listSharedAccessKeysWithR this.client.getSubscriptionId(), resourceGroupName, partnerNamespaceName, accept, context); } - /** - * List keys for a partner namespace. - * - * List the two keys used to publish to a partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the partner namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerNamespaceSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String partnerNamespaceName) { @@ -1392,20 +1119,7 @@ private Mono regenerateKeyAsync(String re .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Regenerate key for a partner namespace. - * - * Regenerate a shared access key for a partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the partner namespace along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeyWithResponse(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, Context context) { @@ -1416,19 +1130,7 @@ public Response regenerateKeyWithResponse regenerateKeyRequest, context); } - /** - * Regenerate key for a partner namespace. - * - * Regenerate a shared access key for a partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerNamespaceName Name of the partner namespace. - * @param regenerateKeyRequest Request body to regenerate key. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the partner namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerNamespaceSharedAccessKeysInner regenerateKey(String resourceGroupName, String partnerNamespaceName, PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest) { @@ -1472,11 +1174,7 @@ private Mono> listByResourceGroupNextSingle */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1536,11 +1234,7 @@ private Mono> listBySubscriptionNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** 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 625329204b65a..a1fedb37f8d52 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 @@ -48,7 +48,7 @@ public PartnerNamespace getByResourceGroup(String resourceGroupName, String part } public void deleteByResourceGroup(String resourceGroupName, String partnerNamespaceName) { - this.serviceClient().delete(resourceGroupName, partnerNamespaceName); + this.delete(resourceGroupName, partnerNamespaceName, Context.NONE); } public void delete(String resourceGroupName, String partnerNamespaceName, Context context) { @@ -116,74 +116,30 @@ public PartnerNamespaceSharedAccessKeys regenerateKey(String resourceGroupName, } public PartnerNamespace getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerNamespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - "partnerNamespaceName"); - if (partnerNamespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerNamespaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, partnerNamespaceName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerNamespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerNamespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - "partnerNamespaceName"); - if (partnerNamespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerNamespaces'.", id))); - } + "partnerNamespaceName", "partnerNamespaces", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, partnerNamespaceName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerNamespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - "partnerNamespaceName"); - if (partnerNamespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerNamespaces'.", id))); - } - this.delete(resourceGroupName, partnerNamespaceName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerNamespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerNamespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}", - "partnerNamespaceName"); - if (partnerNamespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerNamespaces'.", id))); - } + "partnerNamespaceName", "partnerNamespaces", LOGGER); this.delete(resourceGroupName, partnerNamespaceName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java index 632b5b9c4936b..dc31413d00595 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationImpl.java @@ -89,10 +89,7 @@ public PartnerRegistrationImpl withExistingResourceGroup(String resourceGroupNam } public PartnerRegistration create() { - this.innerObject = serviceManager.serviceClient() - .getPartnerRegistrations() - .createOrUpdate(resourceGroupName, partnerRegistrationName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public PartnerRegistration create(Context context) { @@ -114,11 +111,7 @@ public PartnerRegistrationImpl update() { } public PartnerRegistration apply() { - this.innerObject = serviceManager.serviceClient() - .getPartnerRegistrations() - .update(resourceGroupName, partnerRegistrationName, updatePartnerRegistrationUpdateParameters, - Context.NONE); - return this; + return this.apply(Context.NONE); } public PartnerRegistration apply(Context context) { @@ -141,11 +134,7 @@ public PartnerRegistration apply(Context context) { } public PartnerRegistration refresh() { - this.innerObject = serviceManager.serviceClient() - .getPartnerRegistrations() - .getByResourceGroupWithResponse(resourceGroupName, partnerRegistrationName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public PartnerRegistration refresh(Context context) { 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 014c29029490a..9f855fb94f9d1 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 @@ -268,21 +268,7 @@ private Mono getByResourceGroupAsync(String resourceGr .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a partner registration. - * - * Gets a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration. - * - * Gets a partner registration with the specified parameters along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String partnerRegistrationName, Context context) { @@ -291,20 +277,7 @@ public Response getByResourceGroupWithResponse(String this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, accept, context); } - /** - * Get a partner registration. - * - * Gets a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner registration. - * - * Gets a partner registration with the specified parameters. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerRegistrationInner getByResourceGroup(String resourceGroupName, String partnerRegistrationName) { return getByResourceGroupWithResponse(resourceGroupName, partnerRegistrationName, Context.NONE).getValue(); @@ -352,11 +325,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, contentType, accept, - partnerRegistrationInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo, + Context.NONE); } /** @@ -406,42 +376,14 @@ private PollerFlux, PartnerRegistrationInne this.client.getContext()); } - /** - * Create a partner registration. - * - * Creates a new partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationInfo PartnerRegistration information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about a partner registration. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerRegistrationInner> beginCreateOrUpdate( String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo); - return this.client.getLroResult(response, - PartnerRegistrationInner.class, PartnerRegistrationInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo, Context.NONE); } - /** - * Create a partner registration. - * - * Creates a new partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationInfo PartnerRegistration information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about a partner registration. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerRegistrationInner> beginCreateOrUpdate( String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo, @@ -472,45 +414,19 @@ private Mono createOrUpdateAsync(String resourceGroupN .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a partner registration. - * - * Creates a new partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationInfo PartnerRegistration information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a partner registration. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerRegistrationInner createOrUpdate(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo) { - return beginCreateOrUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo) - .getFinalResult(); + return createOrUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo, Context.NONE); } - /** - * Create a partner registration. - * - * Creates a new partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationInfo PartnerRegistration information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a partner registration. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerRegistrationInner createOrUpdate(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo, context)); } /** @@ -554,11 +470,8 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, contentType, accept, - partnerRegistrationUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, + Context.NONE); } /** @@ -609,43 +522,16 @@ private PollerFlux, PartnerRegistrationInne this.client.getContext()); } - /** - * Update a partner registration. - * - * Updates a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerRegistrationInner> beginUpdate( String resourceGroupName, String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters); - return this.client.getLroResult(response, - PartnerRegistrationInner.class, PartnerRegistrationInner.class, Context.NONE); + return beginUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, + Context.NONE); } - /** - * Update a partner registration. - * - * Updates a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerRegistrationInner> beginUpdate( String resourceGroupName, String partnerRegistrationName, @@ -676,45 +562,19 @@ private Mono updateAsync(String resourceGroupName, Str .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a partner registration. - * - * Updates a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - return beginUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters) - .getFinalResult(); + return update(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, Context.NONE); } - /** - * Update a partner registration. - * - * Updates a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param partnerRegistrationUpdateParameters Partner registration update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerRegistrationInner update(String resourceGroupName, String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginUpdate(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, context)); } /** @@ -752,8 +612,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerRegistrationName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerRegistrationName, Context.NONE); + return deleteWithResponse(resourceGroupName, partnerRegistrationName, Context.NONE); } /** @@ -796,37 +655,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a partner registration. - * - * Deletes a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName) { - Response response = deleteWithResponse(resourceGroupName, partnerRegistrationName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, partnerRegistrationName, Context.NONE); } - /** - * Delete a partner registration. - * - * Deletes a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName, Context context) { @@ -852,37 +687,16 @@ private Mono deleteAsync(String resourceGroupName, String partnerRegistrat .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a partner registration. - * - * Deletes a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerRegistrationName) { - beginDelete(resourceGroupName, partnerRegistrationName).getFinalResult(); + delete(resourceGroupName, partnerRegistrationName, Context.NONE); } - /** - * Delete a partner registration. - * - * Deletes a partner registration with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerRegistrationName Name of the partner registration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerRegistrationName, Context context) { - beginDelete(resourceGroupName, partnerRegistrationName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, partnerRegistrationName, context)); } /** @@ -981,12 +795,7 @@ private PagedFlux listByResourceGroupAsync(String reso @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -1019,44 +828,15 @@ private PagedResponse listByResourceGroupSinglePage(St res.getValue().nextLink(), null); } - /** - * List partner registrations under a resource group. - * - * List all the partner registrations under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List partner registrations under a resource group. - * - * List all the partner registrations under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -1152,11 +932,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1186,41 +962,15 @@ private PagedResponse listSinglePage(String filter, In res.getValue().nextLink(), null); } - /** - * List partner registrations under an Azure subscription. - * - * List all the partner registrations under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List partner registrations under an Azure subscription. - * - * List all the partner registrations under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Registrations operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1263,11 +1013,7 @@ private Mono> listByResourceGroupNextSin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1328,11 +1074,7 @@ private Mono> listBySubscriptionNextSing */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java index 71e7874b057d6..9eba29af70ea6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java @@ -46,7 +46,7 @@ public PartnerRegistration getByResourceGroup(String resourceGroupName, String p } public void deleteByResourceGroup(String resourceGroupName, String partnerRegistrationName) { - this.serviceClient().delete(resourceGroupName, partnerRegistrationName); + this.delete(resourceGroupName, partnerRegistrationName, Context.NONE); } public void delete(String resourceGroupName, String partnerRegistrationName, Context context) { @@ -76,74 +76,30 @@ public PagedIterable list(String filter, Integer top, Conte } public PartnerRegistration getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerRegistrationName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - "partnerRegistrationName"); - if (partnerRegistrationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerRegistrations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, partnerRegistrationName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerRegistrationName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerRegistrationName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - "partnerRegistrationName"); - if (partnerRegistrationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerRegistrations'.", id))); - } + "partnerRegistrationName", "partnerRegistrations", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, partnerRegistrationName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerRegistrationName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - "partnerRegistrationName"); - if (partnerRegistrationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerRegistrations'.", id))); - } - this.delete(resourceGroupName, partnerRegistrationName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerRegistrationName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerRegistrationName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}", - "partnerRegistrationName"); - if (partnerRegistrationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerRegistrations'.", id))); - } + "partnerRegistrationName", "partnerRegistrations", LOGGER); this.delete(resourceGroupName, partnerRegistrationName, context); } 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 d7d2f5f018bc8..88ae64070ee33 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 @@ -294,22 +294,7 @@ private Mono getAsync(String resourceGroupName, String p .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get an event subscription of a partner topic. - * - * Get properties of an event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a partner topic. - * - * Get properties of an event subscription of a partner topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { @@ -318,21 +303,7 @@ public Response getWithResponse(String resourceGroupName resourceGroupName, partnerTopicName, eventSubscriptionName, accept, context); } - /** - * Get an event subscription of a partner topic. - * - * Get properties of an event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a partner topic. - * - * Get properties of an event subscription of a partner topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { return getWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE).getValue(); @@ -383,11 +354,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, contentType, - accept, eventSubscriptionInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, + eventSubscriptionInfo, Context.NONE); } /** @@ -442,47 +410,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Create or update an event subscription of a partner topic. - * - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. - * Existing event subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, partnerTopicName, - eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update an event subscription of a partner topic. - * - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. - * Existing event subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String partnerTopicName, String eventSubscriptionName, @@ -515,49 +452,20 @@ private Mono createOrUpdateAsync(String resourceGroupNam eventSubscriptionInfo).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update an event subscription of a partner topic. - * - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. - * Existing event subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo) - .getFinalResult(); + return createOrUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update an event subscription of a partner topic. - * - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. - * Existing event subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo, - context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, partnerTopicName, + eventSubscriptionName, eventSubscriptionInfo, context)); } /** @@ -603,11 +511,8 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, contentType, - accept, eventSubscriptionUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } /** @@ -661,45 +566,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Update event subscription of a partner topic. - * - * Update an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, - eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } - /** - * Update event subscription of a partner topic. - * - * Update an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, @@ -731,48 +607,21 @@ private Mono updateAsync(String resourceGroupName, Strin eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Update event subscription of a partner topic. - * - * Update an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, - eventSubscriptionUpdateParameters).getFinalResult(); + return update(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } - /** - * Update event subscription of a partner topic. - * - * Update an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, - eventSubscriptionUpdateParameters, context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginUpdate(resourceGroupName, partnerTopicName, + eventSubscriptionName, eventSubscriptionUpdateParameters, context)); } /** @@ -813,8 +662,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE); + return deleteWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE); } /** @@ -860,40 +708,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - Response response = deleteWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { @@ -921,40 +743,18 @@ private Mono deleteAsync(String resourceGroupName, String partnerTopicName .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, partnerTopicName, eventSubscriptionName).getFinalResult(); + delete(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription of a partner topic. - * - * Delete an existing event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { - beginDelete(resourceGroupName, partnerTopicName, eventSubscriptionName, context).getFinalResult(); + this.client + .getLroFinalResultOrError(beginDelete(resourceGroupName, partnerTopicName, eventSubscriptionName, context)); } /** @@ -1060,12 +860,7 @@ private PagedFlux listByPartnerTopicAsync(String resourc @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerTopicSinglePage(String resourceGroupName, String partnerTopicName, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listByPartnerTopicSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, filter, - top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByPartnerTopicSinglePage(resourceGroupName, partnerTopicName, filter, top, Context.NONE); } /** @@ -1099,46 +894,15 @@ private PagedResponse listByPartnerTopicSinglePage(Strin res.getValue().nextLink(), null); } - /** - * List event subscriptions of a partner topic. - * - * List event subscriptions that belong to a specific partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByPartnerTopic(String resourceGroupName, String partnerTopicName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByPartnerTopicSinglePage(resourceGroupName, partnerTopicName, filter, top), - nextLink -> listByPartnerTopicNextSinglePage(nextLink)); + return listByPartnerTopic(resourceGroupName, partnerTopicName, filter, top, Context.NONE); } - /** - * List event subscriptions of a partner topic. - * - * List event subscriptions that belong to a specific partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByPartnerTopic(String resourceGroupName, String partnerTopicName, String filter, Integer top, Context context) { @@ -1196,22 +960,7 @@ private Mono getFullUrlAsync(String resourceGroup .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get full URL of an event subscription of a partner topic. - * - * Get the full endpoint URL for an event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription of a partner topic. - * - * Get the full endpoint URL for an event subscription of a partner topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { @@ -1221,21 +970,7 @@ public Response getFullUrlWithResponse(String res context); } - /** - * Get full URL of an event subscription of a partner topic. - * - * Get the full endpoint URL for an event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription of a partner topic. - * - * Get the full endpoint URL for an event subscription of a partner topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { @@ -1293,22 +1028,7 @@ private Mono getDeliveryAttributesAsync(String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get delivery attributes for an event subscription of a partner topic. - * - * Get all delivery attributes for an event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription of a partner topic. - * - * Get all delivery attributes for an event subscription of a partner topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { @@ -1318,21 +1038,7 @@ public Response getDeliveryAttributesWithRespo context); } - /** - * Get delivery attributes for an event subscription of a partner topic. - * - * Get all delivery attributes for an event subscription of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription of a partner topic. - * - * Get all delivery attributes for an event subscription of a partner topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { @@ -1376,11 +1082,7 @@ private Mono> listByPartnerTopicNextSingle */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPartnerTopicNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByPartnerTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByPartnerTopicNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java index 00f3dea8706cf..b4f593909affb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java @@ -52,13 +52,8 @@ public EventSubscription get(String resourceGroupName, String partnerTopicName, public EventSubscription createOrUpdate(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - EventSubscriptionInner inner = this.serviceClient() - .createOrUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.createOrUpdate(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } public EventSubscription createOrUpdate(String resourceGroupName, String partnerTopicName, @@ -74,13 +69,8 @@ public EventSubscription createOrUpdate(String resourceGroupName, String partner public EventSubscription update(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - EventSubscriptionInner inner = this.serviceClient() - .update(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.update(resourceGroupName, partnerTopicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } public EventSubscription update(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, @@ -96,7 +86,7 @@ public EventSubscription update(String resourceGroupName, String partnerTopicNam } public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, partnerTopicName, eventSubscriptionName); + this.delete(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE); } public void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java index 1d73fbf3e9d56..42a50bedab5f9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java @@ -121,11 +121,7 @@ public PartnerTopicImpl withExistingResourceGroup(String resourceGroupName) { } public PartnerTopic create() { - this.innerObject = serviceManager.serviceClient() - .getPartnerTopics() - .createOrUpdateWithResponse(resourceGroupName, partnerTopicName, this.innerModel(), Context.NONE) - .getValue(); - return this; + return this.create(Context.NONE); } public PartnerTopic create(Context context) { @@ -148,11 +144,7 @@ public PartnerTopicImpl update() { } public PartnerTopic apply() { - this.innerObject = serviceManager.serviceClient() - .getPartnerTopics() - .updateWithResponse(resourceGroupName, partnerTopicName, updatePartnerTopicUpdateParameters, Context.NONE) - .getValue(); - return this; + return this.apply(Context.NONE); } public PartnerTopic apply(Context context) { @@ -176,11 +168,7 @@ public PartnerTopic apply(Context context) { } public PartnerTopic refresh() { - this.innerObject = serviceManager.serviceClient() - .getPartnerTopics() - .getByResourceGroupWithResponse(resourceGroupName, partnerTopicName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public PartnerTopic refresh(Context context) { 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 0ffbecffd60ea..cc50a4d20dfe1 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 @@ -305,21 +305,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a partner topic. - * - * Get properties of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner topic. - * - * Get properties of a partner topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String partnerTopicName, Context context) { @@ -328,20 +314,7 @@ public Response getByResourceGroupWithResponse(String resourc this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context); } - /** - * Get a partner topic. - * - * Get properties of a partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a partner topic. - * - * Get properties of a partner topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerTopicInner getByResourceGroup(String resourceGroupName, String partnerTopicName) { return getByResourceGroupWithResponse(resourceGroupName, partnerTopicName, Context.NONE).getValue(); @@ -392,20 +365,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, St .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Create a partner topic. - * - * Asynchronously creates a new partner topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicInfo Partner Topic information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse(String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo, Context context) { @@ -416,19 +376,7 @@ public Response createOrUpdateWithResponse(String resourceGro context); } - /** - * Create a partner topic. - * - * Asynchronously creates a new partner topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicInfo Partner Topic information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerTopicInner createOrUpdate(String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo) { @@ -481,20 +429,7 @@ private Mono updateAsync(String resourceGroupName, String par .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Update a partner topic. - * - * Asynchronously updates a partner topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String partnerTopicName, PartnerTopicUpdateParameters partnerTopicUpdateParameters, Context context) { @@ -505,19 +440,7 @@ public Response updateWithResponse(String resourceGroupName, partnerTopicUpdateParameters, context); } - /** - * Update a partner topic. - * - * Asynchronously updates a partner topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param partnerTopicUpdateParameters PartnerTopic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerTopicInner update(String resourceGroupName, String partnerTopicName, PartnerTopicUpdateParameters partnerTopicUpdateParameters) { @@ -560,8 +483,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String partnerTopicName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, Context.NONE); + return deleteWithResponse(resourceGroupName, partnerTopicName, Context.NONE); } /** @@ -603,37 +525,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a partner topic. - * - * Delete existing partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName) { - Response response = deleteWithResponse(resourceGroupName, partnerTopicName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, partnerTopicName, Context.NONE); } - /** - * Delete a partner topic. - * - * Delete existing partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, Context context) { @@ -659,37 +557,16 @@ private Mono deleteAsync(String resourceGroupName, String partnerTopicName .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a partner topic. - * - * Delete existing partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerTopicName) { - beginDelete(resourceGroupName, partnerTopicName).getFinalResult(); + delete(resourceGroupName, partnerTopicName, Context.NONE); } - /** - * Delete a partner topic. - * - * Delete existing partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String partnerTopicName, Context context) { - beginDelete(resourceGroupName, partnerTopicName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, partnerTopicName, context)); } /** @@ -788,12 +665,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -826,44 +698,15 @@ private PagedResponse listByResourceGroupSinglePage(String re res.getValue().nextLink(), null); } - /** - * List partner topics under a resource group. - * - * List all the partner topics under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List partner topics under a resource group. - * - * List all the partner topics under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -959,11 +802,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -993,41 +832,15 @@ private PagedResponse listSinglePage(String filter, Integer t res.getValue().nextLink(), null); } - /** - * List partner topics under an Azure subscription. - * - * List all the partner topics under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List partner topics under an Azure subscription. - * - * List all the partner topics under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Partner Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1074,19 +887,7 @@ private Mono activateAsync(String resourceGroupName, String p .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Activate a partner topic. - * - * Activate a newly created partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response activateWithResponse(String resourceGroupName, String partnerTopicName, Context context) { @@ -1095,18 +896,7 @@ public Response activateWithResponse(String resourceGroupName this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context); } - /** - * Activate a partner topic. - * - * Activate a newly created partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerTopicInner activate(String resourceGroupName, String partnerTopicName) { return activateWithResponse(resourceGroupName, partnerTopicName, Context.NONE).getValue(); @@ -1152,19 +942,7 @@ private Mono deactivateAsync(String resourceGroupName, String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Deactivate a partner topic. - * - * Deactivate specific partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response deactivateWithResponse(String resourceGroupName, String partnerTopicName, Context context) { @@ -1173,18 +951,7 @@ public Response deactivateWithResponse(String resourceGroupNa this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, accept, context); } - /** - * Deactivate a partner topic. - * - * Deactivate specific partner topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param partnerTopicName Name of the partner topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Grid Partner Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PartnerTopicInner deactivate(String resourceGroupName, String partnerTopicName) { return deactivateWithResponse(resourceGroupName, partnerTopicName, Context.NONE).getValue(); @@ -1226,11 +993,7 @@ private Mono> listByResourceGroupNextSinglePage */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1290,11 +1053,7 @@ private Mono> listBySubscriptionNextSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java index bf5839e02093e..4aedf9392dac4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java @@ -45,7 +45,7 @@ public PartnerTopic getByResourceGroup(String resourceGroupName, String partnerT } public void deleteByResourceGroup(String resourceGroupName, String partnerTopicName) { - this.serviceClient().delete(resourceGroupName, partnerTopicName); + this.delete(resourceGroupName, partnerTopicName, Context.NONE); } public void delete(String resourceGroupName, String partnerTopicName, Context context) { @@ -109,74 +109,30 @@ public PartnerTopic deactivate(String resourceGroupName, String partnerTopicName } public PartnerTopic getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerTopicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - "partnerTopicName"); - if (partnerTopicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerTopics'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, partnerTopicName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerTopicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerTopicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - "partnerTopicName"); - if (partnerTopicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerTopics'.", id))); - } + "partnerTopicName", "partnerTopics", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, partnerTopicName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerTopicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - "partnerTopicName"); - if (partnerTopicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerTopics'.", id))); - } - this.delete(resourceGroupName, partnerTopicName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String partnerTopicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String partnerTopicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}", - "partnerTopicName"); - if (partnerTopicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'partnerTopics'.", id))); - } + "partnerTopicName", "partnerTopics", LOGGER); this.delete(resourceGroupName, partnerTopicName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java index cd716e5f52627..500b77e171ea2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java @@ -78,10 +78,7 @@ public PermissionBindingImpl withExistingNamespace(String resourceGroupName, Str } public PermissionBinding create() { - this.innerObject = serviceManager.serviceClient() - .getPermissionBindings() - .createOrUpdate(resourceGroupName, namespaceName, permissionBindingName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public PermissionBinding create(Context context) { @@ -102,10 +99,7 @@ public PermissionBindingImpl update() { } public PermissionBinding apply() { - this.innerObject = serviceManager.serviceClient() - .getPermissionBindings() - .createOrUpdate(resourceGroupName, namespaceName, permissionBindingName, this.innerModel(), Context.NONE); - return this; + return this.apply(Context.NONE); } public PermissionBinding apply(Context context) { @@ -131,11 +125,7 @@ public PermissionBinding apply(Context context) { } public PermissionBinding refresh() { - this.innerObject = serviceManager.serviceClient() - .getPermissionBindings() - .getWithResponse(resourceGroupName, namespaceName, permissionBindingName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public PermissionBinding refresh(Context context) { 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 b4ac4a2e88e7d..139d82f4f28ad 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 @@ -212,22 +212,7 @@ private Mono getAsync(String resourceGroupName, String n .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a permission binding. - * - * Get properties of a permission binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a permission binding. - * - * Get properties of a permission binding along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { @@ -236,21 +221,7 @@ public Response getWithResponse(String resourceGroupName resourceGroupName, namespaceName, permissionBindingName, accept, context); } - /** - * Get a permission binding. - * - * Get properties of a permission binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a permission binding. - * - * Get properties of a permission binding. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PermissionBindingInner get(String resourceGroupName, String namespaceName, String permissionBindingName) { return getWithResponse(resourceGroupName, namespaceName, permissionBindingName, Context.NONE).getValue(); @@ -299,11 +270,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName, PermissionBindingInner permissionBindingInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, contentType, - accept, permissionBindingInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, namespaceName, permissionBindingName, + permissionBindingInfo, Context.NONE); } /** @@ -356,45 +324,16 @@ private PollerFlux, PermissionBindingInner> b this.client.getContext()); } - /** - * Create or update a permission binding. - * - * Create or update a permission binding with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @param permissionBindingInfo Permission binding information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Permission binding resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PermissionBindingInner> beginCreateOrUpdate( String resourceGroupName, String namespaceName, String permissionBindingName, PermissionBindingInner permissionBindingInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, namespaceName, - permissionBindingName, permissionBindingInfo); - return this.client.getLroResult(response, - PermissionBindingInner.class, PermissionBindingInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo, + Context.NONE); } - /** - * Create or update a permission binding. - * - * Create or update a permission binding with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @param permissionBindingInfo Permission binding information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Permission binding resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PermissionBindingInner> beginCreateOrUpdate( String resourceGroupName, String namespaceName, String permissionBindingName, @@ -427,47 +366,20 @@ private Mono createOrUpdateAsync(String resourceGroupNam .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a permission binding. - * - * Create or update a permission binding with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @param permissionBindingInfo Permission binding information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Permission binding resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PermissionBindingInner createOrUpdate(String resourceGroupName, String namespaceName, String permissionBindingName, PermissionBindingInner permissionBindingInfo) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo) - .getFinalResult(); + return createOrUpdate(resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo, + Context.NONE); } - /** - * Create or update a permission binding. - * - * Create or update a permission binding with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @param permissionBindingInfo Permission binding information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Permission binding resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PermissionBindingInner createOrUpdate(String resourceGroupName, String namespaceName, String permissionBindingName, PermissionBindingInner permissionBindingInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo, - context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, namespaceName, + permissionBindingName, permissionBindingInfo, context)); } /** @@ -508,8 +420,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String permissionBindingName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, permissionBindingName, Context.NONE); + return deleteWithResponse(resourceGroupName, namespaceName, permissionBindingName, Context.NONE); } /** @@ -555,40 +466,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a permission binding. - * - * Delete an existing permission binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String permissionBindingName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, permissionBindingName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, namespaceName, permissionBindingName, Context.NONE); } - /** - * Delete a permission binding. - * - * Delete an existing permission binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { @@ -616,39 +501,17 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a permission binding. - * - * Delete an existing permission binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String permissionBindingName) { - beginDelete(resourceGroupName, namespaceName, permissionBindingName).getFinalResult(); + delete(resourceGroupName, namespaceName, permissionBindingName, Context.NONE); } - /** - * Delete a permission binding. - * - * Delete an existing permission binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param permissionBindingName Name of the permission binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { - beginDelete(resourceGroupName, namespaceName, permissionBindingName, context).getFinalResult(); + this.client + .getLroFinalResultOrError(beginDelete(resourceGroupName, namespaceName, permissionBindingName, context)); } /** @@ -751,12 +614,7 @@ private PagedFlux listByNamespaceAsync(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top, Context.NONE); } /** @@ -790,46 +648,15 @@ private PagedResponse listByNamespaceSinglePage(String r res.getValue().nextLink(), null); } - /** - * List all permission bindings under a namespace. - * - * Get all the permission bindings under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Permission Binding operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top), - nextLink -> listByNamespaceNextSinglePage(nextLink)); + return listByNamespace(resourceGroupName, namespaceName, filter, top, Context.NONE); } - /** - * List all permission bindings under a namespace. - * - * Get all the permission bindings under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Permission Binding operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { @@ -873,11 +700,7 @@ private Mono> listByNamespaceNextSinglePag */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java index 6cfa423dfc8b0..255d3995569f1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java @@ -46,7 +46,7 @@ public PermissionBinding get(String resourceGroupName, String namespaceName, Str } public void delete(String resourceGroupName, String namespaceName, String permissionBindingName) { - this.serviceClient().delete(resourceGroupName, namespaceName, permissionBindingName); + this.delete(resourceGroupName, namespaceName, permissionBindingName, Context.NONE); } public void delete(String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { @@ -67,102 +67,36 @@ public PagedIterable listByNamespace(String resourceGroupName } public PermissionBinding getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String permissionBindingName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "permissionBindingName"); - if (permissionBindingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'permissionBindings'.", id))); - } - return this.getWithResponse(resourceGroupName, namespaceName, permissionBindingName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String permissionBindingName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String permissionBindingName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "permissionBindingName"); - if (permissionBindingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'permissionBindings'.", id))); - } + "permissionBindingName", "permissionBindings", LOGGER); return this.getWithResponse(resourceGroupName, namespaceName, permissionBindingName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String permissionBindingName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "permissionBindingName"); - if (permissionBindingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'permissionBindings'.", id))); - } - this.delete(resourceGroupName, namespaceName, permissionBindingName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String permissionBindingName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String permissionBindingName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}", - "permissionBindingName"); - if (permissionBindingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'permissionBindings'.", id))); - } + "permissionBindingName", "permissionBindings", LOGGER); this.delete(resourceGroupName, namespaceName, permissionBindingName, context); } 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 d28a60b5653d6..36901baa276be 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 @@ -239,27 +239,7 @@ private Mono getAsync(String resourceGroupName, .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a specific private endpoint connection. - * - * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection. - * - * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace along with - * {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, @@ -269,25 +249,7 @@ public Response getWithResponse(String resourceG resourceGroupName, parentType, parentName, privateEndpointConnectionName, accept, context); } - /** - * Get a specific private endpoint connection. - * - * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific private endpoint connection. - * - * Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner get(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { @@ -350,11 +312,8 @@ private Mono>> updateWithResponseAsync(String resource private Response updateWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, privateEndpointConnectionName, - contentType, accept, privateEndpointConnection, Context.NONE); + return updateWithResponse(resourceGroupName, parentType, parentName, privateEndpointConnectionName, + privateEndpointConnection, Context.NONE); } /** @@ -418,55 +377,16 @@ private PollerFlux, PrivateEndpointCo this.client.getContext()); } - /** - * Update a specific private endpoint connection. - * - * Update a specific private endpoint connection under a topic, domain or partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @param privateEndpointConnection The private endpoint connection object to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type - * using a specific property type. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - Response response = updateWithResponse(resourceGroupName, parentType, parentName, - privateEndpointConnectionName, privateEndpointConnection); - return this.client.getLroResult(response, - PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); + return beginUpdate(resourceGroupName, parentType, parentName, privateEndpointConnectionName, + privateEndpointConnection, Context.NONE); } - /** - * Update a specific private endpoint connection. - * - * Update a specific private endpoint connection under a topic, domain or partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @param privateEndpointConnection The private endpoint connection object to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type - * using a specific property type. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, @@ -505,57 +425,22 @@ private Mono updateAsync(String resourceGroupNam privateEndpointConnection).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a specific private endpoint connection. - * - * Update a specific private endpoint connection under a topic, domain or partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @param privateEndpointConnection The private endpoint connection object to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner update(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - return beginUpdate(resourceGroupName, parentType, parentName, privateEndpointConnectionName, - privateEndpointConnection).getFinalResult(); + return update(resourceGroupName, parentType, parentName, privateEndpointConnectionName, + privateEndpointConnection, Context.NONE); } - /** - * Update a specific private endpoint connection. - * - * Update a specific private endpoint connection under a topic, domain or partner namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @param privateEndpointConnection The private endpoint connection object to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner update(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - return beginUpdate(resourceGroupName, parentType, parentName, privateEndpointConnectionName, - privateEndpointConnection, context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginUpdate(resourceGroupName, parentType, parentName, + privateEndpointConnectionName, privateEndpointConnection, context)); } /** @@ -605,8 +490,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, privateEndpointConnectionName, + return deleteWithResponse(resourceGroupName, parentType, parentName, privateEndpointConnectionName, Context.NONE); } @@ -663,49 +547,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a specific private endpoint connection. - * - * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { - Response response - = deleteWithResponse(resourceGroupName, parentType, parentName, privateEndpointConnectionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, parentType, parentName, privateEndpointConnectionName, Context.NONE); } - /** - * Delete a specific private endpoint connection. - * - * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, @@ -739,49 +588,19 @@ private Mono deleteAsync(String resourceGroupName, PrivateEndpointConnecti .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a specific private endpoint connection. - * - * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { - beginDelete(resourceGroupName, parentType, parentName, privateEndpointConnectionName).getFinalResult(); + delete(resourceGroupName, parentType, parentName, privateEndpointConnectionName, Context.NONE); } - /** - * Delete a specific private endpoint connection. - * - * Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateEndpointConnectionName The type of the parent resource. This can be either \'topics\', \'domains\', - * or \'partnerNamespaces\' or \'namespaces\'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, Context context) { - beginDelete(resourceGroupName, parentType, parentName, privateEndpointConnectionName, context).getFinalResult(); + this.client.getLroFinalResultOrError( + beginDelete(resourceGroupName, parentType, parentName, privateEndpointConnectionName, context)); } /** @@ -902,12 +721,7 @@ private PagedFlux listByResourceAsync(String res @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceSinglePage(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listByResourceSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, - filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceSinglePage(resourceGroupName, parentType, parentName, filter, top, Context.NONE); } /** @@ -945,56 +759,16 @@ private PagedResponse listByResourceSinglePage(S res.getValue().nextLink(), null); } - /** - * Lists all private endpoint connections under a resource. - * - * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the list of all private endpoint connections operation as paginated response with - * {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listByResourceSinglePage(resourceGroupName, parentType, parentName, filter, top), - nextLink -> listByResourceNextSinglePage(nextLink)); + return listByResource(resourceGroupName, parentType, parentName, filter, top, Context.NONE); } - /** - * Lists all private endpoint connections under a resource. - * - * Get all private endpoint connections under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the list of all private endpoint connections operation as paginated response with - * {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String filter, Integer top, @@ -1039,11 +813,7 @@ private Mono> listByResourceNextSi */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java index 7a99428c9836f..4583f7e6c9be6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java @@ -51,14 +51,8 @@ public PrivateEndpointConnection get(String resourceGroupName, PrivateEndpointCo public PrivateEndpointConnection update(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - PrivateEndpointConnectionInner inner = this.serviceClient() - .update(resourceGroupName, parentType, parentName, privateEndpointConnectionName, - privateEndpointConnection); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } + return this.update(resourceGroupName, parentType, parentName, privateEndpointConnectionName, + privateEndpointConnection, Context.NONE); } public PrivateEndpointConnection update(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, @@ -76,7 +70,7 @@ public PrivateEndpointConnection update(String resourceGroupName, PrivateEndpoin public void delete(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, parentType, parentName, privateEndpointConnectionName); + this.delete(resourceGroupName, parentType, parentName, privateEndpointConnectionName, Context.NONE); } public void delete(String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, 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 5f941e993f046..d85c249c42d97 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 @@ -177,26 +177,7 @@ private Mono getAsync(String resourceGroupName, String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a private link resource. - * - * Get properties of a private link resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace - * or namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource. - * - * Get properties of a private link resource along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String parentType, String parentName, String privateLinkResourceName, Context context) { @@ -205,25 +186,7 @@ public Response getWithResponse(String resourceGroupNa resourceGroupName, parentType, parentName, privateLinkResourceName, accept, context); } - /** - * Get a private link resource. - * - * Get properties of a private link resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace - * or namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource. - * - * Get properties of a private link resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public PrivateLinkResourceInner get(String resourceGroupName, String parentType, String parentName, String privateLinkResourceName) { @@ -347,12 +310,7 @@ private PagedFlux listByResourceAsync(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceSinglePage(String resourceGroupName, String parentType, String parentName, String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listByResourceSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parentType, parentName, - filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceSinglePage(resourceGroupName, parentType, parentName, filter, top, Context.NONE); } /** @@ -389,54 +347,16 @@ private PagedResponse listByResourceSinglePage(String res.getValue().nextLink(), null); } - /** - * List private link resources under specific topic, domain, or partner namespace or namespace. - * - * List all the private link resources under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List private link resources operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource(String resourceGroupName, String parentType, String parentName) { final String filter = null; final Integer top = null; - return new PagedIterable<>( - () -> listByResourceSinglePage(resourceGroupName, parentType, parentName, filter, top), - nextLink -> listByResourceNextSinglePage(nextLink)); + return listByResource(resourceGroupName, parentType, parentName, filter, top, Context.NONE); } - /** - * List private link resources under specific topic, domain, or partner namespace or namespace. - * - * List all the private link resources under a topic, domain, or partner namespace or namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parentType The type of the parent resource. This can be either \\'topics\\', \\'domains\\', or - * \\'partnerNamespaces\\' or \\'namespaces\\'. - * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name or namespace name). - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List private link resources operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource(String resourceGroupName, String parentType, String parentName, String filter, Integer top, Context context) { @@ -480,11 +400,7 @@ private Mono> listByResourceNextSinglePa */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java index 7225d95d3e0ff..cc668ad8217c3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ResourceManagerUtils.java @@ -8,6 +8,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.logging.ClientLogger; import java.util.Arrays; import java.util.Iterator; import java.util.function.Function; @@ -58,6 +59,16 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri return idIndex < idStart ? value : null; } + static String getRequiredValueFromIdByParameterName(String id, String pathTemplate, String parameterName, + String segmentName, ClientLogger logger) { + String value = getValueFromIdByParameterName(id, pathTemplate, parameterName); + if (value == null) { + throw logger.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment '%s'.", id, segmentName))); + } + return value; + } + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { return new PagedIterableImpl<>(pageIterable, mapper); } 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 e86e906bdc3c8..f99f96297f3d4 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 @@ -100,11 +100,7 @@ public SubscriptionImpl withExistingTopic(String resourceGroupName, String names } public Subscription create() { - this.innerObject = serviceManager.serviceClient() - .getNamespaceTopicEventSubscriptions() - .createOrUpdate(resourceGroupName, namespaceName, topicName, eventSubscriptionName, this.innerModel(), - Context.NONE); - return this; + return this.create(Context.NONE); } public Subscription create(Context context) { @@ -127,11 +123,7 @@ public SubscriptionImpl update() { } public Subscription apply() { - this.innerObject = serviceManager.serviceClient() - .getNamespaceTopicEventSubscriptions() - .update(resourceGroupName, namespaceName, topicName, eventSubscriptionName, - updateEventSubscriptionUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public Subscription apply(Context context) { @@ -161,11 +153,7 @@ public Subscription apply(Context context) { } public Subscription refresh() { - this.innerObject = serviceManager.serviceClient() - .getNamespaceTopicEventSubscriptions() - .getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public Subscription refresh(Context context) { 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 f3bc3823f854a..129f18cabdf0b 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 @@ -293,22 +293,7 @@ private Mono getAsync(String resourceGroupName, String s .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get an event subscription of a system topic. - * - * Get an event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a system topic. - * - * Get an event subscription along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { @@ -317,21 +302,7 @@ public Response getWithResponse(String resourceGroupName resourceGroupName, systemTopicName, eventSubscriptionName, accept, context); } - /** - * Get an event subscription of a system topic. - * - * Get an event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a system topic. - * - * Get an event subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { return getWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE).getValue(); @@ -382,11 +353,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, contentType, - accept, eventSubscriptionInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, + eventSubscriptionInfo, Context.NONE); } /** @@ -441,47 +409,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Create or update an event subscription for a system topic. - * - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event - * subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, systemTopicName, - eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update an event subscription for a system topic. - * - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event - * subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String systemTopicName, String eventSubscriptionName, @@ -514,49 +451,20 @@ private Mono createOrUpdateAsync(String resourceGroupNam eventSubscriptionInfo).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update an event subscription for a system topic. - * - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event - * subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo) - .getFinalResult(); + return createOrUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update an event subscription for a system topic. - * - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event - * subscriptions will be updated with this API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo, - context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, systemTopicName, + eventSubscriptionName, eventSubscriptionInfo, context)); } /** @@ -602,11 +510,8 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, contentType, - accept, eventSubscriptionUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, Context.NONE); } /** @@ -660,45 +565,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Update event subscription of a system topic. - * - * Update an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, - eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } - /** - * Update event subscription of a system topic. - * - * Update an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String systemTopicName, String eventSubscriptionName, @@ -730,47 +606,20 @@ private Mono updateAsync(String resourceGroupName, Strin eventSubscriptionUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Update event subscription of a system topic. - * - * Update an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters) - .getFinalResult(); + return update(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } - /** - * Update event subscription of a system topic. - * - * Update an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, - context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginUpdate(resourceGroupName, systemTopicName, + eventSubscriptionName, eventSubscriptionUpdateParameters, context)); } /** @@ -811,8 +660,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE); + return deleteWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE); } /** @@ -858,40 +706,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - Response response = deleteWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { @@ -919,40 +741,18 @@ private Mono deleteAsync(String resourceGroupName, String systemTopicName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, systemTopicName, eventSubscriptionName).getFinalResult(); + delete(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription of a system topic. - * - * Delete an existing event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - beginDelete(resourceGroupName, systemTopicName, eventSubscriptionName, context).getFinalResult(); + this.client + .getLroFinalResultOrError(beginDelete(resourceGroupName, systemTopicName, eventSubscriptionName, context)); } /** @@ -1055,12 +855,7 @@ private PagedFlux listBySystemTopicAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySystemTopicSinglePage(String resourceGroupName, String systemTopicName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listBySystemTopicSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySystemTopicSinglePage(resourceGroupName, systemTopicName, filter, top, Context.NONE); } /** @@ -1094,46 +889,15 @@ private PagedResponse listBySystemTopicSinglePage(String res.getValue().nextLink(), null); } - /** - * List event subscriptions of a system topic. - * - * List event subscriptions that belong to a specific system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listBySystemTopicSinglePage(resourceGroupName, systemTopicName, filter, top), - nextLink -> listBySystemTopicNextSinglePage(nextLink)); + return listBySystemTopic(resourceGroupName, systemTopicName, filter, top, Context.NONE); } - /** - * List event subscriptions of a system topic. - * - * List event subscriptions that belong to a specific system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName, String filter, Integer top, Context context) { @@ -1191,22 +955,7 @@ private Mono getDeliveryAttributesAsync(String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { @@ -1216,21 +965,7 @@ public Response getDeliveryAttributesWithRespo context); } - /** - * Get delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription. - * - * Get all delivery attributes for an event subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { @@ -1287,22 +1022,7 @@ private Mono getFullUrlAsync(String resourceGroup .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get full URL of an event subscription of a system topic. - * - * Get the full endpoint URL for an event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription of a system topic. - * - * Get the full endpoint URL for an event subscription of a system topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { @@ -1312,21 +1032,7 @@ public Response getFullUrlWithResponse(String res context); } - /** - * Get full URL of an event subscription of a system topic. - * - * Get the full endpoint URL for an event subscription of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription of a system topic. - * - * Get the full endpoint URL for an event subscription of a system topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { @@ -1369,11 +1075,7 @@ private Mono> listBySystemTopicNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySystemTopicNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySystemTopicNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySystemTopicNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java index 71e8a0b221ffc..cbc2fa8056c11 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java @@ -52,13 +52,8 @@ public EventSubscription get(String resourceGroupName, String systemTopicName, S public EventSubscription createOrUpdate(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - EventSubscriptionInner inner = this.serviceClient() - .createOrUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.createOrUpdate(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } public EventSubscription createOrUpdate(String resourceGroupName, String systemTopicName, @@ -74,13 +69,8 @@ public EventSubscription createOrUpdate(String resourceGroupName, String systemT public EventSubscription update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - EventSubscriptionInner inner = this.serviceClient() - .update(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.update(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } public EventSubscription update(String resourceGroupName, String systemTopicName, String eventSubscriptionName, @@ -96,7 +86,7 @@ public EventSubscription update(String resourceGroupName, String systemTopicName } public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, systemTopicName, eventSubscriptionName); + this.delete(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE); } public void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java index a0f10d3f4337c..cc4a650a2647e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java @@ -111,10 +111,7 @@ public SystemTopicImpl withExistingResourceGroup(String resourceGroupName) { } public SystemTopic create() { - this.innerObject = serviceManager.serviceClient() - .getSystemTopics() - .createOrUpdate(resourceGroupName, systemTopicName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public SystemTopic create(Context context) { @@ -136,10 +133,7 @@ public SystemTopicImpl update() { } public SystemTopic apply() { - this.innerObject = serviceManager.serviceClient() - .getSystemTopics() - .update(resourceGroupName, systemTopicName, updateSystemTopicUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public SystemTopic apply(Context context) { @@ -161,11 +155,7 @@ public SystemTopic apply(Context context) { } public SystemTopic refresh() { - this.innerObject = serviceManager.serviceClient() - .getSystemTopics() - .getByResourceGroupWithResponse(resourceGroupName, systemTopicName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public SystemTopic refresh(Context context) { 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 b399a738f3477..a9b943e901390 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 @@ -264,21 +264,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a system topic. - * - * Get properties of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system topic. - * - * Get properties of a system topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String systemTopicName, Context context) { @@ -287,20 +273,7 @@ public Response getByResourceGroupWithResponse(String resource this.client.getSubscriptionId(), resourceGroupName, systemTopicName, accept, context); } - /** - * Get a system topic. - * - * Get properties of a system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system topic. - * - * Get properties of a system topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SystemTopicInner getByResourceGroup(String resourceGroupName, String systemTopicName) { return getByResourceGroupWithResponse(resourceGroupName, systemTopicName, Context.NONE).getValue(); @@ -347,11 +320,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, contentType, accept, systemTopicInfo, - Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, systemTopicName, systemTopicInfo, Context.NONE); } /** @@ -400,41 +369,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName SystemTopicInner.class, SystemTopicInner.class, this.client.getContext()); } - /** - * Create a system topic. - * - * Asynchronously creates a new system topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param systemTopicInfo System Topic information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid System Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SystemTopicInner> beginCreateOrUpdate(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, systemTopicName, systemTopicInfo); - return this.client.getLroResult(response, SystemTopicInner.class, - SystemTopicInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, systemTopicName, systemTopicInfo, Context.NONE); } - /** - * Create a system topic. - * - * Asynchronously creates a new system topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param systemTopicInfo System Topic information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid System Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SystemTopicInner> beginCreateOrUpdate(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo, Context context) { @@ -464,43 +406,19 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a system topic. - * - * Asynchronously creates a new system topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param systemTopicInfo System Topic information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SystemTopicInner createOrUpdate(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo) { - return beginCreateOrUpdate(resourceGroupName, systemTopicName, systemTopicInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, systemTopicName, systemTopicInfo, Context.NONE); } - /** - * Create a system topic. - * - * Asynchronously creates a new system topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param systemTopicInfo System Topic information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SystemTopicInner createOrUpdate(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, systemTopicName, systemTopicInfo, context).getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, systemTopicName, systemTopicInfo, context)); } /** @@ -544,11 +462,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, contentType, accept, - systemTopicUpdateParameters, Context.NONE); + return updateWithResponse(resourceGroupName, systemTopicName, systemTopicUpdateParameters, Context.NONE); } /** @@ -597,42 +511,14 @@ private PollerFlux, SystemTopicInner> beginUpdateAs SystemTopicInner.class, SystemTopicInner.class, this.client.getContext()); } - /** - * Update a system topic. - * - * Asynchronously updates a system topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid System Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, systemTopicName, systemTopicUpdateParameters); - return this.client.getLroResult(response, SystemTopicInner.class, - SystemTopicInner.class, Context.NONE); + return beginUpdate(resourceGroupName, systemTopicName, systemTopicUpdateParameters, Context.NONE); } - /** - * Update a system topic. - * - * Asynchronously updates a system topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid System Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SystemTopicInner> beginUpdate(String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { @@ -662,43 +548,19 @@ private Mono updateAsync(String resourceGroupName, String syst .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a system topic. - * - * Asynchronously updates a system topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SystemTopicInner update(String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters) { - return beginUpdate(resourceGroupName, systemTopicName, systemTopicUpdateParameters).getFinalResult(); + return update(resourceGroupName, systemTopicName, systemTopicUpdateParameters, Context.NONE); } - /** - * Update a system topic. - * - * Asynchronously updates a system topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param systemTopicUpdateParameters SystemTopic update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid System Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public SystemTopicInner update(String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, systemTopicName, systemTopicUpdateParameters, context).getFinalResult(); + return this.client.getLroFinalResultOrError( + beginUpdate(resourceGroupName, systemTopicName, systemTopicUpdateParameters, context)); } /** @@ -735,8 +597,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String systemTopicName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, systemTopicName, Context.NONE); + return deleteWithResponse(resourceGroupName, systemTopicName, Context.NONE); } /** @@ -777,37 +638,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a system topic. - * - * Delete existing system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName) { - Response response = deleteWithResponse(resourceGroupName, systemTopicName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, systemTopicName, Context.NONE); } - /** - * Delete a system topic. - * - * Delete existing system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, Context context) { @@ -833,37 +670,16 @@ private Mono deleteAsync(String resourceGroupName, String systemTopicName) .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a system topic. - * - * Delete existing system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String systemTopicName) { - beginDelete(resourceGroupName, systemTopicName).getFinalResult(); + delete(resourceGroupName, systemTopicName, Context.NONE); } - /** - * Delete a system topic. - * - * Delete existing system topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param systemTopicName Name of the system topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String systemTopicName, Context context) { - beginDelete(resourceGroupName, systemTopicName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, systemTopicName, context)); } /** @@ -961,12 +777,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -999,44 +810,15 @@ private PagedResponse listByResourceGroupSinglePage(String res res.getValue().nextLink(), null); } - /** - * List system topics under a resource group. - * - * List all the system topics under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List System topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List system topics under a resource group. - * - * List all the system topics under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List System topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -1132,11 +914,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1166,41 +944,15 @@ private PagedResponse listSinglePage(String filter, Integer to res.getValue().nextLink(), null); } - /** - * List system topics under an Azure subscription. - * - * List all the system topics under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List System topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List system topics under an Azure subscription. - * - * List all the system topics under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List System topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1243,11 +995,7 @@ private Mono> listByResourceGroupNextSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1307,11 +1055,7 @@ private Mono> listBySubscriptionNextSinglePageAs */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java index 2f23ee7e725ab..95abd326221a8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java @@ -45,7 +45,7 @@ public SystemTopic getByResourceGroup(String resourceGroupName, String systemTop } public void deleteByResourceGroup(String resourceGroupName, String systemTopicName) { - this.serviceClient().delete(resourceGroupName, systemTopicName); + this.delete(resourceGroupName, systemTopicName, Context.NONE); } public void delete(String resourceGroupName, String systemTopicName, Context context) { @@ -75,74 +75,30 @@ public PagedIterable list(String filter, Integer top, Context conte } public SystemTopic getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String systemTopicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - "systemTopicName"); - if (systemTopicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'systemTopics'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, systemTopicName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String systemTopicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String systemTopicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - "systemTopicName"); - if (systemTopicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'systemTopics'.", id))); - } + "systemTopicName", "systemTopics", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, systemTopicName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String systemTopicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - "systemTopicName"); - if (systemTopicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'systemTopics'.", id))); - } - this.delete(resourceGroupName, systemTopicName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String systemTopicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String systemTopicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}", - "systemTopicName"); - if (systemTopicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'systemTopics'.", id))); - } + "systemTopicName", "systemTopics", LOGGER); this.delete(resourceGroupName, systemTopicName, context); } 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 4556386a8d311..2b6672c4cda08 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 @@ -281,22 +281,7 @@ private Mono getAsync(String resourceGroupName, String t .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get an event subscription of a topic. - * - * Get properties of an event subscription of a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a topic. - * - * Get properties of an event subscription of a topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { @@ -305,21 +290,7 @@ public Response getWithResponse(String resourceGroupName resourceGroupName, topicName, eventSubscriptionName, accept, context); } - /** - * Get an event subscription of a topic. - * - * Get properties of an event subscription of a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an event subscription of a topic. - * - * Get properties of an event subscription of a topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner get(String resourceGroupName, String topicName, String eventSubscriptionName) { return getWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE).getValue(); @@ -368,11 +339,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, contentType, accept, - eventSubscriptionInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } /** @@ -425,45 +393,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Create or update an event subscription to a topic. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } - /** - * Create or update an event subscription to a topic. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String resourceGroupName, String topicName, String eventSubscriptionName, @@ -496,47 +435,19 @@ private Mono createOrUpdateAsync(String resourceGroupNam .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update an event subscription to a topic. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo) - .getFinalResult(); + return createOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, Context.NONE); } - /** - * Create or update an event subscription to a topic. - * - * Asynchronously creates a new event subscription or updates an existing event subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner createOrUpdate(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, context)); } /** @@ -582,10 +493,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, contentType, accept, + return updateWithResponse(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, Context.NONE); } @@ -640,45 +548,16 @@ private PollerFlux, EventSubscriptionInner> b this.client.getContext()); } - /** - * Update an event subscription for a topic. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, topicName, eventSubscriptionName, - eventSubscriptionUpdateParameters); - return this.client.getLroResult(response, - EventSubscriptionInner.class, EventSubscriptionInner.class, Context.NONE); + return beginUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } - /** - * Update an event subscription for a topic. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginUpdate(String resourceGroupName, String topicName, String eventSubscriptionName, @@ -711,47 +590,20 @@ private Mono updateAsync(String resourceGroupName, Strin .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update an event subscription for a topic. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) - .getFinalResult(); + return update(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } - /** - * Update an event subscription for a topic. - * - * Update an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return event Subscription. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionInner update(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, - context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginUpdate(resourceGroupName, topicName, eventSubscriptionName, + eventSubscriptionUpdateParameters, context)); } /** @@ -792,8 +644,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, Context.NONE); + return deleteWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE); } /** @@ -839,40 +690,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, String eventSubscriptionName) { - Response response = deleteWithResponse(resourceGroupName, topicName, eventSubscriptionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, topicName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { @@ -900,39 +725,16 @@ private Mono deleteAsync(String resourceGroupName, String topicName, Strin .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String topicName, String eventSubscriptionName) { - beginDelete(resourceGroupName, topicName, eventSubscriptionName).getFinalResult(); + delete(resourceGroupName, topicName, eventSubscriptionName, Context.NONE); } - /** - * Delete an event subscription for a topic. - * - * Delete an existing event subscription for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { - beginDelete(resourceGroupName, topicName, eventSubscriptionName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, topicName, eventSubscriptionName, context)); } /** @@ -1035,12 +837,7 @@ private PagedFlux listAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String topicName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, topicName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(resourceGroupName, topicName, filter, top, Context.NONE); } /** @@ -1074,46 +871,15 @@ private PagedResponse listSinglePage(String resourceGrou res.getValue().nextLink(), null); } - /** - * List all event subscriptions for a specific topic. - * - * List all event subscriptions that have been created for a specific topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String topicName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, topicName, filter, top), - nextLink -> listNextSinglePage(nextLink)); + return list(resourceGroupName, topicName, filter, top, Context.NONE); } - /** - * List all event subscriptions for a specific topic. - * - * List all event subscriptions that have been created for a specific topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List EventSubscriptions operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String topicName, String filter, Integer top, Context context) { @@ -1170,22 +936,7 @@ private Mono getDeliveryAttributesAsync(String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getDeliveryAttributesWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { @@ -1194,21 +945,7 @@ public Response getDeliveryAttributesWithRespo this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, accept, context); } - /** - * Get delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return delivery attributes for an event subscription for topic. - * - * Get all delivery attributes for an event subscription for topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public DeliveryAttributeListResultInner getDeliveryAttributes(String resourceGroupName, String topicName, String eventSubscriptionName) { @@ -1264,22 +1001,7 @@ private Mono getFullUrlAsync(String resourceGroup .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get full URL of an event subscription for topic. - * - * Get the full endpoint URL for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription for topic. - * - * Get the full endpoint URL for an event subscription for topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getFullUrlWithResponse(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { @@ -1288,21 +1010,7 @@ public Response getFullUrlWithResponse(String res this.client.getSubscriptionId(), resourceGroupName, topicName, eventSubscriptionName, accept, context); } - /** - * Get full URL of an event subscription for topic. - * - * Get the full endpoint URL for an event subscription for topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be found. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return full URL of an event subscription for topic. - * - * Get the full endpoint URL for an event subscription for topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName) { @@ -1343,11 +1051,7 @@ private Mono> listNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java index a6e7a83b9affe..e9f89b81a939a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java @@ -51,13 +51,8 @@ public EventSubscription get(String resourceGroupName, String topicName, String public EventSubscription createOrUpdate(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - EventSubscriptionInner inner = this.serviceClient() - .createOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.createOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, + Context.NONE); } public EventSubscription createOrUpdate(String resourceGroupName, String topicName, String eventSubscriptionName, @@ -73,13 +68,8 @@ public EventSubscription createOrUpdate(String resourceGroupName, String topicNa public EventSubscription update(String resourceGroupName, String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - EventSubscriptionInner inner = this.serviceClient() - .update(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + return this.update(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, + Context.NONE); } public EventSubscription update(String resourceGroupName, String topicName, String eventSubscriptionName, @@ -94,7 +84,7 @@ public EventSubscription update(String resourceGroupName, String topicName, Stri } public void delete(String resourceGroupName, String topicName, String eventSubscriptionName) { - this.serviceClient().delete(resourceGroupName, topicName, eventSubscriptionName); + this.delete(resourceGroupName, topicName, eventSubscriptionName, Context.NONE); } public void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java index 78dbb82046271..b4955e8250877 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java @@ -184,10 +184,7 @@ public TopicImpl withExistingResourceGroup(String resourceGroupName) { } public Topic create() { - this.innerObject = serviceManager.serviceClient() - .getTopics() - .createOrUpdate(resourceGroupName, topicName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public Topic create(Context context) { @@ -209,10 +206,7 @@ public TopicImpl update() { } public Topic apply() { - this.innerObject = serviceManager.serviceClient() - .getTopics() - .update(resourceGroupName, topicName, updateTopicUpdateParameters, Context.NONE); - return this; + return this.apply(Context.NONE); } public Topic apply(Context context) { @@ -234,11 +228,7 @@ public Topic apply(Context context) { } public Topic refresh() { - this.innerObject = serviceManager.serviceClient() - .getTopics() - .getByResourceGroupWithResponse(resourceGroupName, topicName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public Topic refresh(Context context) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java index b959890f425e4..7a703fb264b4e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java @@ -75,10 +75,7 @@ public TopicSpaceImpl withExistingNamespace(String resourceGroupName, String nam } public TopicSpace create() { - this.innerObject = serviceManager.serviceClient() - .getTopicSpaces() - .createOrUpdate(resourceGroupName, namespaceName, topicSpaceName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public TopicSpace create(Context context) { @@ -99,10 +96,7 @@ public TopicSpaceImpl update() { } public TopicSpace apply() { - this.innerObject = serviceManager.serviceClient() - .getTopicSpaces() - .createOrUpdate(resourceGroupName, namespaceName, topicSpaceName, this.innerModel(), Context.NONE); - return this; + return this.apply(Context.NONE); } public TopicSpace apply(Context context) { @@ -127,11 +121,7 @@ public TopicSpace apply(Context context) { } public TopicSpace refresh() { - this.innerObject = serviceManager.serviceClient() - .getTopicSpaces() - .getWithResponse(resourceGroupName, namespaceName, topicSpaceName, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public TopicSpace refresh(Context context) { 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 6e9431b526ab2..e7d88fb98ee77 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 @@ -210,22 +210,7 @@ private Mono getAsync(String resourceGroupName, String namespac .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a topic space. - * - * Get properties of a topic space. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a topic space. - * - * Get properties of a topic space along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { @@ -234,21 +219,7 @@ public Response getWithResponse(String resourceGroupName, Strin resourceGroupName, namespaceName, topicSpaceName, accept, context); } - /** - * Get a topic space. - * - * Get properties of a topic space. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a topic space. - * - * Get properties of a topic space. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSpaceInner get(String resourceGroupName, String namespaceName, String topicSpaceName) { return getWithResponse(resourceGroupName, namespaceName, topicSpaceName, Context.NONE).getValue(); @@ -297,11 +268,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, contentType, accept, - topicSpaceInfo, Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, + Context.NONE); } /** @@ -352,44 +320,14 @@ private PollerFlux, TopicSpaceInner> beginCreateOrUp TopicSpaceInner.class, TopicSpaceInner.class, this.client.getContext()); } - /** - * Create or update a topic space. - * - * Create or update a topic space with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @param topicSpaceInfo Topic space information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Topic space resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicSpaceInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { - Response response - = createOrUpdateWithResponse(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo); - return this.client.getLroResult(response, TopicSpaceInner.class, - TopicSpaceInner.class, Context.NONE); + return beginCreateOrUpdate(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, Context.NONE); } - /** - * Create or update a topic space. - * - * Create or update a topic space with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @param topicSpaceInfo Topic space information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Topic space resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicSpaceInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo, Context context) { @@ -420,46 +358,19 @@ private Mono createOrUpdateAsync(String resourceGroupName, Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a topic space. - * - * Create or update a topic space with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @param topicSpaceInfo Topic space information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Topic space resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSpaceInner createOrUpdate(String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, Context.NONE); } - /** - * Create or update a topic space. - * - * Create or update a topic space with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @param topicSpaceInfo Topic space information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Topic space resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSpaceInner createOrUpdate(String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, context) - .getFinalResult(); + return this.client.getLroFinalResultOrError( + beginCreateOrUpdate(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, context)); } /** @@ -500,8 +411,7 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String namespaceName, String topicSpaceName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, topicSpaceName, Context.NONE); + return deleteWithResponse(resourceGroupName, namespaceName, topicSpaceName, Context.NONE); } /** @@ -547,40 +457,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a topic space. - * - * Delete an existing topic space. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicSpaceName) { - Response response = deleteWithResponse(resourceGroupName, namespaceName, topicSpaceName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, namespaceName, topicSpaceName, Context.NONE); } - /** - * Delete a topic space. - * - * Delete an existing topic space. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { @@ -607,39 +491,16 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a topic space. - * - * Delete an existing topic space. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String topicSpaceName) { - beginDelete(resourceGroupName, namespaceName, topicSpaceName).getFinalResult(); + delete(resourceGroupName, namespaceName, topicSpaceName, Context.NONE); } - /** - * Delete a topic space. - * - * Delete an existing topic space. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param topicSpaceName Name of the Topic space. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { - beginDelete(resourceGroupName, namespaceName, topicSpaceName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, namespaceName, topicSpaceName, context)); } /** @@ -742,12 +603,7 @@ private PagedFlux listByNamespaceAsync(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceSinglePage(String resourceGroupName, String namespaceName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByNamespaceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top, Context.NONE); } /** @@ -781,46 +637,15 @@ private PagedResponse listByNamespaceSinglePage(String resource res.getValue().nextLink(), null); } - /** - * List all topic spaces under a namespace. - * - * Get all the topic spaces under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Space operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByNamespaceSinglePage(resourceGroupName, namespaceName, filter, top), - nextLink -> listByNamespaceNextSinglePage(nextLink)); + return listByNamespace(resourceGroupName, namespaceName, filter, top, Context.NONE); } - /** - * List all topic spaces under a namespace. - * - * Get all the topic spaces under a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName Name of the namespace. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Space operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { @@ -864,11 +689,7 @@ private Mono> listByNamespaceNextSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByNamespaceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByNamespaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByNamespaceNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java index 629275d2e768e..fd5c5f7c89544 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java @@ -45,7 +45,7 @@ public TopicSpace get(String resourceGroupName, String namespaceName, String top } public void delete(String resourceGroupName, String namespaceName, String topicSpaceName) { - this.serviceClient().delete(resourceGroupName, namespaceName, topicSpaceName); + this.delete(resourceGroupName, namespaceName, topicSpaceName, Context.NONE); } public void delete(String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { @@ -65,102 +65,36 @@ public PagedIterable listByNamespace(String resourceGroupName, Strin } public TopicSpace getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicSpaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "topicSpaceName"); - if (topicSpaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topicSpaces'.", id))); - } - return this.getWithResponse(resourceGroupName, namespaceName, topicSpaceName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicSpaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String topicSpaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "topicSpaceName"); - if (topicSpaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topicSpaces'.", id))); - } + "topicSpaceName", "topicSpaces", LOGGER); return this.getWithResponse(resourceGroupName, namespaceName, topicSpaceName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicSpaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "topicSpaceName"); - if (topicSpaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topicSpaces'.", id))); - } - this.delete(resourceGroupName, namespaceName, topicSpaceName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String namespaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String namespaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "namespaceName"); - if (namespaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); - } - String topicSpaceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "namespaceName", "namespaces", LOGGER); + String topicSpaceName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}", - "topicSpaceName"); - if (topicSpaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topicSpaces'.", id))); - } + "topicSpaceName", "topicSpaces", LOGGER); this.delete(resourceGroupName, namespaceName, topicSpaceName, context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java index f5dc763f3a152..cacbb7f764713 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java @@ -181,39 +181,14 @@ private Mono getAsync(String topicTypeName) { return getWithResponseAsync(topicTypeName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a topic type. - * - * Get information about a topic type. - * - * @param topicTypeName Name of the topic type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a topic type. - * - * Get information about a topic type along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String topicTypeName, Context context) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), topicTypeName, accept, context); } - /** - * Get a topic type. - * - * Get information about a topic type. - * - * @param topicTypeName Name of the topic type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a topic type. - * - * Get information about a topic type. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicTypeInfoInner get(String topicTypeName) { return getWithResponse(topicTypeName, Context.NONE).getValue(); @@ -265,11 +240,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(Context.NONE); } /** @@ -292,31 +263,13 @@ private PagedResponse listSinglePage(Context context) { res.getValue().nextLink(), null); } - /** - * List topic types. - * - * List all registered topic types. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + return list(Context.NONE); } - /** - * List topic types. - * - * List all registered topic types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); @@ -375,11 +328,7 @@ private PagedFlux listEventTypesAsync(String topicTypeName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listEventTypesSinglePage(String topicTypeName) { - final String accept = "application/json"; - Response res = service.listEventTypesSync(this.client.getEndpoint(), - this.client.getApiVersion(), topicTypeName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listEventTypesSinglePage(topicTypeName, Context.NONE); } /** @@ -403,35 +352,13 @@ private PagedResponse listEventTypesSinglePage(String topicTypeN res.getValue().nextLink(), null); } - /** - * List event types. - * - * List event types for a topic type. - * - * @param topicTypeName Name of the topic type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listEventTypes(String topicTypeName) { - return new PagedIterable<>(() -> listEventTypesSinglePage(topicTypeName), - nextLink -> listEventTypesNextSinglePage(nextLink)); + return listEventTypes(topicTypeName, Context.NONE); } - /** - * List event types. - * - * List event types for a topic type. - * - * @param topicTypeName Name of the topic type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listEventTypes(String topicTypeName, Context context) { return new PagedIterable<>(() -> listEventTypesSinglePage(topicTypeName, context), @@ -472,11 +399,7 @@ private Mono> listNextSinglePageAsync(String n */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /** @@ -534,11 +457,7 @@ private Mono> listEventTypesNextSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listEventTypesNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listEventTypesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listEventTypesNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java index 96c5bccf9f99a..db010f7e9b73b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java @@ -45,8 +45,7 @@ public TopicTypeInfo get(String topicTypeName) { } public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TopicTypeInfoImpl(inner1, this.manager())); + return this.list(Context.NONE); } public PagedIterable list(Context context) { @@ -55,8 +54,7 @@ public PagedIterable list(Context context) { } public PagedIterable listEventTypes(String topicTypeName) { - PagedIterable inner = this.serviceClient().listEventTypes(topicTypeName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventTypeImpl(inner1, this.manager())); + return this.listEventTypes(topicTypeName, Context.NONE); } public PagedIterable listEventTypes(String topicTypeName, Context context) { 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 0c7893c4f2f73..749abda877ced 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 @@ -335,21 +335,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Strin .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a topic. - * - * Get properties of a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a topic. - * - * Get properties of a topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context) { @@ -358,20 +344,7 @@ public Response getByResourceGroupWithResponse(String resourceGroupN this.client.getSubscriptionId(), resourceGroupName, topicName, accept, context); } - /** - * Get a topic. - * - * Get properties of a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a topic. - * - * Get properties of a topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicInner getByResourceGroup(String resourceGroupName, String topicName) { return getByResourceGroupWithResponse(resourceGroupName, topicName, Context.NONE).getValue(); @@ -417,11 +390,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String topicName, TopicInner topicInfo) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, topicInfo, - Context.NONE); + return createOrUpdateWithResponse(resourceGroupName, topicName, topicInfo, Context.NONE); } /** @@ -469,41 +438,14 @@ private PollerFlux, TopicInner> beginCreateOrUpdateAsync( TopicInner.class, this.client.getContext()); } - /** - * Create a topic. - * - * Asynchronously creates a new topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param topicInfo Topic information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicInner> beginCreateOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo) { - Response response = createOrUpdateWithResponse(resourceGroupName, topicName, topicInfo); - return this.client.getLroResult(response, TopicInner.class, TopicInner.class, - Context.NONE); + return beginCreateOrUpdate(resourceGroupName, topicName, topicInfo, Context.NONE); } - /** - * Create a topic. - * - * Asynchronously creates a new topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param topicInfo Topic information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of eventGrid Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicInner> beginCreateOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo, Context context) { @@ -530,42 +472,18 @@ private Mono createOrUpdateAsync(String resourceGroupName, String to .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a topic. - * - * Asynchronously creates a new topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param topicInfo Topic information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicInner createOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo) { - return beginCreateOrUpdate(resourceGroupName, topicName, topicInfo).getFinalResult(); + return createOrUpdate(resourceGroupName, topicName, topicInfo, Context.NONE); } - /** - * Create a topic. - * - * Asynchronously creates a new topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param topicInfo Topic information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return eventGrid Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicInner createOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo, Context context) { - return beginCreateOrUpdate(resourceGroupName, topicName, topicInfo, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginCreateOrUpdate(resourceGroupName, topicName, topicInfo, context)); } /** @@ -609,11 +527,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, topicUpdateParameters, - Context.NONE); + return updateWithResponse(resourceGroupName, topicName, topicUpdateParameters, Context.NONE); } /** @@ -662,41 +576,14 @@ private PollerFlux, TopicInner> beginUpdateAsync(String r TopicInner.class, this.client.getContext()); } - /** - * Update a topic. - * - * Asynchronously updates a topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, topicName, topicUpdateParameters); - return this.client.getLroResult(response, TopicInner.class, TopicInner.class, - Context.NONE); + return beginUpdate(resourceGroupName, topicName, topicUpdateParameters, Context.NONE); } - /** - * Update a topic. - * - * Asynchronously updates a topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicInner> beginUpdate(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, Context context) { @@ -725,42 +612,18 @@ private Mono updateAsync(String resourceGroupName, String topicName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a topic. - * - * Asynchronously updates a topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters) { - return beginUpdate(resourceGroupName, topicName, topicUpdateParameters).getFinalResult(); + return update(resourceGroupName, topicName, topicUpdateParameters, Context.NONE); } - /** - * Update a topic. - * - * Asynchronously updates a topic with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param topicUpdateParameters Topic update information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, topicName, topicUpdateParameters, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginUpdate(resourceGroupName, topicName, topicUpdateParameters, context)); } /** @@ -797,8 +660,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String topicName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, topicName, Context.NONE); + return deleteWithResponse(resourceGroupName, topicName, Context.NONE); } /** @@ -839,37 +701,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Delete a topic. - * - * Delete existing topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName) { - Response response = deleteWithResponse(resourceGroupName, topicName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, topicName, Context.NONE); } - /** - * Delete a topic. - * - * Delete existing topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, Context context) { Response response = deleteWithResponse(resourceGroupName, topicName, context); @@ -893,37 +731,16 @@ private Mono deleteAsync(String resourceGroupName, String topicName) { return beginDeleteAsync(resourceGroupName, topicName).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a topic. - * - * Delete existing topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String topicName) { - beginDelete(resourceGroupName, topicName).getFinalResult(); + delete(resourceGroupName, topicName, Context.NONE); } - /** - * Delete a topic. - * - * Delete existing topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String topicName, Context context) { - beginDelete(resourceGroupName, topicName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, topicName, context)); } /** @@ -1021,12 +838,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Integer top) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, filter, top, Context.NONE); } /** @@ -1059,44 +871,15 @@ private PagedResponse listByResourceGroupSinglePage(String resourceG res.getValue().nextLink(), null); } - /** - * List topics under a resource group. - * - * List all the topics under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, top), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, filter, top, Context.NONE); } - /** - * List topics under a resource group. - * - * List all the topics under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context) { @@ -1192,11 +975,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -1226,41 +1005,15 @@ private PagedResponse listSinglePage(String filter, Integer top, Con res.getValue().nextLink(), null); } - /** - * List topics under an Azure subscription. - * - * List all the topics under an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List topics under an Azure subscription. - * - * List all the topics under an Azure subscription. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topics operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -1307,19 +1060,7 @@ private Mono listSharedAccessKeysAsync(String resour .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * List keys for a topic. - * - * List the two keys used to publish to a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Topic along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response listSharedAccessKeysWithResponse(String resourceGroupName, String topicName, Context context) { @@ -1328,18 +1069,7 @@ public Response listSharedAccessKeysWithResponse(Str this.client.getSubscriptionId(), resourceGroupName, topicName, accept, context); } - /** - * List keys for a topic. - * - * List the two keys used to publish to a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String topicName) { return listSharedAccessKeysWithResponse(resourceGroupName, topicName, Context.NONE).getValue(); @@ -1386,11 +1116,7 @@ private Mono>> regenerateKeyWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response regenerateKeyWithResponse(String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, topicName, contentType, accept, regenerateKeyRequest, - Context.NONE); + return regenerateKeyWithResponse(resourceGroupName, topicName, regenerateKeyRequest, Context.NONE); } /** @@ -1440,41 +1166,14 @@ private PollerFlux, TopicSharedAccessKeys this.client.getContext()); } - /** - * Regenerate key for a topic. - * - * Regenerate a shared access key for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param regenerateKeyRequest Request body to regenerate key. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey(String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - Response response = regenerateKeyWithResponse(resourceGroupName, topicName, regenerateKeyRequest); - return this.client.getLroResult(response, - TopicSharedAccessKeysInner.class, TopicSharedAccessKeysInner.class, Context.NONE); + return beginRegenerateKey(resourceGroupName, topicName, regenerateKeyRequest, Context.NONE); } - /** - * Regenerate key for a topic. - * - * Regenerate a shared access key for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context) { @@ -1504,43 +1203,19 @@ private Mono regenerateKeyAsync(String resourceGroup .flatMap(this.client::getLroFinalResultOrError); } - /** - * Regenerate key for a topic. - * - * Regenerate a shared access key for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param regenerateKeyRequest Request body to regenerate key. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - return beginRegenerateKey(resourceGroupName, topicName, regenerateKeyRequest).getFinalResult(); + return regenerateKey(resourceGroupName, topicName, regenerateKeyRequest, Context.NONE); } - /** - * Regenerate key for a topic. - * - * Regenerate a shared access key for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param topicName Name of the topic. - * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shared access keys of the Topic. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context) { - return beginRegenerateKey(resourceGroupName, topicName, regenerateKeyRequest, context).getFinalResult(); + return this.client + .getLroFinalResultOrError(beginRegenerateKey(resourceGroupName, topicName, regenerateKeyRequest, context)); } /** @@ -1610,12 +1285,8 @@ private PagedFlux listEventTypesAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listEventTypesSinglePage(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { - final String accept = "application/json"; - Response res = service.listEventTypesSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, providerNamespace, - resourceTypeName, resourceName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listEventTypesSinglePage(resourceGroupName, providerNamespace, resourceTypeName, resourceName, + Context.NONE); } /** @@ -1644,43 +1315,14 @@ private PagedResponse listEventTypesSinglePage(String resourceGr res.getValue().nextLink(), null); } - /** - * List topic event types. - * - * List event types for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param providerNamespace the provider namespace. - * @param resourceTypeName Name of the topic type. - * @param resourceName Name of the topic. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listEventTypes(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { - return new PagedIterable<>( - () -> listEventTypesSinglePage(resourceGroupName, providerNamespace, resourceTypeName, resourceName), - nextLink -> listEventTypesNextSinglePage(nextLink)); + return listEventTypes(resourceGroupName, providerNamespace, resourceTypeName, resourceName, Context.NONE); } - /** - * List topic event types. - * - * List event types for a topic. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param providerNamespace the provider namespace. - * @param resourceTypeName Name of the topic type. - * @param resourceName Name of the topic. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Event Types operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listEventTypes(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName, Context context) { @@ -1724,11 +1366,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(S */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1788,11 +1426,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listBySubscriptionNextSinglePage(nextLink, Context.NONE); } /** @@ -1851,11 +1485,7 @@ private Mono> listEventTypesNextSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listEventTypesNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listEventTypesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listEventTypesNextSinglePage(nextLink, Context.NONE); } /** 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 31d9dcfd21bf0..191fc3d6c5319 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 @@ -48,7 +48,7 @@ public Topic getByResourceGroup(String resourceGroupName, String topicName) { } public void deleteByResourceGroup(String resourceGroupName, String topicName) { - this.serviceClient().delete(resourceGroupName, topicName); + this.delete(resourceGroupName, topicName, Context.NONE); } public void delete(String resourceGroupName, String topicName, Context context) { @@ -96,13 +96,7 @@ public TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, Stri public TopicSharedAccessKeys regenerateKey(String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - TopicSharedAccessKeysInner inner - = this.serviceClient().regenerateKey(resourceGroupName, topicName, regenerateKeyRequest); - if (inner != null) { - return new TopicSharedAccessKeysImpl(inner, this.manager()); - } else { - return null; - } + return this.regenerateKey(resourceGroupName, topicName, regenerateKeyRequest, Context.NONE); } public TopicSharedAccessKeys regenerateKey(String resourceGroupName, String topicName, @@ -118,9 +112,7 @@ public TopicSharedAccessKeys regenerateKey(String resourceGroupName, String topi public PagedIterable listEventTypes(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { - PagedIterable inner - = this.serviceClient().listEventTypes(resourceGroupName, providerNamespace, resourceTypeName, resourceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventTypeImpl(inner1, this.manager())); + return this.listEventTypes(resourceGroupName, providerNamespace, resourceTypeName, resourceName, Context.NONE); } public PagedIterable listEventTypes(String resourceGroupName, String providerNamespace, @@ -131,74 +123,30 @@ public PagedIterable listEventTypes(String resourceGroupName, String } public Topic getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, topicName, Context.NONE).getValue(); + return this.getByIdWithResponse(id, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String topicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } + "topicName", "topics", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, topicName, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - this.delete(resourceGroupName, topicName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String topicName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String topicName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", - "topicName"); - if (topicName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } + "topicName", "topics", LOGGER); this.delete(resourceGroupName, topicName, context); } 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 978d568cb981d..6e3cb460f09c9 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 @@ -151,20 +151,7 @@ private Mono getAsync(String verifiedPartnerName) { return getWithResponseAsync(verifiedPartnerName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Get a verified partner. - * - * Get properties of a verified partner. - * - * @param verifiedPartnerName Name of the verified partner. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a verified partner. - * - * Get properties of a verified partner along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String verifiedPartnerName, Context context) { final String accept = "application/json"; @@ -172,19 +159,7 @@ public Response getWithResponse(String verifiedPartnerName context); } - /** - * Get a verified partner. - * - * Get properties of a verified partner. - * - * @param verifiedPartnerName Name of the verified partner. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a verified partner. - * - * Get properties of a verified partner. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public VerifiedPartnerInner get(String verifiedPartnerName) { return getWithResponse(verifiedPartnerName, Context.NONE).getValue(); @@ -276,11 +251,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), filter, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(filter, top, Context.NONE); } /** @@ -310,40 +281,15 @@ private PagedResponse listSinglePage(String filter, Intege res.getValue().nextLink(), null); } - /** - * List all verified partners. - * - * Get a list of all verified partners. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String filter = null; final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(filter, top), nextLink -> listNextSinglePage(nextLink)); + return list(filter, top, Context.NONE); } - /** - * List all verified partners. - * - * Get a list of all verified partners. - * - * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the - * 'name' property only and with limited number of OData operations. These operations are: the 'contains' function - * as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic - * operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne - * 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. - * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to - * 100. If not specified, the default number of results to be returned is 20 items per page. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the List Topic Types operation as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, Context context) { return new PagedIterable<>(() -> listSinglePage(filter, top, context), @@ -384,11 +330,7 @@ private Mono> listNextSinglePageAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /**