From 8ab231c87e792d546670b8d88ec561e2ce5f5331 Mon Sep 17 00:00:00 2001
From: "Christian Whitehead (MSFT)" <35080559+chrwhit@users.noreply.github.com>
Date: Tue, 8 Jun 2021 12:11:20 -0700
Subject: [PATCH] Chrwhit/merge master three (#22146)
* Exposes management node in azure-core-amqp (#22095)
* Update AmqpConnection to have a getManagementNode.
* Adding AmqpManagementNode.
* Update AmqpConnection, AmqpManagementNode, AmqpSession to use AsyncCloseable.
* Adding AsyncCloseable to AmqpLink.
* ClaimsBasedSecurityNode.java uses AsyncCloseable.
* Implements CbsNode's closeAsync() and adds tests.
* ReactorSession implements closeAsync()
* ReactorConnection uses closeAsync(). Renames dispose() to closeAsync(). Fixes errors where some close operations were not subscribed to.
* RequestResponseChannel. Remove close operation with message.
* Adding DeliveryOutcome models and DeliveryState enum.
* Add authorization scope to connection options.
* Add MessageUtils to serialize and deserialize AmqpAnnotatedMessage
* Update AmqpManagementNode to expose delivery outcomes because they can be associated with messages.
* Adding MessageUtil support for converting DeliveryOutcome and Outcomes.
* Fixing build breaks from ConnectionOptions.
* Adding management channel class.
* Adding management channel into ReactorConnection.
* Update ExceptionUtil to return instead of throwing on unknown amqp error codes.
* Moving ManagementChannel formatting.
* Add javadocs to ReceivedDeliveryOutcome.
* Add tests for ManagementChannel
* Adding tests for message utils.
* Fix javadoc on ModifiedDeliveryOutcome
* ReactorConnection: Hook up dispose method.
* EventHubs: Fixing instances of ConnectionOptions.
* ServiceBus: Fix build errors using ConnectionOptions.
* Adding MessageUtilsTests.
* Updating CHANGELOG.
* Annotate HttpRange with Immutable (#22119)
* Cosmos Spark: Changing inferSchema.forceNullableProperties default to true (#22049)
* Changing default
* Docs
* Tests
* new test
* doc update
* Change log
* Make getScopes in the ARM Authentication Policy Public (#22120)
Make getScopes in the ARM Authentication Policy Public
* [Communication]: Update version, changelog, and dependency for June release (#22061)
* Update version, changelog, and dependency for June release
* Update Chat, SMS, and PhoneNumbers for release
* Correction for chat version number
* Typo in chat pom
* Unrelease Chat; update change logs for other sdks
* Nit fix
Co-authored-by: JP Chen
* Increment version for videoanalyzer releases (#21814)
* Increment package version after release of com.azure azure-media-videoanalyzer-edge
* Update version_client.txt
Co-authored-by: giakas
* Add module-info to jca and jca test module and change package name of jca test module (#22041)
* Fix error in aad-starter-sample (#22109)
* EventGrid Add 4.4.0 new system events. (#22126)
* Updates to monitor query based on API review feedback (#22114)
* API consistency review feedback
* Remove commented code
* fix tests
* Refactor building prefer header
* Fix Management Bug (#22122)
* Adding missing return statement.
* Using common logic for status codes.
* Adding isSuccessful.
* mgmt, upgrade aks (#22136)
* Add domain_hint in aad-stater. (#22134)
* fix(*): update communication comon package version in callingServer
Co-authored-by: Connie Yau
Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>
Co-authored-by: Matias Quaranta
Co-authored-by: Jianping Chen
Co-authored-by: JP Chen
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: giakas
Co-authored-by: michaelqi793 <78671298+michaelqi793@users.noreply.github.com>
Co-authored-by: Rujun Chen
Co-authored-by: Yijun Xie <48257664+YijunXieMS@users.noreply.github.com>
Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com>
Co-authored-by: Weidong Xu
Co-authored-by: gaohan <1135494872@qq.com>
---
eng/jacoco-test-coverage/pom.xml | 8 +-
eng/versioning/version_client.txt | 10 +-
.../azure-communication-callingserver/pom.xml | 2 +-
.../azure-communication-chat/pom.xml | 4 +-
.../azure-communication-common/CHANGELOG.md | 3 +-
.../azure-communication-common/pom.xml | 2 +-
.../azure-communication-identity/CHANGELOG.md | 3 +-
.../azure-communication-identity/pom.xml | 4 +-
.../CHANGELOG.md | 3 +-
.../azure-communication-phonenumbers/pom.xml | 4 +-
.../azure-communication-sms/CHANGELOG.md | 3 +-
.../azure-communication-sms/pom.xml | 4 +-
.../implementation/ManagementChannel.java | 7 +-
.../implementation/RequestResponseUtils.java | 4 +
.../messaging/eventgrid/SystemEventNames.java | 108 ++++
.../SystemEventMappingNames.java | 107 +++-
.../AcsRecordingChunkInfoProperties.java | 52 ++
...armingApplicationDataChangedEventData.java | 307 +++++++++++
...riFoodFarmingBoundaryChangedEventData.java | 359 ++++++++++++
.../AgriFoodFarmingCropChangedEventData.java | 255 +++++++++
...oodFarmingCropVarietyChangedEventData.java | 281 ++++++++++
.../AgriFoodFarmingFarmChangedEventData.java | 281 ++++++++++
...ataIngestionJobStatusChangedEventData.java | 289 ++++++++++
...AgriFoodFarmingFarmerChangedEventData.java | 255 +++++++++
.../AgriFoodFarmingFieldChangedEventData.java | 307 +++++++++++
...oodFarmingHarvestDataChangedEventData.java | 307 +++++++++++
.../AgriFoodFarmingJobStatus.java | 43 ++
...odFarmingPlantingDataChangedEventData.java | 307 +++++++++++
.../AgriFoodFarmingResourceActionType.java | 37 ++
...ataIngestionJobStatusChangedEventData.java | 288 ++++++++++
...AgriFoodFarmingSeasonChangedEventData.java | 255 +++++++++
...dFarmingSeasonalFieldChangedEventData.java | 359 ++++++++++++
...oodFarmingTillageDataChangedEventData.java | 307 +++++++++++
...ataIngestionJobStatusChangedEventData.java | 287 ++++++++++
...BlobInventoryPolicyCompletedEventData.java | 196 +++++++
.../swagger/README.md | 49 +-
.../implementation/ManagementChannel.java | 14 +-
.../security/keyvault/jca/AuthClient.java | 7 +-
.../security/keyvault/jca/KeyVaultClient.java | 10 +-
.../security/keyvault/jca/RestClient.java | 3 +-
.../src/main/java/module-info.java | 15 +
.../src/main/module-info.java | 7 +
.../keyvault/jca/test/TestModularization.java | 16 +
.../src/main/java/module-info.java | 9 +
.../jca/{ => test}/AuthClientTest.java | 3 +-
.../jca/{ => test}/JreKeyStoreTest.java | 4 +-
.../{ => test}/KeyVaultCertificatesTest.java | 7 +-
.../jca/{ => test}/KeyVaultClientTest.java | 3 +-
.../{ => test}/KeyVaultJcaProviderTest.java | 5 +-
.../{ => test}/KeyVaultKeyManagerTest.java | 6 +-
.../jca/{ => test}/KeyVaultKeyStoreTest.java | 7 +-
.../{ => test}/PropertyConvertorUtils.java | 4 +-
.../jca/{ => test}/ServerSocketTest.java | 6 +-
sdk/monitor/azure-monitor-query/README.md | 32 +-
...cClient.java => LogsQueryAsyncClient.java} | 238 ++++----
.../{LogsClient.java => LogsQueryClient.java} | 20 +-
...ilder.java => LogsQueryClientBuilder.java} | 64 +--
...sion.java => LogsQueryServiceVersion.java} | 6 +-
...ient.java => MetricsQueryAsyncClient.java} | 45 +-
...icsClient.java => MetricsQueryClient.java} | 24 +-
...er.java => MetricsQueryClientBuilder.java} | 48 +-
...n.java => MetricsQueryServiceVersion.java} | 6 +-
.../query/log/implementation/QueriesImpl.java | 24 +-
...eryRequest.java => BatchQueryRequest.java} | 80 ++-
...yResponse.java => BatchQueryResponse.java} | 33 +-
.../implementation/models/BatchRequest.java | 28 +-
.../implementation/models/BatchResponse.java | 8 +-
.../log/implementation/models/Column.java | 8 +-
.../implementation/models/LogQueryResult.java | 79 ---
.../models/MetadataColumnDataType.java | 9 +
.../log/implementation/models/QueryBody.java | 78 ---
.../implementation/models/QueryResults.java | 33 +-
.../metrics/implementation/models/Metric.java | 8 +-
.../implementation/MetricDefinitionsImpl.java | 14 +-
.../models/MetricDefinitionCollection.java | 8 +-
.../implementation/MetricNamespacesImpl.java | 14 +-
.../models/MetricNamespaceCollection.java | 8 +-
.../monitor/query/models/ColumnDataType.java | 48 --
...ogsQueryBatch.java => LogsBatchQuery.java} | 10 +-
...hResult.java => LogsBatchQueryResult.java} | 17 +-
...va => LogsBatchQueryResultCollection.java} | 10 +-
.../monitor/query/models/LogsColumnType.java | 57 ++
.../monitor/query/models/LogsQueryError.java | 108 +---
.../query/models/LogsQueryErrorDetail.java | 116 ++++
.../query/models/LogsQueryErrorDetails.java | 54 --
.../query/models/LogsQueryException.java | 8 +-
.../monitor/query/models/LogsQueryResult.java | 24 +-
.../query/models/LogsQueryStatistics.java | 30 +
.../monitor/query/models/LogsTableCell.java | 6 +-
.../monitor/query/models/LogsTableColumn.java | 6 +-
.../monitor/query/models/LogsTableRow.java | 17 +-
.../models/{Metrics.java => Metric.java} | 15 +-
...ilability.java => MetricAvailability.java} | 6 +-
...sDefinition.java => MetricDefinition.java} | 30 +-
...icsNamespace.java => MetricNamespace.java} | 16 +-
...paceName.java => MetricNamespaceName.java} | 4 +-
...ment.java => MetricTimeSeriesElement.java} | 10 +-
.../monitor/query/models/MetricUnit.java | 66 +++
.../{MetricsValue.java => MetricValue.java} | 8 +-
.../query/models/MetricsQueryOptions.java | 18 +-
.../query/models/MetricsQueryResult.java | 6 +-
.../monitor/query/models/MetricsUnit.java | 66 ---
.../src/main/java/module-info.java | 8 +-
.../monitor/query/LogsQueryBatchSample.java | 25 +-
.../azure/monitor/query/LogsQuerySample.java | 4 +-
.../monitor/query/LogsQueryWithModels.java | 4 +-
.../monitor/query/MetricsQuerySample.java | 11 +-
.../monitor/query/MultiWorkspaceSample.java | 64 +++
.../azure/monitor/query/ReadmeSamples.java | 48 +-
.../monitor/query/ServerTimeoutSample.java | 4 +-
.../azure/monitor/query/LogsClientTest.java | 88 ---
.../monitor/query/LogsQueryClientTest.java | 176 ++++++
...tTest.java => MetricsQueryClientTest.java} | 82 +--
.../LogsClientTest.testLogsQuery.json | 27 -
.../LogsClientTest.testLogsQueryBatch.json | 27 -
...ientTest.testBatchQueryPartialSuccess.json | 27 +
...gsQueryClientTest.testBatchStatistics.json | 27 +
.../LogsQueryClientTest.testLogsQuery.json | 28 +
...ogsQueryClientTest.testLogsQueryBatch.json | 27 +
...ueryClientTest.testMultipleWorkspaces.json | 28 +
.../LogsQueryClientTest.testStatistics.json | 28 +
.../MetricsClientTest.testMetricsQuery.json | 32 --
...QueryClientTest.testMetricsDefinition.json | 32 ++
...QueryClientTest.testMetricsNamespaces.json | 31 ++
...tricsQueryClientTest.testMetricsQuery.json | 32 ++
.../azure-monitor-query/swagger/README.md | 2 +-
sdk/resourcemanager/api-specs.json | 2 +-
.../CHANGELOG.md | 1 +
.../pom.xml | 2 +
.../ContainerServiceManagementClient.java | 28 +-
.../fluent/ManagedClustersClient.java | 113 +++-
.../fluent/models/AgentPoolInner.java | 38 +-
.../OutboundEnvironmentEndpointInner.java | 84 +++
.../implementation/AgentPoolsClientImpl.java | 28 +-
.../ContainerServiceManagementClientImpl.java | 52 +-
.../KubernetesClusterAgentPoolImpl.java | 1 +
.../MaintenanceConfigurationsClientImpl.java | 16 +-
.../ManagedClustersClientImpl.java | 517 ++++++++++++++++--
.../implementation/OperationsClientImpl.java | 4 +-
.../PrivateEndpointConnectionsClientImpl.java | 16 +-
.../PrivateLinkResourcesClientImpl.java | 4 +-
...esolvePrivateLinkServiceIdsClientImpl.java | 4 +-
.../containerservice/models/Count.java | 22 +-
.../models/EndpointDependency.java | 80 +++
.../models/EndpointDetail.java | 128 +++++
.../ManagedClusterAgentPoolProfile.java | 7 +
...agedClusterAgentPoolProfileProperties.java | 38 +-
.../ManagedClusterApiServerAccessProfile.java | 29 +
...OutboundEnvironmentEndpointCollection.java | 75 +++
...rsTests.canAutoScaleKubernetesCluster.json | 32 +-
...lustersTests.canCRUDKubernetesCluster.json | 20 +-
...stersTests.canCreateClusterWithSpotVM.json | 20 +-
...rceManagerTests.testKubernetesCluster.json | 36 +-
...etesCniTests.testKubernetesClusterCni.json | 8 +-
...ivateLinkTests.testPrivateEndpointAKS.json | 12 +-
.../spring/sample/aad/utils/JsonMapper.java | 12 +-
.../CHANGELOG.md | 2 +-
sdk/spring/azure-spring-boot/CHANGELOG.md | 2 +-
...AADOAuth2AuthorizationRequestResolver.java | 17 +-
.../AADWebSecurityConfigurerAdapter.java | 2 +-
.../aad/AADAuthenticationProperties.java | 13 +
.../CHANGELOG.md | 3 +
.../azure-media-videoanalyzer-edge/pom.xml | 2 +-
163 files changed, 7759 insertions(+), 1467 deletions(-)
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobInventoryPolicyCompletedEventData.java
create mode 100644 sdk/keyvault/azure-security-keyvault-jca/src/main/java/module-info.java
create mode 100644 sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/test/TestModularization.java
create mode 100644 sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/module-info.java
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/AuthClientTest.java (92%)
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/JreKeyStoreTest.java (95%)
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultCertificatesTest.java (95%)
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultClientTest.java (93%)
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultJcaProviderTest.java (83%)
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultKeyManagerTest.java (85%)
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultKeyStoreTest.java (95%)
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/PropertyConvertorUtils.java (93%)
rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/ServerSocketTest.java (96%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{LogsAsyncClient.java => LogsQueryAsyncClient.java} (58%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{LogsClient.java => LogsQueryClient.java} (81%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{LogsClientBuilder.java => LogsQueryClientBuilder.java} (60%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{LogsServiceVersion.java => LogsQueryServiceVersion.java} (80%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{MetricsAsyncClient.java => MetricsQueryAsyncClient.java} (76%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{MetricsClient.java => MetricsQueryClient.java} (83%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{MetricsClientBuilder.java => MetricsQueryClientBuilder.java} (75%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{MetricsServiceVersion.java => MetricsQueryServiceVersion.java} (80%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/{LogQueryRequest.java => BatchQueryRequest.java} (70%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/{LogQueryResponse.java => BatchQueryResponse.java} (73%)
delete mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResult.java
delete mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/ColumnDataType.java
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{LogsQueryBatch.java => LogsBatchQuery.java} (81%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{LogsQueryBatchResult.java => LogsBatchQueryResult.java} (67%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{LogsQueryBatchResultCollection.java => LogsBatchQueryResultCollection.java} (69%)
create mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsColumnType.java
create mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetail.java
delete mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetails.java
create mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryStatistics.java
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{Metrics.java => Metric.java} (81%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsAvailability.java => MetricAvailability.java} (92%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsDefinition.java => MetricDefinition.java} (88%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsNamespace.java => MetricNamespace.java} (88%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsNamespaceName.java => MetricNamespaceName.java} (89%)
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsTimeSeriesElement.java => MetricTimeSeriesElement.java} (62%)
create mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricUnit.java
rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsValue.java => MetricValue.java} (90%)
delete mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsUnit.java
create mode 100644 sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MultiWorkspaceSample.java
delete mode 100644 sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsClientTest.java
create mode 100644 sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsQueryClientTest.java
rename sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/{MetricsClientTest.java => MetricsQueryClientTest.java} (54%)
delete mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQuery.json
delete mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQueryBatch.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchQueryPartialSuccess.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchStatistics.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQuery.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQueryBatch.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testMultipleWorkspaces.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testStatistics.json
delete mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsClientTest.testMetricsQuery.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsDefinition.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsNamespaces.json
create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsQuery.json
create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java
create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java
create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java
create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java
diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml
index 73828a1aa49e9..4f7e61d7a243d 100644
--- a/eng/jacoco-test-coverage/pom.xml
+++ b/eng/jacoco-test-coverage/pom.xml
@@ -64,22 +64,22 @@
com.azure
azure-communication-common
- 1.1.0-beta.1
+ 1.0.2
com.azure
azure-communication-identity
- 1.2.0-beta.1
+ 1.1.1
com.azure
azure-communication-sms
- 1.1.0-beta.1
+ 1.0.3
com.azure
azure-communication-phonenumbers
- 1.1.0-beta.1
+ 1.0.3
com.azure
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 7f491775b0a64..4f37ae6c68938 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -53,10 +53,10 @@ com.azure:azure-analytics-synapse-managedprivateendpoints;1.0.0-beta.3;1.0.0-bet
com.azure:azure-analytics-synapse-monitoring;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-communication-callingserver;1.0.0;1.0.0-beta.1
com.azure:azure-communication-chat;1.0.0;1.1.0-beta.1
-com.azure:azure-communication-common;1.0.1;1.1.0-beta.1
-com.azure:azure-communication-sms;1.0.1;1.1.0-beta.1
-com.azure:azure-communication-identity;1.1.0;1.2.0-beta.1
-com.azure:azure-communication-phonenumbers;1.0.1;1.1.0-beta.1
+com.azure:azure-communication-common;1.0.2;1.0.2
+com.azure:azure-communication-sms;1.0.1;1.0.3
+com.azure:azure-communication-identity;1.1.0;1.1.1
+com.azure:azure-communication-phonenumbers;1.0.1;1.0.3
com.azure:azure-containers-containerregistry;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-core;1.16.0;1.17.0
com.azure:azure-core-amqp;2.0.6;2.1.0-beta.1
@@ -127,7 +127,7 @@ com.azure:azure-storage-internal-avro;12.0.4;12.0.5-beta.1
com.azure:azure-storage-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-storage-queue;12.9.1;12.10.0-beta.2
com.azure:azure-template-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.2;1.0.0-beta.3
+com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-verticals-agrifood-farming;1.0.0-beta.2;1.0.0-beta.3
com.azure:perf-test-core;1.0.0-beta.1;1.0.0-beta.1
com.microsoft.azure:spring-cloud-azure-appconfiguration-config-web;1.3.0;1.4.0-beta.1
diff --git a/sdk/communication/azure-communication-callingserver/pom.xml b/sdk/communication/azure-communication-callingserver/pom.xml
index e3887b116beaa..6fc26747aebad 100644
--- a/sdk/communication/azure-communication-callingserver/pom.xml
+++ b/sdk/communication/azure-communication-callingserver/pom.xml
@@ -54,7 +54,7 @@
com.azure
azure-communication-common
- 1.1.0-beta.1
+ 1.0.2
com.azure
diff --git a/sdk/communication/azure-communication-chat/pom.xml b/sdk/communication/azure-communication-chat/pom.xml
index f0a85bb294e3a..e48c15bf2f26d 100644
--- a/sdk/communication/azure-communication-chat/pom.xml
+++ b/sdk/communication/azure-communication-chat/pom.xml
@@ -50,12 +50,12 @@
com.azure
azure-communication-common
- 1.1.0-beta.1
+ 1.0.2
com.azure
azure-communication-identity
- 1.2.0-beta.1
+ 1.1.1
test
diff --git a/sdk/communication/azure-communication-common/CHANGELOG.md b/sdk/communication/azure-communication-common/CHANGELOG.md
index 3648cb110f841..d7b63ae0d7bfe 100644
--- a/sdk/communication/azure-communication-common/CHANGELOG.md
+++ b/sdk/communication/azure-communication-common/CHANGELOG.md
@@ -1,6 +1,7 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.0.2 (2021-06-08)
+- Updated 'azure-communication-common' version
## 1.0.1 (2021-05-27)
- Dependency versions updated.
diff --git a/sdk/communication/azure-communication-common/pom.xml b/sdk/communication/azure-communication-common/pom.xml
index 27fda19aa2ac7..9f90268ac67f3 100644
--- a/sdk/communication/azure-communication-common/pom.xml
+++ b/sdk/communication/azure-communication-common/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-communication-common
jar
- 1.1.0-beta.1
+ 1.0.2
Microsoft Azure common library for communication service client
diff --git a/sdk/communication/azure-communication-identity/CHANGELOG.md b/sdk/communication/azure-communication-identity/CHANGELOG.md
index a535cafc3a48b..d227a7b49e9ad 100644
--- a/sdk/communication/azure-communication-identity/CHANGELOG.md
+++ b/sdk/communication/azure-communication-identity/CHANGELOG.md
@@ -1,6 +1,7 @@
# Release History
-## 1.2.0-beta.1 (Unreleased)
+## 1.1.1 (2021-06-08)
+- Updated 'azure-communication-identity' version
## 1.1.0 (2021-05-27)
### Added
diff --git a/sdk/communication/azure-communication-identity/pom.xml b/sdk/communication/azure-communication-identity/pom.xml
index b699d5458ba61..e01aa05fef265 100644
--- a/sdk/communication/azure-communication-identity/pom.xml
+++ b/sdk/communication/azure-communication-identity/pom.xml
@@ -16,7 +16,7 @@
com.azure
azure-communication-identity
jar
- 1.2.0-beta.1
+ 1.1.1
Microsoft Azure identity client library for communication
@@ -63,7 +63,7 @@
com.azure
azure-communication-common
- 1.1.0-beta.1
+ 1.0.2
org.junit.jupiter
diff --git a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
index d3485299f998a..1f47f0a5f8745 100644
--- a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
+++ b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
@@ -1,6 +1,7 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.0.3 (2021-06-08)
+- Updated 'azure-communication-phonenumbers' version
## 1.0.2 (2021-05-27)
- Dependency versions updated.
diff --git a/sdk/communication/azure-communication-phonenumbers/pom.xml b/sdk/communication/azure-communication-phonenumbers/pom.xml
index 414f997d37fd7..f657d5e4be193 100644
--- a/sdk/communication/azure-communication-phonenumbers/pom.xml
+++ b/sdk/communication/azure-communication-phonenumbers/pom.xml
@@ -16,7 +16,7 @@
com.azure
azure-communication-phonenumbers
jar
- 1.1.0-beta.1
+ 1.0.3
Microsoft Azure client phone numbers library for communication
@@ -63,7 +63,7 @@
com.azure
azure-communication-common
- 1.1.0-beta.1
+ 1.0.2
org.junit.jupiter
diff --git a/sdk/communication/azure-communication-sms/CHANGELOG.md b/sdk/communication/azure-communication-sms/CHANGELOG.md
index 686b710f43838..a91186f265076 100644
--- a/sdk/communication/azure-communication-sms/CHANGELOG.md
+++ b/sdk/communication/azure-communication-sms/CHANGELOG.md
@@ -1,6 +1,7 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.0.3 (2021-06-08)
+- Updated 'azure-communication-sms' version
## 1.0.2 (2021-05-27)
- Dependency versions updated.
diff --git a/sdk/communication/azure-communication-sms/pom.xml b/sdk/communication/azure-communication-sms/pom.xml
index 9ac2c2216164e..355f87fcce9c8 100644
--- a/sdk/communication/azure-communication-sms/pom.xml
+++ b/sdk/communication/azure-communication-sms/pom.xml
@@ -15,7 +15,7 @@
com.azure
azure-communication-sms
jar
- 1.1.0-beta.1
+ 1.0.3
Microsoft Azure library for sending SMS messages
@@ -55,7 +55,7 @@
com.azure
azure-communication-common
- 1.1.0-beta.1
+ 1.0.2
com.azure
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java
index f469f879dede0..04145e4ece7be 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java
@@ -116,14 +116,13 @@ private Mono isAuthorized() {
.next()
.switchIfEmpty(Mono.error(new AmqpException(false, "Did not get response from tokenManager: " + entityPath, getErrorContext())))
.handle((response, sink) -> {
- if (response != AmqpResponseCode.ACCEPTED && response != AmqpResponseCode.OK) {
+ if (RequestResponseUtils.isSuccessful(response)) {
+ sink.complete();
+ } else {
final String message = String.format("User does not have authorization to perform operation "
+ "on entity [%s]. Response: [%s]", entityPath, response);
sink.error(ExceptionUtil.amqpResponseCodeToException(response.getValue(), message,
getErrorContext()));
-
- } else {
- sink.complete();
}
});
}
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseUtils.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseUtils.java
index d61b8594b9de5..d0c2fead82a19 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseUtils.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseUtils.java
@@ -28,6 +28,10 @@ public class RequestResponseUtils {
public static boolean isSuccessful(Message message) {
final AmqpResponseCode statusCode = getStatusCode(message);
+ return isSuccessful(statusCode);
+ }
+
+ public static boolean isSuccessful(AmqpResponseCode statusCode) {
return statusCode == AmqpResponseCode.OK || statusCode == AmqpResponseCode.ACCEPTED;
}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java
index f1b5b7df0d9e0..257988d5f239e 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java
@@ -24,6 +24,21 @@
import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingApplicationDataChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingBoundaryChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropVarietyChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmerChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFieldChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingHarvestDataChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingPlantingDataChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonalFieldChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingTillageDataChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData;
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData;
import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData;
@@ -103,6 +118,7 @@
import com.azure.messaging.eventgrid.systemevents.StorageAsyncOperationInitiatedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageBlobCreatedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageBlobDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.StorageBlobInventoryPolicyCompletedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageBlobRenamedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageBlobTierChangedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageDirectoryCreatedEventData;
@@ -406,6 +422,11 @@ public final class SystemEventNames {
*/
public static final String STORAGE_BLOB_DELETED = "Microsoft.Storage.BlobDeleted";
+ /** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobInventoryPolicyCompleted event. */
+ public static final String STORAGE_BLOB_INVENTORY_POLICY_COMPLETED =
+ "Microsoft.Storage.BlobInventoryPolicyCompleted";
+
+
/**
* indicates an event of blob renaming.
*/
@@ -532,6 +553,67 @@ public final class SystemEventNames {
public static final String POLICY_INSIGHTS_POLICY_STATE_CHANGED = "Microsoft.PolicyInsights.PolicyStateChanged";
public static final String POLICY_INSIGHTS_POLICY_STATE_DELETED = "Microsoft.PolicyInsights.PolicyStateDeleted";
+ // Agriculture Food Farming
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */
+ public static final String AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED =
+ "Microsoft.AgFoodPlatform.ApplicationDataChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */
+ public static final String AGRI_FOOD_FARMING_BOUNDARY_CHANGED = "Microsoft.AgFoodPlatform.BoundaryChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */
+ public static final String AGRI_FOOD_FARMING_CROP_CHANGED = "Microsoft.AgFoodPlatform.CropChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */
+ public static final String AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED = "Microsoft.AgFoodPlatform.CropVarietyChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */
+ public static final String AGRI_FOOD_FARMING_FARM_CHANGED = "Microsoft.AgFoodPlatform.FarmChanged";
+
+ /**
+ * Schema of the Data property of an EventGridEvent for a
+ * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event.
+ */
+ public static final String AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED =
+ "Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */
+ public static final String AGRI_FOOD_FARMING_FARMER_CHANGED = "Microsoft.AgFoodPlatform.FarmerChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */
+ public static final String AGRI_FOOD_FARMING_FIELD_CHANGED = "Microsoft.AgFoodPlatform.FieldChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */
+ public static final String AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED = "Microsoft.AgFoodPlatform.HarvestDataChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */
+ public static final String AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED = "Microsoft.AgFoodPlatform.PlantingDataChanged";
+
+ /**
+ * Schema of the Data property of an EventGridEvent for a
+ * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event.
+ */
+ public static final String AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED =
+ "Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */
+ public static final String AGRI_FOOD_FARMING_SEASON_CHANGED = "Microsoft.AgFoodPlatform.SeasonChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */
+ public static final String AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED =
+ "Microsoft.AgFoodPlatform.SeasonalFieldChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */
+ public static final String AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED = "Microsoft.AgFoodPlatform.TillageDataChanged";
+
+ /**
+ * Schema of the Data property of an EventGridEvent for a
+ * Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged event.
+ */
+ public static final String AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED =
+ "Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged";
+
+
private static final Map> SYSTEM_EVENT_MAPPINGS = new HashMap>() {
{
// AppConfiguration events.
@@ -608,6 +690,7 @@ public final class SystemEventNames {
// Storage events.
put(STORAGE_BLOB_CREATED, StorageBlobCreatedEventData.class);
put(STORAGE_BLOB_DELETED, StorageBlobDeletedEventData.class);
+ put(STORAGE_BLOB_INVENTORY_POLICY_COMPLETED, StorageBlobInventoryPolicyCompletedEventData.class);
put(STORAGE_BLOB_RENAMED, StorageBlobRenamedEventData.class);
put(STORAGE_BLOB_TIER_CHANGED, StorageBlobTierChangedEventData.class);
put(STORAGE_DIRECTORY_CREATED, StorageDirectoryCreatedEventData.class);
@@ -689,6 +772,31 @@ public final class SystemEventNames {
put(POLICY_INSIGHTS_POLICY_STATE_CREATED, PolicyInsightsPolicyStateCreatedEventData.class);
put(POLICY_INSIGHTS_POLICY_STATE_CHANGED, PolicyInsightsPolicyStateChangedEventData.class);
put(POLICY_INSIGHTS_POLICY_STATE_DELETED, PolicyInsightsPolicyStateDeletedEventData.class);
+
+ // Agriculture Food Farming
+ put(
+ AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED,
+ AgriFoodFarmingApplicationDataChangedEventData.class);
+ put(AGRI_FOOD_FARMING_BOUNDARY_CHANGED, AgriFoodFarmingBoundaryChangedEventData.class);
+ put(AGRI_FOOD_FARMING_CROP_CHANGED, AgriFoodFarmingCropChangedEventData.class);
+ put(AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED, AgriFoodFarmingCropVarietyChangedEventData.class);
+ put(AGRI_FOOD_FARMING_FARM_CHANGED, AgriFoodFarmingFarmChangedEventData.class);
+ put(
+ AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED,
+ AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.class);
+ put(AGRI_FOOD_FARMING_FARMER_CHANGED, AgriFoodFarmingFarmerChangedEventData.class);
+ put(AGRI_FOOD_FARMING_FIELD_CHANGED, AgriFoodFarmingFieldChangedEventData.class);
+ put(AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED, AgriFoodFarmingHarvestDataChangedEventData.class);
+ put(AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED, AgriFoodFarmingPlantingDataChangedEventData.class);
+ put(
+ AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED,
+ AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.class);
+ put(AGRI_FOOD_FARMING_SEASON_CHANGED, AgriFoodFarmingSeasonChangedEventData.class);
+ put(AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED, AgriFoodFarmingSeasonalFieldChangedEventData.class);
+ put(AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED, AgriFoodFarmingTillageDataChangedEventData.class);
+ put(
+ AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED,
+ AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.class);
}
};
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java
index 8ab97f7881607..f971bb252e0e3 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java
@@ -24,6 +24,21 @@
import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingApplicationDataChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingBoundaryChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropVarietyChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmerChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFieldChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingHarvestDataChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingPlantingDataChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonalFieldChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingTillageDataChangedEventData;
+import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData;
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData;
import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData;
@@ -103,6 +118,7 @@
import com.azure.messaging.eventgrid.systemevents.StorageAsyncOperationInitiatedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageBlobCreatedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageBlobDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.StorageBlobInventoryPolicyCompletedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageBlobRenamedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageBlobTierChangedEventData;
import com.azure.messaging.eventgrid.systemevents.StorageDirectoryCreatedEventData;
@@ -231,6 +247,65 @@ public final class SystemEventMappingNames {
/** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. */
public static final String ACS_SMS_RECEIVED = "Microsoft.Communication.SMSReceived";
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */
+ public static final String AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED =
+ "Microsoft.AgFoodPlatform.ApplicationDataChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */
+ public static final String AGRI_FOOD_FARMING_BOUNDARY_CHANGED = "Microsoft.AgFoodPlatform.BoundaryChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */
+ public static final String AGRI_FOOD_FARMING_CROP_CHANGED = "Microsoft.AgFoodPlatform.CropChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */
+ public static final String AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED = "Microsoft.AgFoodPlatform.CropVarietyChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */
+ public static final String AGRI_FOOD_FARMING_FARM_CHANGED = "Microsoft.AgFoodPlatform.FarmChanged";
+
+ /**
+ * Schema of the Data property of an EventGridEvent for a
+ * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event.
+ */
+ public static final String AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED =
+ "Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */
+ public static final String AGRI_FOOD_FARMING_FARMER_CHANGED = "Microsoft.AgFoodPlatform.FarmerChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */
+ public static final String AGRI_FOOD_FARMING_FIELD_CHANGED = "Microsoft.AgFoodPlatform.FieldChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */
+ public static final String AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED = "Microsoft.AgFoodPlatform.HarvestDataChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */
+ public static final String AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED = "Microsoft.AgFoodPlatform.PlantingDataChanged";
+
+ /**
+ * Schema of the Data property of an EventGridEvent for a
+ * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event.
+ */
+ public static final String AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED =
+ "Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */
+ public static final String AGRI_FOOD_FARMING_SEASON_CHANGED = "Microsoft.AgFoodPlatform.SeasonChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */
+ public static final String AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED =
+ "Microsoft.AgFoodPlatform.SeasonalFieldChanged";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */
+ public static final String AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED = "Microsoft.AgFoodPlatform.TillageDataChanged";
+
+ /**
+ * Schema of the Data property of an EventGridEvent for a
+ * Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged event.
+ */
+ public static final String AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED =
+ "Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged";
+
/** Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.KeyValueDeleted event. */
public static final String APP_CONFIGURATION_KEY_VALUE_DELETED = "Microsoft.AppConfiguration.KeyValueDeleted";
@@ -602,6 +677,10 @@ public final class SystemEventMappingNames {
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobDeleted event. */
public static final String STORAGE_BLOB_DELETED = "Microsoft.Storage.BlobDeleted";
+ /** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobInventoryPolicyCompleted event. */
+ public static final String STORAGE_BLOB_INVENTORY_POLICY_COMPLETED =
+ "Microsoft.Storage.BlobInventoryPolicyCompleted";
+
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobRenamed event. */
public static final String STORAGE_BLOB_RENAMED = "Microsoft.Storage.BlobRenamed";
@@ -693,6 +772,29 @@ public final class SystemEventMappingNames {
put(ACS_RECORDING_FILE_STATUS_UPDATED, AcsRecordingFileStatusUpdatedEventData.class);
put(ACS_SMS_DELIVERY_REPORT_RECEIVED, AcsSmsDeliveryReportReceivedEventData.class);
put(ACS_SMS_RECEIVED, AcsSmsReceivedEventData.class);
+ put(
+ AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED,
+ AgriFoodFarmingApplicationDataChangedEventData.class);
+ put(AGRI_FOOD_FARMING_BOUNDARY_CHANGED, AgriFoodFarmingBoundaryChangedEventData.class);
+ put(AGRI_FOOD_FARMING_CROP_CHANGED, AgriFoodFarmingCropChangedEventData.class);
+ put(AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED, AgriFoodFarmingCropVarietyChangedEventData.class);
+ put(AGRI_FOOD_FARMING_FARM_CHANGED, AgriFoodFarmingFarmChangedEventData.class);
+ put(
+ AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED,
+ AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.class);
+ put(AGRI_FOOD_FARMING_FARMER_CHANGED, AgriFoodFarmingFarmerChangedEventData.class);
+ put(AGRI_FOOD_FARMING_FIELD_CHANGED, AgriFoodFarmingFieldChangedEventData.class);
+ put(AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED, AgriFoodFarmingHarvestDataChangedEventData.class);
+ put(AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED, AgriFoodFarmingPlantingDataChangedEventData.class);
+ put(
+ AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED,
+ AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.class);
+ put(AGRI_FOOD_FARMING_SEASON_CHANGED, AgriFoodFarmingSeasonChangedEventData.class);
+ put(AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED, AgriFoodFarmingSeasonalFieldChangedEventData.class);
+ put(AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED, AgriFoodFarmingTillageDataChangedEventData.class);
+ put(
+ AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED,
+ AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.class);
put(APP_CONFIGURATION_KEY_VALUE_DELETED, AppConfigurationKeyValueDeletedEventData.class);
put(APP_CONFIGURATION_KEY_VALUE_MODIFIED, AppConfigurationKeyValueModifiedEventData.class);
put(CONTAINER_REGISTRY_CHART_DELETED, ContainerRegistryChartDeletedEventData.class);
@@ -798,6 +900,7 @@ public final class SystemEventMappingNames {
put(STORAGE_ASYNC_OPERATION_INITIATED, StorageAsyncOperationInitiatedEventData.class);
put(STORAGE_BLOB_CREATED, StorageBlobCreatedEventData.class);
put(STORAGE_BLOB_DELETED, StorageBlobDeletedEventData.class);
+ put(STORAGE_BLOB_INVENTORY_POLICY_COMPLETED, StorageBlobInventoryPolicyCompletedEventData.class);
put(STORAGE_BLOB_RENAMED, StorageBlobRenamedEventData.class);
put(STORAGE_BLOB_TIER_CHANGED, StorageBlobTierChangedEventData.class);
put(STORAGE_DIRECTORY_CREATED, StorageDirectoryCreatedEventData.class);
@@ -831,7 +934,5 @@ public static Map> getSystemEventMappings() {
return Collections.unmodifiableMap(SYSTEM_EVENT_MAPPINGS);
}
- private SystemEventMappingNames() {
- // No instances allowed
- }
+ private SystemEventMappingNames() { }
}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java
index 962c5479915a6..3759fc5b0be6b 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java
@@ -28,6 +28,18 @@ public final class AcsRecordingChunkInfoProperties {
@JsonProperty(value = "endReason")
private String endReason;
+ /*
+ * The location of the metadata for this chunk
+ */
+ @JsonProperty(value = "metadataLocation")
+ private String metadataLocation;
+
+ /*
+ * The location of the content for this chunk
+ */
+ @JsonProperty(value = "contentLocation")
+ private String contentLocation;
+
/**
* Get the documentId property: The documentId of the recording chunk.
*
@@ -87,4 +99,44 @@ public AcsRecordingChunkInfoProperties setEndReason(String endReason) {
this.endReason = endReason;
return this;
}
+
+ /**
+ * Get the metadataLocation property: The location of the metadata for this chunk.
+ *
+ * @return the metadataLocation value.
+ */
+ public String getMetadataLocation() {
+ return this.metadataLocation;
+ }
+
+ /**
+ * Set the metadataLocation property: The location of the metadata for this chunk.
+ *
+ * @param metadataLocation the metadataLocation value to set.
+ * @return the AcsRecordingChunkInfoProperties object itself.
+ */
+ public AcsRecordingChunkInfoProperties setMetadataLocation(String metadataLocation) {
+ this.metadataLocation = metadataLocation;
+ return this;
+ }
+
+ /**
+ * Get the contentLocation property: The location of the content for this chunk.
+ *
+ * @return the contentLocation value.
+ */
+ public String getContentLocation() {
+ return this.contentLocation;
+ }
+
+ /**
+ * Set the contentLocation property: The location of the content for this chunk.
+ *
+ * @param contentLocation the contentLocation value to set.
+ * @return the AcsRecordingChunkInfoProperties object itself.
+ */
+ public AcsRecordingChunkInfoProperties setContentLocation(String contentLocation) {
+ this.contentLocation = contentLocation;
+ return this;
+ }
}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java
new file mode 100644
index 0000000000000..adc5fed3e3b34
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java
@@ -0,0 +1,307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */
+@Fluent
+public final class AgriFoodFarmingApplicationDataChangedEventData {
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Id of the farmer it belongs to.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Source of the farm operation data.
+ */
+ @JsonProperty(value = "source")
+ private String source;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the farmerId property: Id of the farmer it belongs to.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Id of the farmer it belongs to.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the source property: Source of the farm operation data.
+ *
+ * @return the source value.
+ */
+ public String getSource() {
+ return this.source;
+ }
+
+ /**
+ * Set the source property: Source of the farm operation data.
+ *
+ * @param source the source value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingApplicationDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingApplicationDataChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java
new file mode 100644
index 0000000000000..328031adb257f
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java
@@ -0,0 +1,359 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */
+@Fluent
+public final class AgriFoodFarmingBoundaryChangedEventData {
+ /*
+ * Id of the farmer it belongs to.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Id of the parent(field or seasonalField) it belongs to.
+ */
+ @JsonProperty(value = "parentId")
+ private String parentId;
+
+ /*
+ * Type of the parent it belongs to.
+ */
+ @JsonProperty(value = "parentType")
+ private String parentType;
+
+ /*
+ * A boolean flag indicating whether the boundary is primary or not.
+ */
+ @JsonProperty(value = "isPrimary")
+ private Boolean isPrimary;
+
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the farmerId property: Id of the farmer it belongs to.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Id of the farmer it belongs to.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the parentId property: Id of the parent(field or seasonalField) it belongs to.
+ *
+ * @return the parentId value.
+ */
+ public String getParentId() {
+ return this.parentId;
+ }
+
+ /**
+ * Set the parentId property: Id of the parent(field or seasonalField) it belongs to.
+ *
+ * @param parentId the parentId value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setParentId(String parentId) {
+ this.parentId = parentId;
+ return this;
+ }
+
+ /**
+ * Get the parentType property: Type of the parent it belongs to.
+ *
+ * @return the parentType value.
+ */
+ public String getParentType() {
+ return this.parentType;
+ }
+
+ /**
+ * Set the parentType property: Type of the parent it belongs to.
+ *
+ * @param parentType the parentType value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setParentType(String parentType) {
+ this.parentType = parentType;
+ return this;
+ }
+
+ /**
+ * Get the isPrimary property: A boolean flag indicating whether the boundary is primary or not.
+ *
+ * @return the isPrimary value.
+ */
+ public Boolean isPrimary() {
+ return this.isPrimary;
+ }
+
+ /**
+ * Set the isPrimary property: A boolean flag indicating whether the boundary is primary or not.
+ *
+ * @param isPrimary the isPrimary value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setIsPrimary(Boolean isPrimary) {
+ this.isPrimary = isPrimary;
+ return this;
+ }
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingBoundaryChangedEventData object itself.
+ */
+ public AgriFoodFarmingBoundaryChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java
new file mode 100644
index 0000000000000..e3d7613f14213
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java
@@ -0,0 +1,255 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */
+@Fluent
+public final class AgriFoodFarmingCropChangedEventData {
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingCropChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java
new file mode 100644
index 0000000000000..5cab7b0a63232
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java
@@ -0,0 +1,281 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */
+@Fluent
+public final class AgriFoodFarmingCropVarietyChangedEventData {
+ /*
+ * Id of the crop it belongs to.
+ */
+ @JsonProperty(value = "cropId")
+ private String cropId;
+
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the cropId property: Id of the crop it belongs to.
+ *
+ * @return the cropId value.
+ */
+ public String getCropId() {
+ return this.cropId;
+ }
+
+ /**
+ * Set the cropId property: Id of the crop it belongs to.
+ *
+ * @param cropId the cropId value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setCropId(String cropId) {
+ this.cropId = cropId;
+ return this;
+ }
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingCropVarietyChangedEventData object itself.
+ */
+ public AgriFoodFarmingCropVarietyChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java
new file mode 100644
index 0000000000000..41f972ad64d8a
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java
@@ -0,0 +1,281 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */
+@Fluent
+public final class AgriFoodFarmingFarmChangedEventData {
+ /*
+ * Id of the farmer it belongs to.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the farmerId property: Id of the farmer it belongs to.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Id of the farmer it belongs to.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingFarmChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java
new file mode 100644
index 0000000000000..42b79019e228f
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java
@@ -0,0 +1,289 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * Schema of the Data property of an EventGridEvent for a
+ * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event.
+ */
+@Fluent
+public final class AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData {
+ /*
+ * Farmer id for which job was created.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Status message to capture more details of the job.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /*
+ * Various states a job can be in.
+ */
+ @JsonProperty(value = "status")
+ private AgriFoodFarmingJobStatus status;
+
+ /*
+ * Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "lastActionDateTime")
+ private OffsetDateTime lastActionDateTime;
+
+ /*
+ * Flag that gets set when job cancellation is requested.
+ */
+ @JsonProperty(value = "isCancellationRequested")
+ private Boolean isCancellationRequested;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the farmerId property: Farmer id for which job was created.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Farmer id for which job was created.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the message property: Status message to capture more details of the job.
+ *
+ * @return the message value.
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Status message to capture more details of the job.
+ *
+ * @param message the message value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the status property: Various states a job can be in.
+ *
+ * @return the status value.
+ */
+ public AgriFoodFarmingJobStatus getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Various states a job can be in.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setStatus(
+ AgriFoodFarmingJobStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the lastActionDateTime value.
+ */
+ public OffsetDateTime getLastActionDateTime() {
+ return this.lastActionDateTime;
+ }
+
+ /**
+ * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param lastActionDateTime the lastActionDateTime value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setLastActionDateTime(
+ OffsetDateTime lastActionDateTime) {
+ this.lastActionDateTime = lastActionDateTime;
+ return this;
+ }
+
+ /**
+ * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested.
+ *
+ * @return the isCancellationRequested value.
+ */
+ public Boolean isCancellationRequested() {
+ return this.isCancellationRequested;
+ }
+
+ /**
+ * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested.
+ *
+ * @param isCancellationRequested the isCancellationRequested value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setIsCancellationRequested(
+ Boolean isCancellationRequested) {
+ this.isCancellationRequested = isCancellationRequested;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setCreatedDateTime(
+ OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setProperties(
+ Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java
new file mode 100644
index 0000000000000..fd523025e293d
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java
@@ -0,0 +1,255 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */
+@Fluent
+public final class AgriFoodFarmingFarmerChangedEventData {
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingFarmerChangedEventData object itself.
+ */
+ public AgriFoodFarmingFarmerChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java
new file mode 100644
index 0000000000000..c5c0acbcfd34c
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java
@@ -0,0 +1,307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */
+@Fluent
+public final class AgriFoodFarmingFieldChangedEventData {
+ /*
+ * Farmer Id.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Id of the associated Farm.
+ */
+ @JsonProperty(value = "farmId")
+ private String farmId;
+
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the farmerId property: Farmer Id.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Farmer Id.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the farmId property: Id of the associated Farm.
+ *
+ * @return the farmId value.
+ */
+ public String getFarmId() {
+ return this.farmId;
+ }
+
+ /**
+ * Set the farmId property: Id of the associated Farm.
+ *
+ * @param farmId the farmId value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setFarmId(String farmId) {
+ this.farmId = farmId;
+ return this;
+ }
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingFieldChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java
new file mode 100644
index 0000000000000..ae903a27b10da
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java
@@ -0,0 +1,307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */
+@Fluent
+public final class AgriFoodFarmingHarvestDataChangedEventData {
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Id of the farmer it belongs to.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Source of the farm operation data.
+ */
+ @JsonProperty(value = "source")
+ private String source;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the farmerId property: Id of the farmer it belongs to.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Id of the farmer it belongs to.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the source property: Source of the farm operation data.
+ *
+ * @return the source value.
+ */
+ public String getSource() {
+ return this.source;
+ }
+
+ /**
+ * Set the source property: Source of the farm operation data.
+ *
+ * @param source the source value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingHarvestDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingHarvestDataChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java
new file mode 100644
index 0000000000000..ffb5f37730590
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for AgriFoodFarmingJobStatus. */
+public final class AgriFoodFarmingJobStatus extends ExpandableStringEnum {
+ /** Static value Waiting for AgriFoodFarmingJobStatus. */
+ public static final AgriFoodFarmingJobStatus WAITING = fromString("Waiting");
+
+ /** Static value Running for AgriFoodFarmingJobStatus. */
+ public static final AgriFoodFarmingJobStatus RUNNING = fromString("Running");
+
+ /** Static value Succeeded for AgriFoodFarmingJobStatus. */
+ public static final AgriFoodFarmingJobStatus SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for AgriFoodFarmingJobStatus. */
+ public static final AgriFoodFarmingJobStatus FAILED = fromString("Failed");
+
+ /** Static value Cancelled for AgriFoodFarmingJobStatus. */
+ public static final AgriFoodFarmingJobStatus CANCELLED = fromString("Cancelled");
+
+ /**
+ * Creates or finds a AgriFoodFarmingJobStatus from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding AgriFoodFarmingJobStatus.
+ */
+ @JsonCreator
+ public static AgriFoodFarmingJobStatus fromString(String name) {
+ return fromString(name, AgriFoodFarmingJobStatus.class);
+ }
+
+ /** @return known AgriFoodFarmingJobStatus values. */
+ public static Collection values() {
+ return values(AgriFoodFarmingJobStatus.class);
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java
new file mode 100644
index 0000000000000..8ecc13b9134d2
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java
@@ -0,0 +1,307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */
+@Fluent
+public final class AgriFoodFarmingPlantingDataChangedEventData {
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Id of the farmer it belongs to.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Source of the farm operation data.
+ */
+ @JsonProperty(value = "source")
+ private String source;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the farmerId property: Id of the farmer it belongs to.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Id of the farmer it belongs to.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the source property: Source of the farm operation data.
+ *
+ * @return the source value.
+ */
+ public String getSource() {
+ return this.source;
+ }
+
+ /**
+ * Set the source property: Source of the farm operation data.
+ *
+ * @param source the source value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingPlantingDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingPlantingDataChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java
new file mode 100644
index 0000000000000..9c32c05ac5a0e
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for AgriFoodFarmingResourceActionType. */
+public final class AgriFoodFarmingResourceActionType extends ExpandableStringEnum {
+ /** Static value Created for AgriFoodFarmingResourceActionType. */
+ public static final AgriFoodFarmingResourceActionType CREATED = fromString("Created");
+
+ /** Static value Updated for AgriFoodFarmingResourceActionType. */
+ public static final AgriFoodFarmingResourceActionType UPDATED = fromString("Updated");
+
+ /** Static value Deleted for AgriFoodFarmingResourceActionType. */
+ public static final AgriFoodFarmingResourceActionType DELETED = fromString("Deleted");
+
+ /**
+ * Creates or finds a AgriFoodFarmingResourceActionType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding AgriFoodFarmingResourceActionType.
+ */
+ @JsonCreator
+ public static AgriFoodFarmingResourceActionType fromString(String name) {
+ return fromString(name, AgriFoodFarmingResourceActionType.class);
+ }
+
+ /** @return known AgriFoodFarmingResourceActionType values. */
+ public static Collection values() {
+ return values(AgriFoodFarmingResourceActionType.class);
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java
new file mode 100644
index 0000000000000..b02d5257be1f4
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java
@@ -0,0 +1,288 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * Schema of the Data property of an EventGridEvent for a
+ * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event.
+ */
+@Fluent
+public final class AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData {
+ /*
+ * Farmer id for which job was created.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Status message to capture more details of the job.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /*
+ * Various states a job can be in.
+ */
+ @JsonProperty(value = "status")
+ private AgriFoodFarmingJobStatus status;
+
+ /*
+ * Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "lastActionDateTime")
+ private OffsetDateTime lastActionDateTime;
+
+ /*
+ * Flag that gets set when job cancellation is requested.
+ */
+ @JsonProperty(value = "isCancellationRequested")
+ private Boolean isCancellationRequested;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the farmerId property: Farmer id for which job was created.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Farmer id for which job was created.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the message property: Status message to capture more details of the job.
+ *
+ * @return the message value.
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Status message to capture more details of the job.
+ *
+ * @param message the message value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the status property: Various states a job can be in.
+ *
+ * @return the status value.
+ */
+ public AgriFoodFarmingJobStatus getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Various states a job can be in.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setStatus(AgriFoodFarmingJobStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the lastActionDateTime value.
+ */
+ public OffsetDateTime getLastActionDateTime() {
+ return this.lastActionDateTime;
+ }
+
+ /**
+ * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param lastActionDateTime the lastActionDateTime value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setLastActionDateTime(
+ OffsetDateTime lastActionDateTime) {
+ this.lastActionDateTime = lastActionDateTime;
+ return this;
+ }
+
+ /**
+ * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested.
+ *
+ * @return the isCancellationRequested value.
+ */
+ public Boolean isCancellationRequested() {
+ return this.isCancellationRequested;
+ }
+
+ /**
+ * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested.
+ *
+ * @param isCancellationRequested the isCancellationRequested value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setIsCancellationRequested(
+ Boolean isCancellationRequested) {
+ this.isCancellationRequested = isCancellationRequested;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setCreatedDateTime(
+ OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setProperties(
+ Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java
new file mode 100644
index 0000000000000..3b1f738257182
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java
@@ -0,0 +1,255 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */
+@Fluent
+public final class AgriFoodFarmingSeasonChangedEventData {
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingSeasonChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java
new file mode 100644
index 0000000000000..653cf1a78a651
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java
@@ -0,0 +1,359 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */
+@Fluent
+public final class AgriFoodFarmingSeasonalFieldChangedEventData {
+ /*
+ * Id of the farmer it belongs to.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Id of the season it belongs to.
+ */
+ @JsonProperty(value = "seasonId")
+ private String seasonId;
+
+ /*
+ * Id of the field it belongs to.
+ */
+ @JsonProperty(value = "fieldId")
+ private String fieldId;
+
+ /*
+ * Id of the associated Farm.
+ */
+ @JsonProperty(value = "farmId")
+ private String farmId;
+
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the farmerId property: Id of the farmer it belongs to.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Id of the farmer it belongs to.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the seasonId property: Id of the season it belongs to.
+ *
+ * @return the seasonId value.
+ */
+ public String getSeasonId() {
+ return this.seasonId;
+ }
+
+ /**
+ * Set the seasonId property: Id of the season it belongs to.
+ *
+ * @param seasonId the seasonId value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setSeasonId(String seasonId) {
+ this.seasonId = seasonId;
+ return this;
+ }
+
+ /**
+ * Get the fieldId property: Id of the field it belongs to.
+ *
+ * @return the fieldId value.
+ */
+ public String getFieldId() {
+ return this.fieldId;
+ }
+
+ /**
+ * Set the fieldId property: Id of the field it belongs to.
+ *
+ * @param fieldId the fieldId value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setFieldId(String fieldId) {
+ this.fieldId = fieldId;
+ return this;
+ }
+
+ /**
+ * Get the farmId property: Id of the associated Farm.
+ *
+ * @return the farmId value.
+ */
+ public String getFarmId() {
+ return this.farmId;
+ }
+
+ /**
+ * Set the farmId property: Id of the associated Farm.
+ *
+ * @param farmId the farmId value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setFarmId(String farmId) {
+ this.farmId = farmId;
+ return this;
+ }
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself.
+ */
+ public AgriFoodFarmingSeasonalFieldChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java
new file mode 100644
index 0000000000000..f5c7fededa917
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java
@@ -0,0 +1,307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */
+@Fluent
+public final class AgriFoodFarmingTillageDataChangedEventData {
+ /*
+ * Action occurred on a resource.
+ */
+ @JsonProperty(value = "actionType")
+ private AgriFoodFarmingResourceActionType actionType;
+
+ /*
+ * Id of the farmer it belongs to.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Status of the resource.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Source of the farm operation data.
+ */
+ @JsonProperty(value = "source")
+ private String source;
+
+ /*
+ * Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "modifiedDateTime")
+ private OffsetDateTime modifiedDateTime;
+
+ /*
+ * The ETag value to implement optimistic concurrency.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the actionType property: Action occurred on a resource.
+ *
+ * @return the actionType value.
+ */
+ public AgriFoodFarmingResourceActionType getActionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Action occurred on a resource.
+ *
+ * @param actionType the actionType value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the farmerId property: Id of the farmer it belongs to.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Id of the farmer it belongs to.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the resource.
+ *
+ * @return the status value.
+ */
+ public String getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the resource.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the source property: Source of the farm operation data.
+ *
+ * @return the source value.
+ */
+ public String getSource() {
+ return this.source;
+ }
+
+ /**
+ * Set the source property: Source of the farm operation data.
+ *
+ * @param source the source value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the modifiedDateTime value.
+ */
+ public OffsetDateTime getModifiedDateTime() {
+ return this.modifiedDateTime;
+ }
+
+ /**
+ * Set the modifiedDateTime property: Date-time when resource was last modified, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param modifiedDateTime the modifiedDateTime value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag value to implement optimistic concurrency.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingTillageDataChangedEventData object itself.
+ */
+ public AgriFoodFarmingTillageDataChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java
new file mode 100644
index 0000000000000..a343a31891786
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java
@@ -0,0 +1,287 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged
+ * event.
+ */
+@Fluent
+public final class AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData {
+ /*
+ * Farmer id for which job was created.
+ */
+ @JsonProperty(value = "farmerId")
+ private String farmerId;
+
+ /*
+ * Status message to capture more details of the job.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /*
+ * Various states a job can be in.
+ */
+ @JsonProperty(value = "status")
+ private AgriFoodFarmingJobStatus status;
+
+ /*
+ * Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "lastActionDateTime")
+ private OffsetDateTime lastActionDateTime;
+
+ /*
+ * Flag that gets set when job cancellation is requested.
+ */
+ @JsonProperty(value = "isCancellationRequested")
+ private Boolean isCancellationRequested;
+
+ /*
+ * Unique id of resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Name to identify resource.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Textual description of resource.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Date-time when resource was created, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ */
+ @JsonProperty(value = "createdDateTime")
+ private OffsetDateTime createdDateTime;
+
+ /*
+ * A list of key value pairs that describe the resource.
+ * Only string and numeral values are supported.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Get the farmerId property: Farmer id for which job was created.
+ *
+ * @return the farmerId value.
+ */
+ public String getFarmerId() {
+ return this.farmerId;
+ }
+
+ /**
+ * Set the farmerId property: Farmer id for which job was created.
+ *
+ * @param farmerId the farmerId value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) {
+ this.farmerId = farmerId;
+ return this;
+ }
+
+ /**
+ * Get the message property: Status message to capture more details of the job.
+ *
+ * @return the message value.
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Status message to capture more details of the job.
+ *
+ * @param message the message value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the status property: Various states a job can be in.
+ *
+ * @return the status value.
+ */
+ public AgriFoodFarmingJobStatus getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Various states a job can be in.
+ *
+ * @param status the status value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setStatus(AgriFoodFarmingJobStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the lastActionDateTime value.
+ */
+ public OffsetDateTime getLastActionDateTime() {
+ return this.lastActionDateTime;
+ }
+
+ /**
+ * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format:
+ * yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param lastActionDateTime the lastActionDateTime value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setLastActionDateTime(
+ OffsetDateTime lastActionDateTime) {
+ this.lastActionDateTime = lastActionDateTime;
+ return this;
+ }
+
+ /**
+ * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested.
+ *
+ * @return the isCancellationRequested value.
+ */
+ public Boolean isCancellationRequested() {
+ return this.isCancellationRequested;
+ }
+
+ /**
+ * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested.
+ *
+ * @param isCancellationRequested the isCancellationRequested value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setIsCancellationRequested(
+ Boolean isCancellationRequested) {
+ this.isCancellationRequested = isCancellationRequested;
+ return this;
+ }
+
+ /**
+ * Get the id property: Unique id of resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Unique id of resource.
+ *
+ * @param id the id value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name to identify resource.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name to identify resource.
+ *
+ * @param name the name value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the description property: Textual description of resource.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Textual description of resource.
+ *
+ * @param description the description value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @return the createdDateTime value.
+ */
+ public OffsetDateTime getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
+ *
+ * @param createdDateTime the createdDateTime value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setCreatedDateTime(
+ OffsetDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @return the properties value.
+ */
+ public Map getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values
+ * are supported.
+ *
+ * @param properties the properties value to set.
+ * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself.
+ */
+ public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobInventoryPolicyCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobInventoryPolicyCompletedEventData.java
new file mode 100644
index 0000000000000..d9f795bbfb0e1
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobInventoryPolicyCompletedEventData.java
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobInventoryPolicyCompleted event. */
+@Fluent
+public final class StorageBlobInventoryPolicyCompletedEventData {
+ /*
+ * The time at which inventory policy was scheduled.
+ */
+ @JsonProperty(value = "scheduleDateTime")
+ private OffsetDateTime scheduleDateTime;
+
+ /*
+ * The account name for which inventory policy is registered.
+ */
+ @JsonProperty(value = "accountName")
+ private String accountName;
+
+ /*
+ * The rule name for inventory policy.
+ */
+ @JsonProperty(value = "ruleName")
+ private String ruleName;
+
+ /*
+ * The status of inventory run, it can be
+ * Succeeded/PartiallySucceeded/Failed.
+ */
+ @JsonProperty(value = "policyRunStatus")
+ private String policyRunStatus;
+
+ /*
+ * The status message for inventory run.
+ */
+ @JsonProperty(value = "policyRunStatusMessage")
+ private String policyRunStatusMessage;
+
+ /*
+ * The policy run id for inventory run.
+ */
+ @JsonProperty(value = "policyRunId")
+ private String policyRunId;
+
+ /*
+ * The blob URL for manifest file for inventory run.
+ */
+ @JsonProperty(value = "manifestBlobUrl")
+ private String manifestBlobUrl;
+
+ /**
+ * Get the scheduleDateTime property: The time at which inventory policy was scheduled.
+ *
+ * @return the scheduleDateTime value.
+ */
+ public OffsetDateTime getScheduleDateTime() {
+ return this.scheduleDateTime;
+ }
+
+ /**
+ * Set the scheduleDateTime property: The time at which inventory policy was scheduled.
+ *
+ * @param scheduleDateTime the scheduleDateTime value to set.
+ * @return the StorageBlobInventoryPolicyCompletedEventData object itself.
+ */
+ public StorageBlobInventoryPolicyCompletedEventData setScheduleDateTime(OffsetDateTime scheduleDateTime) {
+ this.scheduleDateTime = scheduleDateTime;
+ return this;
+ }
+
+ /**
+ * Get the accountName property: The account name for which inventory policy is registered.
+ *
+ * @return the accountName value.
+ */
+ public String getAccountName() {
+ return this.accountName;
+ }
+
+ /**
+ * Set the accountName property: The account name for which inventory policy is registered.
+ *
+ * @param accountName the accountName value to set.
+ * @return the StorageBlobInventoryPolicyCompletedEventData object itself.
+ */
+ public StorageBlobInventoryPolicyCompletedEventData setAccountName(String accountName) {
+ this.accountName = accountName;
+ return this;
+ }
+
+ /**
+ * Get the ruleName property: The rule name for inventory policy.
+ *
+ * @return the ruleName value.
+ */
+ public String getRuleName() {
+ return this.ruleName;
+ }
+
+ /**
+ * Set the ruleName property: The rule name for inventory policy.
+ *
+ * @param ruleName the ruleName value to set.
+ * @return the StorageBlobInventoryPolicyCompletedEventData object itself.
+ */
+ public StorageBlobInventoryPolicyCompletedEventData setRuleName(String ruleName) {
+ this.ruleName = ruleName;
+ return this;
+ }
+
+ /**
+ * Get the policyRunStatus property: The status of inventory run, it can be Succeeded/PartiallySucceeded/Failed.
+ *
+ * @return the policyRunStatus value.
+ */
+ public String getPolicyRunStatus() {
+ return this.policyRunStatus;
+ }
+
+ /**
+ * Set the policyRunStatus property: The status of inventory run, it can be Succeeded/PartiallySucceeded/Failed.
+ *
+ * @param policyRunStatus the policyRunStatus value to set.
+ * @return the StorageBlobInventoryPolicyCompletedEventData object itself.
+ */
+ public StorageBlobInventoryPolicyCompletedEventData setPolicyRunStatus(String policyRunStatus) {
+ this.policyRunStatus = policyRunStatus;
+ return this;
+ }
+
+ /**
+ * Get the policyRunStatusMessage property: The status message for inventory run.
+ *
+ * @return the policyRunStatusMessage value.
+ */
+ public String getPolicyRunStatusMessage() {
+ return this.policyRunStatusMessage;
+ }
+
+ /**
+ * Set the policyRunStatusMessage property: The status message for inventory run.
+ *
+ * @param policyRunStatusMessage the policyRunStatusMessage value to set.
+ * @return the StorageBlobInventoryPolicyCompletedEventData object itself.
+ */
+ public StorageBlobInventoryPolicyCompletedEventData setPolicyRunStatusMessage(String policyRunStatusMessage) {
+ this.policyRunStatusMessage = policyRunStatusMessage;
+ return this;
+ }
+
+ /**
+ * Get the policyRunId property: The policy run id for inventory run.
+ *
+ * @return the policyRunId value.
+ */
+ public String getPolicyRunId() {
+ return this.policyRunId;
+ }
+
+ /**
+ * Set the policyRunId property: The policy run id for inventory run.
+ *
+ * @param policyRunId the policyRunId value to set.
+ * @return the StorageBlobInventoryPolicyCompletedEventData object itself.
+ */
+ public StorageBlobInventoryPolicyCompletedEventData setPolicyRunId(String policyRunId) {
+ this.policyRunId = policyRunId;
+ return this;
+ }
+
+ /**
+ * Get the manifestBlobUrl property: The blob URL for manifest file for inventory run.
+ *
+ * @return the manifestBlobUrl value.
+ */
+ public String getManifestBlobUrl() {
+ return this.manifestBlobUrl;
+ }
+
+ /**
+ * Set the manifestBlobUrl property: The blob URL for manifest file for inventory run.
+ *
+ * @param manifestBlobUrl the manifestBlobUrl value to set.
+ * @return the StorageBlobInventoryPolicyCompletedEventData object itself.
+ */
+ public StorageBlobInventoryPolicyCompletedEventData setManifestBlobUrl(String manifestBlobUrl) {
+ this.manifestBlobUrl = manifestBlobUrl;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md
index c22ab03c54679..38600c35c7719 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md
+++ b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md
@@ -14,16 +14,7 @@ Install Autorest beta with NPM:
## Using
-Fork and clone the autorest.java repo (https://github.com/Azure/autorest.java)
-and checkout the v4 branch. Then run `mvn clean package -Dlocal` to generate build files.
-
-Then fork and clone the Azure rest API specs from the repo
-(https://github.com/Azure/azure-rest-api-specs) and run `autorest --java readme.md`
-in this folder, with the following tags:
-
-`--use=`
-
-`--api-spec-location=`
+run `autorest readme.md`
If you are adding or updating swagger files, please make sure that they are included
in the input file list. Also, if you are adding an additional service event, make sure that
@@ -82,23 +73,24 @@ custom-types: CloudEvent,EventGridEvent
model-override-setter-from-superclass: true
input-file:
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Resources/stable/2018-01-01/Resources.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Media/stable/2018-01-01/MediaServices.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Maps/stable/2018-01-01/Maps.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.KeyVault/stable/2018-01-01/KeyVault.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.MachineLearningServices/stable/2018-01-01/MachineLearningServices.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Cache/stable/2018-01-01/RedisCache.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json
-- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Resources/stable/2018-01-01/Resources.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Media/stable/2018-01-01/MediaServices.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Maps/stable/2018-01-01/Maps.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.KeyVault/stable/2018-01-01/KeyVault.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.MachineLearningServices/stable/2018-01-01/MachineLearningServices.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Cache/stable/2018-01-01/RedisCache.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.AgFoodPlatform/stable/2018-01-01/AzureFarmBeats.json
```
### Customization
@@ -142,8 +134,7 @@ public class EventGridCustomization extends Customization {
" return Collections.unmodifiableMap(SYSTEM_EVENT_MAPPINGS);\n" +
" }\n" +
"\n" +
- " private SystemEventMappingNames() {\n" +
- " // No instances allowed" +
+ " private SystemEventMappingNames() { \n" +
" }";
@Override
diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java
index 9fd59529d17e4..254e37b16e662 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java
+++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java
@@ -162,14 +162,14 @@ private Mono getProperties(Map properties, Class respo
.handle((message, sink) -> {
if (RequestResponseUtils.isSuccessful(message)) {
sink.next(messageSerializer.deserialize(message, responseType));
- }
-
- final AmqpResponseCode statusCode = RequestResponseUtils.getStatusCode(message);
- final String statusDescription = RequestResponseUtils.getStatusDescription(message);
- final Throwable error = ExceptionUtil.amqpResponseCodeToException(statusCode.getValue(),
- statusDescription, channel.getErrorContext());
+ } else {
+ final AmqpResponseCode statusCode = RequestResponseUtils.getStatusCode(message);
+ final String statusDescription = RequestResponseUtils.getStatusDescription(message);
+ final Throwable error = ExceptionUtil.amqpResponseCodeToException(statusCode.getValue(),
+ statusDescription, channel.getErrorContext());
- sink.error(logger.logExceptionAsWarning(Exceptions.propagate(error)));
+ sink.error(logger.logExceptionAsWarning(Exceptions.propagate(error)));
+ }
}));
});
}
diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/AuthClient.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/AuthClient.java
index 9a4d5e61b1dbd..4295b6d4c81a7 100644
--- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/AuthClient.java
+++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/AuthClient.java
@@ -13,7 +13,7 @@
/**
* The REST client specific to getting an access token for Azure REST APIs.
*/
-class AuthClient extends DelegateRestClient {
+public class AuthClient extends DelegateRestClient {
/**
* Stores the Client ID fragment.
@@ -63,7 +63,7 @@ class AuthClient extends DelegateRestClient {
* The constructor creates a default RestClient.
*
*/
- AuthClient() {
+ public AuthClient() {
super(RestClientFactory.createClient());
}
@@ -91,13 +91,14 @@ public String getAccessToken(String resource, String identity) {
*
* @param resource the resource.
* @param tenantId the tenant ID.
+ * @param aadAuthenticationUrl the AAD authentication url
* @param clientId the client ID.
* @param clientSecret the client secret.
* @return the authorization token.
*/
public String getAccessToken(String resource, String aadAuthenticationUrl,
String tenantId, String clientId, String clientSecret) {
-
+
LOGGER.entering("AuthClient", "getAccessToken", new Object[]{
resource, tenantId, clientId, clientSecret});
LOGGER.info("Getting access token using client ID / client secret");
diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultClient.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultClient.java
index e1aad104359f1..bffc9a68ada17 100644
--- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultClient.java
+++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultClient.java
@@ -41,7 +41,7 @@
/**
* The REST client specific to Azure Key Vault.
*/
-class KeyVaultClient extends DelegateRestClient {
+public class KeyVaultClient extends DelegateRestClient {
/**
* Stores the logger.
@@ -118,7 +118,7 @@ class KeyVaultClient extends DelegateRestClient {
* @param clientId the client ID.
* @param clientSecret the client secret.
*/
- KeyVaultClient(final String keyVaultUri, final String tenantId, final String clientId, final String clientSecret) {
+ public KeyVaultClient(final String keyVaultUri, final String tenantId, final String clientId, final String clientSecret) {
this(keyVaultUri, tenantId, clientId, clientSecret, null);
}
@@ -186,7 +186,7 @@ private String getAccessToken() {
*
* @return the list of aliases.
*/
- List getAliases() {
+ public List getAliases() {
ArrayList result = new ArrayList<>();
HashMap headers = new HashMap<>();
headers.put("Authorization", "Bearer " + getAccessToken());
@@ -239,7 +239,7 @@ private CertificateBundle getCertificateBundle(String alias) {
* @param alias the alias.
* @return the certificate, or null if not found.
*/
- Certificate getCertificate(String alias) {
+ public Certificate getCertificate(String alias) {
LOGGER.entering("KeyVaultClient", "getCertificate", alias);
LOGGER.log(INFO, "Getting certificate for alias: {0}", alias);
X509Certificate certificate = null;
@@ -268,7 +268,7 @@ Certificate getCertificate(String alias) {
* @param password the password.
* @return the key.
*/
- Key getKey(String alias, char[] password) {
+ public Key getKey(String alias, char[] password) {
LOGGER.entering("KeyVaultClient", "getKey", new Object[]{alias, password});
LOGGER.log(INFO, "Getting key for alias: {0}", alias);
Key key = null;
diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/RestClient.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/RestClient.java
index 510262d5b810f..e23bed644170e 100644
--- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/RestClient.java
+++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/RestClient.java
@@ -8,7 +8,7 @@
/**
* The REST client API.
*/
-interface RestClient {
+public interface RestClient {
/**
* Issue a GET request.
@@ -24,6 +24,7 @@ interface RestClient {
*
* @param url the URL.
* @param body the request body.
+ * @param contentType the content type
* @return the response body as a string.
*/
String post(String url, String body, String contentType);
diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/module-info.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/module-info.java
new file mode 100644
index 0000000000000..c65dbd30e7d80
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/module-info.java
@@ -0,0 +1,15 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+/**
+ * This module info is only for development purpose. Maven shade plugin will ignore this file. The one actually deployed is src/main/module-info.java
+ */
+module azure.security.keyvault.jca {
+ requires java.logging;
+ requires org.apache.httpcomponents.httpclient;
+ requires org.apache.httpcomponents.httpcore;
+ requires com.fasterxml.jackson.databind;
+
+ exports com.azure.security.keyvault.jca;
+ exports com.azure.security.keyvault.jca.model;
+}
diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/module-info.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/module-info.java
index 9b77beae78ad0..8d6c3ea6045a6 100644
--- a/sdk/keyvault/azure-security-keyvault-jca/src/main/module-info.java
+++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/module-info.java
@@ -1,3 +1,10 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+
+/**
+ * This module info will be deployed instead of the one under src/main/java.
+ */
module azure.security.keyvault.jca {
requires java.logging;
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/test/TestModularization.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/test/TestModularization.java
new file mode 100644
index 0000000000000..85f7654d2b0e0
--- /dev/null
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/test/TestModularization.java
@@ -0,0 +1,16 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.security.keyvault.jca.test;
+
+import com.azure.security.keyvault.jca.KeyVaultJcaProvider;
+import com.azure.security.keyvault.jca.model.CertificateBundle;
+
+public class TestModularization {
+ /**
+ * Simply test compiling ok.
+ */
+ void testCompile() {
+ KeyVaultJcaProvider keyVaultJcaProvider = new KeyVaultJcaProvider();
+ CertificateBundle certificateBundle = new CertificateBundle();
+ }
+}
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/module-info.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/module-info.java
new file mode 100644
index 0000000000000..a558268220d6e
--- /dev/null
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/module-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+/**
+ * This is for testing the modularization of module azure.security.keyvault.jca
+ */
+module azure.security.keyvault.jca.test {
+ requires azure.security.keyvault.jca;
+}
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/AuthClientTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/AuthClientTest.java
similarity index 92%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/AuthClientTest.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/AuthClientTest.java
index 2e9de840fb1fc..e65ca3e0a5a06 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/AuthClientTest.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/AuthClientTest.java
@@ -1,8 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+import com.azure.security.keyvault.jca.AuthClient;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/JreKeyStoreTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/JreKeyStoreTest.java
similarity index 95%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/JreKeyStoreTest.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/JreKeyStoreTest.java
index 11fb18b66285b..4227eabccbb8c 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/JreKeyStoreTest.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/JreKeyStoreTest.java
@@ -1,8 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+import com.azure.security.keyvault.jca.JreCertificates;
+import com.azure.security.keyvault.jca.KeyVaultJcaProvider;
import org.apache.http.HttpResponse;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpGet;
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultCertificatesTest.java
similarity index 95%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultCertificatesTest.java
index 571067245f4a7..eb24818db85f3 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultCertificatesTest.java
@@ -1,8 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+import com.azure.security.keyvault.jca.KeyVaultCertificates;
+import com.azure.security.keyvault.jca.KeyVaultJcaProvider;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
@@ -16,7 +18,6 @@
import java.security.cert.X509Certificate;
import java.util.Base64;
-import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -55,7 +56,7 @@ public class KeyVaultCertificatesTest {
@BeforeAll
public static void setEnvironmentProperty() {
- PropertyConvertorUtils.putEnvironmentPropertyToSystemProperty(SYSTEM_PROPERTIES);
+ PropertyConvertorUtils.putEnvironmentPropertyToSystemProperty(PropertyConvertorUtils.SYSTEM_PROPERTIES);
KeyVaultJcaProvider provider = new KeyVaultJcaProvider();
Security.addProvider(provider);
certificateName = System.getenv("AZURE_KEYVAULT_CERTIFICATE_NAME");
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultClientTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultClientTest.java
similarity index 93%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultClientTest.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultClientTest.java
index 767aeb615eae9..622b0521882b4 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultClientTest.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultClientTest.java
@@ -1,8 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+import com.azure.security.keyvault.jca.KeyVaultClient;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultJcaProviderTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultJcaProviderTest.java
similarity index 83%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultJcaProviderTest.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultJcaProviderTest.java
index 77dffcecdb990..178af1895cfce 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultJcaProviderTest.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultJcaProviderTest.java
@@ -1,15 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+import com.azure.security.keyvault.jca.KeyVaultJcaProvider;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
import java.security.KeyStore;
import java.security.Security;
-import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES;
+import static com.azure.security.keyvault.jca.test.PropertyConvertorUtils.SYSTEM_PROPERTIES;
import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyManagerTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyManagerTest.java
similarity index 85%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyManagerTest.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyManagerTest.java
index 0190a24ee0a2b..8e4066e47581d 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyManagerTest.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyManagerTest.java
@@ -1,8 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+import com.azure.security.keyvault.jca.KeyVaultJcaProvider;
+import com.azure.security.keyvault.jca.KeyVaultKeyManager;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
@@ -14,7 +16,7 @@
import java.security.Security;
import java.security.cert.CertificateException;
-import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES;
+import static com.azure.security.keyvault.jca.test.PropertyConvertorUtils.SYSTEM_PROPERTIES;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@EnabledIfEnvironmentVariable(named = "AZURE_KEYVAULT_CERTIFICATE_NAME", matches = "myalias")
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyStoreTest.java
similarity index 95%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyStoreTest.java
index 7acae0be4fc20..f3c42e1937712 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyStoreTest.java
@@ -1,8 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+import com.azure.security.keyvault.jca.KeyVaultJcaProvider;
+import com.azure.security.keyvault.jca.KeyVaultKeyStore;
+import com.azure.security.keyvault.jca.KeyVaultLoadStoreParameter;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
@@ -17,7 +20,7 @@
import java.security.cert.X509Certificate;
import java.util.Base64;
-import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES;
+import static com.azure.security.keyvault.jca.test.PropertyConvertorUtils.SYSTEM_PROPERTIES;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/PropertyConvertorUtils.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/PropertyConvertorUtils.java
similarity index 93%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/PropertyConvertorUtils.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/PropertyConvertorUtils.java
index 0e960acfb9063..e94f475699b29 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/PropertyConvertorUtils.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/PropertyConvertorUtils.java
@@ -1,7 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+
+import com.azure.security.keyvault.jca.KeyVaultLoadStoreParameter;
import java.io.IOException;
import java.security.KeyStore;
diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/ServerSocketTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/ServerSocketTest.java
similarity index 96%
rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/ServerSocketTest.java
rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/ServerSocketTest.java
index 7329d53360a08..02164bb42c93d 100644
--- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/ServerSocketTest.java
+++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/ServerSocketTest.java
@@ -1,8 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.security.keyvault.jca;
+package com.azure.security.keyvault.jca.test;
+import com.azure.security.keyvault.jca.KeyVaultJcaProvider;
+import com.azure.security.keyvault.jca.KeyVaultTrustManagerFactoryProvider;
import org.apache.http.HttpResponse;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpGet;
@@ -33,7 +35,7 @@
import java.security.cert.X509Certificate;
import java.util.Map;
-import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES;
+import static com.azure.security.keyvault.jca.test.PropertyConvertorUtils.SYSTEM_PROPERTIES;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
diff --git a/sdk/monitor/azure-monitor-query/README.md b/sdk/monitor/azure-monitor-query/README.md
index 42edb93e036a9..281a0d9f93bfb 100644
--- a/sdk/monitor/azure-monitor-query/README.md
+++ b/sdk/monitor/azure-monitor-query/README.md
@@ -39,7 +39,7 @@ This client library provides access to query metrics and logs collected by Azure
```java
-LogsClient logsClient = new LogsClientBuilder()
+LogsQueryClient logsQueryClient = new LogsQueryClientBuilder()
.credential(tokenCredential)
.buildClient();
```
@@ -49,7 +49,7 @@ LogsClient logsClient = new LogsClientBuilder()
```java
-LogsAsyncClient logsAsyncClient = new LogsClientBuilder()
+LogsQueryAsyncClient logsQueryAsyncClient = new LogsQueryClientBuilder()
.credential(tokenCredential)
.buildAsyncClient();
```
@@ -58,7 +58,7 @@ LogsAsyncClient logsAsyncClient = new LogsClientBuilder()
```java
- LogsQueryResult queryResults = logsClient.queryLogs("{workspace-id}", "{kusto-query}",
+ LogsQueryResult queryResults = logsQueryClient.queryLogs("{workspace-id}", "{kusto-query}",
new QueryTimeSpan(Duration.ofDays(2)));
System.out.println("Number of tables = " + queryResults.getLogsTables().size());
@@ -90,13 +90,13 @@ LogsAsyncClient logsAsyncClient = new LogsClientBuilder()
+ "; value = " + logsTableCell.getValueAsString()));
}
}
-
+}
```
### Get logs for a query and read the response as a model type
```java
- LogsQueryResult queryResults = logsClient
+ LogsQueryResult queryResults = logsQueryClient
.queryLogs("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests", null);
// Sample to use a model type to read the results
@@ -217,16 +217,16 @@ LogsAsyncClient logsAsyncClient = new LogsClientBuilder()
```java
-LogsQueryBatch logsQueryBatch = new LogsQueryBatch()
+LogsBatchQuery logsBatchQuery = new LogsBatchQuery()
.addQuery("{workspace-id}", "{query-1}", new QueryTimeSpan(Duration.ofDays(2)))
.addQuery("{workspace-id}", "{query-2}", new QueryTimeSpan(Duration.ofDays(30)));
-LogsQueryBatchResultCollection batchResultCollection = logsClient
- .queryLogsBatchWithResponse(logsQueryBatch, Context.NONE).getValue();
+LogsBatchQueryResultCollection batchResultCollection = logsQueryClient
+ .queryLogsBatchWithResponse(logsBatchQuery, Context.NONE).getValue();
-List responses = batchResultCollection.getBatchResults();
+List responses = batchResultCollection.getBatchResults();
-for (LogsQueryBatchResult response : responses) {
+for (LogsBatchQueryResult response : responses) {
LogsQueryResult queryResult = response.getQueryResult();
// Sample to iterate by row
@@ -250,7 +250,7 @@ LogsQueryOptions options = new LogsQueryOptions("{workspace-id}",
.setServerTimeout(Duration.ofMinutes(10));
// make service call with these request options set as filter header
-Response response = logsClient.queryLogsWithResponse(options, Context.NONE);
+Response response = logsQueryClient.queryLogsWithResponse(options, Context.NONE);
LogsQueryResult logsQueryResult = response.getValue();
// Sample to iterate by row
@@ -267,7 +267,7 @@ for (LogsTable table : logsQueryResult.getLogsTables()) {
```java
-MetricsClient metricsClient = new MetricsClientBuilder()
+MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder()
.credential(tokenCredential)
.buildClient();
```
@@ -276,7 +276,7 @@ MetricsClient metricsClient = new MetricsClientBuilder()
```java
-MetricsAsyncClient metricsAsyncClient = new MetricsClientBuilder()
+MetricsQueryAsyncClient metricsQueryAsyncClient = new MetricsQueryClientBuilder()
.credential(tokenCredential)
.buildAsyncClient();
```
@@ -285,20 +285,20 @@ MetricsAsyncClient metricsAsyncClient = new MetricsClientBuilder()
```java
-Response metricsResponse = metricsClient
+Response metricsResponse = metricsQueryClient
.queryMetricsWithResponse(
"{resource-id}",
Arrays.asList("SuccessfulCalls"),
new MetricsQueryOptions()
.setMetricsNamespace("Microsoft.CognitiveServices/accounts")
- .setTimespan(Duration.ofDays(30).toString())
+ .setTimeSpan(new QueryTimeSpan(Duration.ofDays(30)))
.setInterval(Duration.ofHours(1))
.setTop(100)
.setAggregation(Arrays.asList(AggregationType.AVERAGE, AggregationType.COUNT)),
Context.NONE);
MetricsQueryResult metricsQueryResult = metricsResponse.getValue();
-List metrics = metricsQueryResult.getMetrics();
+List metrics = metricsQueryResult.getMetrics();
metrics.stream()
.forEach(metric -> {
System.out.println(metric.getMetricsName());
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsAsyncClient.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryAsyncClient.java
similarity index 58%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsAsyncClient.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryAsyncClient.java
index a845e17a7e196..ca38775fc3b4a 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsAsyncClient.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryAsyncClient.java
@@ -9,25 +9,26 @@
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.monitor.query.log.implementation.AzureLogAnalyticsImpl;
+import com.azure.monitor.query.log.implementation.models.BatchQueryRequest;
+import com.azure.monitor.query.log.implementation.models.BatchQueryResponse;
import com.azure.monitor.query.log.implementation.models.BatchRequest;
import com.azure.monitor.query.log.implementation.models.BatchResponse;
import com.azure.monitor.query.log.implementation.models.ErrorInfo;
import com.azure.monitor.query.log.implementation.models.ErrorResponseException;
-import com.azure.monitor.query.log.implementation.models.LogQueryRequest;
-import com.azure.monitor.query.log.implementation.models.LogQueryResponse;
-import com.azure.monitor.query.log.implementation.models.LogQueryResult;
import com.azure.monitor.query.log.implementation.models.QueryBody;
import com.azure.monitor.query.log.implementation.models.QueryResults;
import com.azure.monitor.query.log.implementation.models.Table;
-import com.azure.monitor.query.models.LogsQueryBatch;
-import com.azure.monitor.query.models.LogsQueryBatchResult;
-import com.azure.monitor.query.models.LogsQueryBatchResultCollection;
+import com.azure.monitor.query.models.LogsBatchQuery;
+import com.azure.monitor.query.models.LogsBatchQueryResult;
+import com.azure.monitor.query.models.LogsBatchQueryResultCollection;
+import com.azure.monitor.query.models.LogsQueryErrorDetail;
import com.azure.monitor.query.models.LogsQueryError;
-import com.azure.monitor.query.models.LogsQueryErrorDetails;
import com.azure.monitor.query.models.LogsQueryException;
import com.azure.monitor.query.models.LogsQueryOptions;
import com.azure.monitor.query.models.LogsQueryResult;
+import com.azure.monitor.query.models.LogsQueryStatistics;
import com.azure.monitor.query.models.LogsTable;
import com.azure.monitor.query.models.LogsTableCell;
import com.azure.monitor.query.models.LogsTableColumn;
@@ -38,7 +39,9 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@@ -47,8 +50,8 @@
/**
* The asynchronous client for querying Azure Monitor logs.
*/
-@ServiceClient(builder = LogsClientBuilder.class, isAsync = true)
-public final class LogsAsyncClient {
+@ServiceClient(builder = LogsQueryClientBuilder.class, isAsync = true)
+public final class LogsQueryAsyncClient {
private final AzureLogAnalyticsImpl innerClient;
@@ -56,7 +59,7 @@ public final class LogsAsyncClient {
* Constructor that has the inner generated client to make the service call.
* @param innerClient The inner generated client.
*/
- LogsAsyncClient(AzureLogAnalyticsImpl innerClient) {
+ LogsQueryAsyncClient(AzureLogAnalyticsImpl innerClient) {
this.innerClient = innerClient;
}
@@ -91,45 +94,45 @@ public Mono> queryLogsWithResponse(LogsQueryOptions op
* @return A collection of query results corresponding to the input batch of queries.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono queryLogsBatch(String workspaceId, List queries,
+ public Mono queryLogsBatch(String workspaceId, List queries,
QueryTimeSpan timeSpan) {
- LogsQueryBatch logsQueryBatch = new LogsQueryBatch();
- queries.forEach(query -> logsQueryBatch.addQuery(workspaceId, query, timeSpan));
- return queryLogsBatchWithResponse(logsQueryBatch).map(Response::getValue);
+ LogsBatchQuery logsBatchQuery = new LogsBatchQuery();
+ queries.forEach(query -> logsBatchQuery.addQuery(workspaceId, query, timeSpan));
+ return queryLogsBatchWithResponse(logsBatchQuery).map(Response::getValue);
}
/**
* Returns all the Azure Monitor logs matching the given batch of queries.
- * @param logsQueryBatch {@link LogsQueryBatch} containing a batch of queries.
+ * @param logsBatchQuery {@link LogsBatchQuery} containing a batch of queries.
* @return A collection of query results corresponding to the input batch of queries.@return
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> queryLogsBatchWithResponse(LogsQueryBatch logsQueryBatch) {
- return queryLogsBatchWithResponse(logsQueryBatch, Context.NONE);
+ public Mono> queryLogsBatchWithResponse(LogsBatchQuery logsBatchQuery) {
+ return queryLogsBatchWithResponse(logsBatchQuery, Context.NONE);
}
- Mono> queryLogsBatchWithResponse(LogsQueryBatch logsQueryBatch, Context context) {
- BatchRequest batchRequest = new BatchRequest();
+ Mono> queryLogsBatchWithResponse(LogsBatchQuery logsBatchQuery, Context context) {
AtomicInteger id = new AtomicInteger();
- List requests = logsQueryBatch.getQueries()
+ List requests = logsBatchQuery.getQueries()
.stream()
.map(query -> {
QueryBody body = new QueryBody(query.getQuery())
- .setWorkspaces(query.getWorkspaceNames())
- .setAzureResourceIds(query.getAzureResourceIds())
- .setQualifiedNames(query.getQualifiedWorkspaceNames())
- .setWorkspaceIds(query.getWorkspaceIds());
-
- return new LogQueryRequest()
- .setId(String.valueOf(id.incrementAndGet()))
- .setBody(body)
- .setWorkspace(query.getWorkspaceId())
+ .setWorkspaces(getAllWorkspaces(query));
+
+ String preferHeader = buildPreferHeaderString(query);
+
+ Map headers = new HashMap<>();
+ if (!CoreUtils.isNullOrEmpty(preferHeader)) {
+ headers.put("Prefer", preferHeader);
+ }
+ return new BatchQueryRequest(String.valueOf(id.incrementAndGet()), body, query.getWorkspaceId())
+ .setHeaders(headers)
.setPath("/query")
.setMethod("POST");
})
.collect(Collectors.toList());
- batchRequest.setRequests(requests);
+ BatchRequest batchRequest = new BatchRequest(requests);
return innerClient.getQueries().batchWithResponseAsync(batchRequest, context)
.onErrorMap(ex -> {
@@ -143,28 +146,53 @@ Mono> queryLogsBatchWithResponse(LogsQu
.map(this::convertToLogQueryBatchResult);
}
- private Response convertToLogQueryBatchResult(Response response) {
- List batchResults = new ArrayList<>();
- LogsQueryBatchResultCollection logsQueryBatchResultCollection = new LogsQueryBatchResultCollection(batchResults);
+ private String buildPreferHeaderString(LogsQueryOptions query) {
+ StringBuilder sb = new StringBuilder();
+ if (query.isIncludeRendering()) {
+ sb.append("include-render=true");
+ }
+
+ if (query.isIncludeStatistics()) {
+ if (sb.length() > 0) {
+ sb.append(",");
+ }
+ sb.append("include-statistics=true");
+ }
+
+ if (query.getServerTimeout() != null) {
+ if (sb.length() > 0) {
+ sb.append(",");
+ }
+ sb.append("wait=");
+ sb.append(query.getServerTimeout().getSeconds());
+ }
+
+ return sb.toString().isEmpty() ? null : sb.toString();
+ }
+
+ private Response convertToLogQueryBatchResult(Response response) {
+ List batchResults = new ArrayList<>();
+ LogsBatchQueryResultCollection logsBatchQueryResultCollection = new LogsBatchQueryResultCollection(batchResults);
BatchResponse batchResponse = response.getValue();
- for (LogQueryResponse singleQueryResponse : batchResponse.getResponses()) {
- LogsQueryBatchResult logsQueryBatchResult = new LogsQueryBatchResult(singleQueryResponse.getId(),
- singleQueryResponse.getStatus(), getLogsQueryResult(singleQueryResponse.getBody()),
- mapLogsQueryError(singleQueryResponse.getBody().getError()));
- batchResults.add(logsQueryBatchResult);
+
+ for (BatchQueryResponse singleQueryResponse : batchResponse.getResponses()) {
+
+ LogsBatchQueryResult logsBatchQueryResult = new LogsBatchQueryResult(singleQueryResponse.getId(),
+ singleQueryResponse.getStatus(), getLogsQueryResult(singleQueryResponse.getBody()));
+ batchResults.add(logsBatchQueryResult);
}
batchResults.sort(Comparator.comparingInt(o -> Integer.parseInt(o.getId())));
- return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), logsQueryBatchResultCollection);
+ return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), logsBatchQueryResultCollection);
}
- private LogsQueryErrorDetails mapLogsQueryError(ErrorInfo errors) {
+ private LogsQueryError mapLogsQueryError(ErrorInfo errors) {
if (errors != null) {
- List errorDetails = Collections.emptyList();
+ List errorDetails = Collections.emptyList();
if (errors.getDetails() != null) {
errorDetails = errors.getDetails()
.stream()
- .map(errorDetail -> new LogsQueryError(errorDetail.getCode(),
+ .map(errorDetail -> new LogsQueryErrorDetail(errorDetail.getCode(),
errorDetail.getMessage(),
errorDetail.getTarget(),
errorDetail.getValue(),
@@ -176,44 +204,25 @@ private LogsQueryErrorDetails mapLogsQueryError(ErrorInfo errors) {
ErrorInfo innerError = errors.getInnererror();
ErrorInfo currentError = errors.getInnererror();
while (currentError != null) {
- innerError = errors.getInnererror();
- currentError = errors.getInnererror();
+ innerError = currentError.getInnererror();
+ currentError = currentError.getInnererror();
}
String code = errors.getCode();
- if (!errors.getCode().equals(innerError.getCode())) {
+ if (errors.getCode() != null && innerError != null && errors.getCode().equals(innerError.getCode())) {
code = innerError.getCode();
}
- return new LogsQueryErrorDetails(errors.getMessage(), code, errorDetails);
+ return new LogsQueryError(errors.getMessage(), code, errorDetails);
}
return null;
}
Mono> queryLogsWithResponse(LogsQueryOptions options, Context context) {
- StringBuilder sb = new StringBuilder();
- if (options.isIncludeRendering()) {
- sb.append("include-render=true");
- }
-
- if (options.isIncludeStatistics()) {
- if (sb.length() > 0) {
- sb.append(";");
- }
- sb.append("include-statistics=true");
- }
-
- if (options.getServerTimeout() != null) {
- if (sb.length() > 0) {
- sb.append(";");
- }
- sb.append("wait=");
- sb.append(options.getServerTimeout().getSeconds());
- }
-
- String preferHeader = sb.toString().isEmpty() ? null : sb.toString();
+ String preferHeader = buildPreferHeaderString(options);
QueryBody queryBody = new QueryBody(options.getQuery());
if (options.getTimeSpan() != null) {
queryBody.setTimespan(options.getTimeSpan().toString());
}
+ queryBody.setWorkspaces(getAllWorkspaces(options));
return innerClient
.getQueries()
.executeWithResponseAsync(options.getWorkspaceId(),
@@ -239,64 +248,57 @@ private Response convertToLogQueryResult(Response
}
private LogsQueryResult getLogsQueryResult(QueryResults queryResults) {
- List tables = new ArrayList<>();
- LogsQueryResult logsQueryResult = new LogsQueryResult(tables);
-
- if (queryResults.getTables() == null) {
- return null;
- }
-
- for (Table table : queryResults.getTables()) {
- List tableCells = new ArrayList<>();
- List tableRows = new ArrayList<>();
- List tableColumns = new ArrayList<>();
- LogsTable logsTable = new LogsTable(tableCells, tableRows, tableColumns);
- tables.add(logsTable);
- List> rows = table.getRows();
-
- for (int i = 0; i < rows.size(); i++) {
- List row = rows.get(i);
- LogsTableRow tableRow = new LogsTableRow(i, new ArrayList<>());
- tableRows.add(tableRow);
- for (int j = 0; j < row.size(); j++) {
- LogsTableCell cell = new LogsTableCell(table.getColumns().get(j).getName(),
- table.getColumns().get(j).getType(), j, i, row.get(j));
- tableCells.add(cell);
- tableRow.getTableRow().add(cell);
+ List tables = null;
+
+ if (queryResults.getTables() != null) {
+ tables = new ArrayList<>();
+ for (Table table : queryResults.getTables()) {
+ List tableCells = new ArrayList<>();
+ List tableRows = new ArrayList<>();
+ List tableColumns = new ArrayList<>();
+ LogsTable logsTable = new LogsTable(tableCells, tableRows, tableColumns);
+ tables.add(logsTable);
+ List> rows = table.getRows();
+
+ for (int i = 0; i < rows.size(); i++) {
+ List row = rows.get(i);
+ LogsTableRow tableRow = new LogsTableRow(i, new ArrayList<>());
+ tableRows.add(tableRow);
+ for (int j = 0; j < row.size(); j++) {
+ LogsTableCell cell = new LogsTableCell(table.getColumns().get(j).getName(),
+ table.getColumns().get(j).getType(), j, i, row.get(j));
+ tableCells.add(cell);
+ tableRow.getTableRow().add(cell);
+ }
}
}
}
- return logsQueryResult;
- }
- private LogsQueryResult getLogsQueryResult(LogQueryResult queryResults) {
- List tables = new ArrayList<>();
- LogsQueryResult logsQueryResult = new LogsQueryResult(tables);
+ LogsQueryStatistics statistics = null;
- if (queryResults.getTables() == null) {
- return null;
+ if (queryResults.getStatistics() != null) {
+ statistics = new LogsQueryStatistics(queryResults.getStatistics());
}
- for (Table table : queryResults.getTables()) {
- List tableCells = new ArrayList<>();
- List tableRows = new ArrayList<>();
- List tableColumns = new ArrayList<>();
- LogsTable logsTable = new LogsTable(tableCells, tableRows, tableColumns);
- tables.add(logsTable);
- List> rows = table.getRows();
-
- for (int i = 0; i < rows.size(); i++) {
- List row = rows.get(i);
- LogsTableRow tableRow = new LogsTableRow(i, new ArrayList<>());
- tableRows.add(tableRow);
- for (int j = 0; j < row.size(); j++) {
- LogsTableCell cell = new LogsTableCell(table.getColumns().get(j).getName(),
- table.getColumns().get(j).getType(), j, i, row.get(j));
- tableCells.add(cell);
- tableRow.getTableRow().add(cell);
- }
- }
- }
+ LogsQueryResult logsQueryResult = new LogsQueryResult(tables, statistics,
+ mapLogsQueryError(queryResults.getError()));
return logsQueryResult;
}
+
+ private List getAllWorkspaces(LogsQueryOptions body) {
+ List allWorkspaces = new ArrayList<>();
+ if (!CoreUtils.isNullOrEmpty(body.getWorkspaceNames())) {
+ allWorkspaces.addAll(body.getWorkspaceNames());
+ }
+ if (!CoreUtils.isNullOrEmpty(body.getAzureResourceIds())) {
+ allWorkspaces.addAll(body.getAzureResourceIds());
+ }
+ if (!CoreUtils.isNullOrEmpty(body.getQualifiedWorkspaceNames())) {
+ allWorkspaces.addAll(body.getQualifiedWorkspaceNames());
+ }
+ if (!CoreUtils.isNullOrEmpty(body.getWorkspaceIds())) {
+ allWorkspaces.addAll(body.getWorkspaceIds());
+ }
+ return allWorkspaces;
+ }
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClient.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClient.java
similarity index 81%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClient.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClient.java
index 353203954b2f3..b5dc88ef33b12 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClient.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClient.java
@@ -8,8 +8,8 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
-import com.azure.monitor.query.models.LogsQueryBatch;
-import com.azure.monitor.query.models.LogsQueryBatchResultCollection;
+import com.azure.monitor.query.models.LogsBatchQuery;
+import com.azure.monitor.query.models.LogsBatchQueryResultCollection;
import com.azure.monitor.query.models.LogsQueryOptions;
import com.azure.monitor.query.models.LogsQueryResult;
import com.azure.monitor.query.models.QueryTimeSpan;
@@ -19,16 +19,16 @@
/**
* The synchronous client for querying Azure Monitor logs.
*/
-@ServiceClient(builder = LogsClientBuilder.class)
-public final class LogsClient {
+@ServiceClient(builder = LogsQueryClientBuilder.class)
+public final class LogsQueryClient {
- private final LogsAsyncClient asyncClient;
+ private final LogsQueryAsyncClient asyncClient;
/**
* Constructor that has the async client to make sync over async service calls.
* @param asyncClient The asynchronous client.
*/
- LogsClient(LogsAsyncClient asyncClient) {
+ LogsQueryClient(LogsQueryAsyncClient asyncClient) {
this.asyncClient = asyncClient;
}
@@ -63,19 +63,19 @@ public Response queryLogsWithResponse(LogsQueryOptions options,
* @return A collection of query results corresponding to the input batch of queries.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public LogsQueryBatchResultCollection queryLogsBatch(String workspaceId, List queries, QueryTimeSpan timeSpan) {
+ public LogsBatchQueryResultCollection queryLogsBatch(String workspaceId, List queries, QueryTimeSpan timeSpan) {
return asyncClient.queryLogsBatch(workspaceId, queries, timeSpan).block();
}
/**
* Returns all the Azure Monitor logs matching the given batch of queries.
- * @param logsQueryBatch {@link LogsQueryBatch} containing a batch of queries.
+ * @param logsBatchQuery {@link LogsBatchQuery} containing a batch of queries.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A collection of query results corresponding to the input batch of queries.@return
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response queryLogsBatchWithResponse(LogsQueryBatch logsQueryBatch, Context context) {
- return asyncClient.queryLogsBatchWithResponse(logsQueryBatch, context).block();
+ public Response queryLogsBatchWithResponse(LogsBatchQuery logsBatchQuery, Context context) {
+ return asyncClient.queryLogsBatchWithResponse(logsBatchQuery, context).block();
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClientBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClientBuilder.java
similarity index 60%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClientBuilder.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClientBuilder.java
index 31f07ccf55546..1aac0843d661d 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClientBuilder.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClientBuilder.java
@@ -16,21 +16,21 @@
import com.azure.monitor.query.log.implementation.AzureLogAnalyticsImplBuilder;
/**
- * Fluent builder for creating instances of {@link LogsClient} and {@link LogsAsyncClient}.
+ * Fluent builder for creating instances of {@link LogsQueryClient} and {@link LogsQueryAsyncClient}.
*/
-@ServiceClientBuilder(serviceClients = {LogsClient.class, LogsAsyncClient.class})
-public final class LogsClientBuilder {
- private final ClientLogger logger = new ClientLogger(LogsClientBuilder.class);
+@ServiceClientBuilder(serviceClients = {LogsQueryClient.class, LogsQueryAsyncClient.class})
+public final class LogsQueryClientBuilder {
+ private final ClientLogger logger = new ClientLogger(LogsQueryClientBuilder.class);
private final AzureLogAnalyticsImplBuilder innerLogBuilder = new AzureLogAnalyticsImplBuilder();
private ClientOptions clientOptions;
- private LogsServiceVersion serviceVersion;
+ private LogsQueryServiceVersion serviceVersion;
/**
* Sets the log query endpoint.
* @param endpoint the host value.
- * @return the {@link LogsClientBuilder}.
+ * @return the {@link LogsQueryClientBuilder}.
*/
- public LogsClientBuilder endpoint(String endpoint) {
+ public LogsQueryClientBuilder endpoint(String endpoint) {
innerLogBuilder.host(endpoint);
return this;
}
@@ -38,9 +38,9 @@ public LogsClientBuilder endpoint(String endpoint) {
/**
* Sets The HTTP pipeline to send requests through.
* @param pipeline the pipeline value.
- * @return the {@link LogsClientBuilder}.
+ * @return the {@link LogsQueryClientBuilder}.
*/
- public LogsClientBuilder pipeline(HttpPipeline pipeline) {
+ public LogsQueryClientBuilder pipeline(HttpPipeline pipeline) {
innerLogBuilder.pipeline(pipeline);
return this;
}
@@ -48,9 +48,9 @@ public LogsClientBuilder pipeline(HttpPipeline pipeline) {
/**
* Sets The HTTP client used to send the request.
* @param httpClient the httpClient value.
- * @return the {@link LogsClientBuilder}.
+ * @return the {@link LogsQueryClientBuilder}.
*/
- public LogsClientBuilder httpClient(HttpClient httpClient) {
+ public LogsQueryClientBuilder httpClient(HttpClient httpClient) {
innerLogBuilder.httpClient(httpClient);
return this;
}
@@ -58,9 +58,9 @@ public LogsClientBuilder httpClient(HttpClient httpClient) {
/**
* Sets The configuration store that is used during construction of the service client.
* @param configuration the configuration value.
- * @return the {@link LogsClientBuilder}.
+ * @return the {@link LogsQueryClientBuilder}.
*/
- public LogsClientBuilder configuration(Configuration configuration) {
+ public LogsQueryClientBuilder configuration(Configuration configuration) {
innerLogBuilder.configuration(configuration);
return this;
}
@@ -68,9 +68,9 @@ public LogsClientBuilder configuration(Configuration configuration) {
/**
* Sets The logging configuration for HTTP requests and responses.
* @param httpLogOptions the httpLogOptions value.
- * @return the {@link LogsClientBuilder}.
+ * @return the {@link LogsQueryClientBuilder}.
*/
- public LogsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
+ public LogsQueryClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
innerLogBuilder.httpLogOptions(httpLogOptions);
return this;
}
@@ -78,9 +78,9 @@ public LogsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
/**
* Sets The retry policy that will attempt to retry failed requests, if applicable.
* @param retryPolicy the retryPolicy value.
- * @return the {@link LogsClientBuilder}.
+ * @return the {@link LogsQueryClientBuilder}.
*/
- public LogsClientBuilder retryPolicy(RetryPolicy retryPolicy) {
+ public LogsQueryClientBuilder retryPolicy(RetryPolicy retryPolicy) {
innerLogBuilder.retryPolicy(retryPolicy);
return this;
}
@@ -88,9 +88,9 @@ public LogsClientBuilder retryPolicy(RetryPolicy retryPolicy) {
/**
* Adds a custom Http pipeline policy.
* @param customPolicy The custom Http pipeline policy to add.
- * @return the {@link LogsClientBuilder}.
+ * @return the {@link LogsQueryClientBuilder}.
*/
- public LogsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
+ public LogsQueryClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
innerLogBuilder.addPolicy(customPolicy);
return this;
}
@@ -98,9 +98,9 @@ public LogsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
/**
* Sets The TokenCredential used for authentication.
* @param tokenCredential the tokenCredential value.
- * @return the {@link LogsClientBuilder}.
+ * @return the {@link LogsQueryClientBuilder}.
*/
- public LogsClientBuilder credential(TokenCredential tokenCredential) {
+ public LogsQueryClientBuilder credential(TokenCredential tokenCredential) {
innerLogBuilder.credential(tokenCredential);
return this;
}
@@ -108,37 +108,37 @@ public LogsClientBuilder credential(TokenCredential tokenCredential) {
/**
* Set the {@link ClientOptions} used for creating the client.
* @param clientOptions The {@link ClientOptions}.
- * @return the {@link LogsClientBuilder}
+ * @return the {@link LogsQueryClientBuilder}
*/
- public LogsClientBuilder clientOptions(ClientOptions clientOptions) {
+ public LogsQueryClientBuilder clientOptions(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
return this;
}
/**
* The service version to use when creating the client.
- * @param serviceVersion The {@link LogsServiceVersion}.
- * @return the {@link LogsClientBuilder}
+ * @param serviceVersion The {@link LogsQueryServiceVersion}.
+ * @return the {@link LogsQueryClientBuilder}
*/
- public LogsClientBuilder serviceVersion(LogsServiceVersion serviceVersion) {
+ public LogsQueryClientBuilder serviceVersion(LogsQueryServiceVersion serviceVersion) {
this.serviceVersion = serviceVersion;
return this;
}
/**
* Creates a synchronous client with the configured options in this builder.
- * @return A synchronous {@link LogsClient}.
+ * @return A synchronous {@link LogsQueryClient}.
*/
- public LogsClient buildClient() {
- return new LogsClient(buildAsyncClient());
+ public LogsQueryClient buildClient() {
+ return new LogsQueryClient(buildAsyncClient());
}
/**
* Creates an asynchronous client with the configured options in this builder.
- * @return An asynchronous {@link LogsAsyncClient}.
+ * @return An asynchronous {@link LogsQueryAsyncClient}.
*/
- public LogsAsyncClient buildAsyncClient() {
+ public LogsQueryAsyncClient buildAsyncClient() {
logger.info("Using service version " + this.serviceVersion);
- return new LogsAsyncClient(innerLogBuilder.buildClient());
+ return new LogsQueryAsyncClient(innerLogBuilder.buildClient());
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsServiceVersion.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryServiceVersion.java
similarity index 80%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsServiceVersion.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryServiceVersion.java
index 486c0400cb8d6..27a2f0657ea83 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsServiceVersion.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryServiceVersion.java
@@ -8,7 +8,7 @@
/**
* The service version of the Logs service that can be queried to retrieved Azure Monitor logs.
*/
-public enum LogsServiceVersion implements ServiceVersion {
+public enum LogsQueryServiceVersion implements ServiceVersion {
V_1("v1");
String version;
@@ -17,7 +17,7 @@ public enum LogsServiceVersion implements ServiceVersion {
* The service version.
* @param version The service version.
*/
- LogsServiceVersion(String version) {
+ LogsQueryServiceVersion(String version) {
this.version = version;
}
@@ -25,7 +25,7 @@ public enum LogsServiceVersion implements ServiceVersion {
* Returns the latest supported service version by this library.
* @return The latest supported service version by this library.
*/
- public static LogsServiceVersion getLatest() {
+ public static LogsQueryServiceVersion getLatest() {
return V_1;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsAsyncClient.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryAsyncClient.java
similarity index 76%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsAsyncClient.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryAsyncClient.java
index fd932e6c12387..67ea597e42f54 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsAsyncClient.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryAsyncClient.java
@@ -12,20 +12,18 @@
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.monitor.query.metrics.implementation.MonitorManagementClientImpl;
-import com.azure.monitor.query.metrics.implementation.models.Metric;
-import com.azure.monitor.query.metrics.implementation.models.MetricValue;
import com.azure.monitor.query.metrics.implementation.models.MetricsResponse;
import com.azure.monitor.query.metrics.implementation.models.ResultType;
import com.azure.monitor.query.metrics.implementation.models.TimeSeriesElement;
import com.azure.monitor.query.metricsdefinitions.implementation.MetricsDefinitionsClientImpl;
import com.azure.monitor.query.metricsnamespaces.implementation.MetricsNamespacesClientImpl;
-import com.azure.monitor.query.models.MetricsDefinition;
-import com.azure.monitor.query.models.MetricsNamespace;
-import com.azure.monitor.query.models.Metrics;
+import com.azure.monitor.query.models.MetricDefinition;
+import com.azure.monitor.query.models.MetricNamespace;
+import com.azure.monitor.query.models.Metric;
import com.azure.monitor.query.models.MetricsQueryOptions;
import com.azure.monitor.query.models.MetricsQueryResult;
-import com.azure.monitor.query.models.MetricsTimeSeriesElement;
-import com.azure.monitor.query.models.MetricsValue;
+import com.azure.monitor.query.models.MetricTimeSeriesElement;
+import com.azure.monitor.query.models.MetricValue;
import reactor.core.publisher.Mono;
import java.time.OffsetDateTime;
@@ -37,15 +35,15 @@
/**
* The asynchronous client for querying Azure Monitor metrics.
*/
-@ServiceClient(builder = MetricsClientBuilder.class, isAsync = true)
-public final class MetricsAsyncClient {
+@ServiceClient(builder = MetricsQueryClientBuilder.class, isAsync = true)
+public final class MetricsQueryAsyncClient {
private final MonitorManagementClientImpl metricsClient;
private final MetricsNamespacesClientImpl metricsNamespaceClient;
private final MetricsDefinitionsClientImpl metricsDefinitionsClient;
- MetricsAsyncClient(MonitorManagementClientImpl metricsClient,
- MetricsNamespacesClientImpl metricsNamespaceClient,
- MetricsDefinitionsClientImpl metricsDefinitionsClients) {
+ MetricsQueryAsyncClient(MonitorManagementClientImpl metricsClient,
+ MetricsNamespacesClientImpl metricsNamespaceClient,
+ MetricsDefinitionsClientImpl metricsDefinitionsClients) {
this.metricsClient = metricsClient;
this.metricsNamespaceClient = metricsNamespaceClient;
this.metricsDefinitionsClient = metricsDefinitionsClients;
@@ -82,7 +80,7 @@ public Mono> queryMetricsWithResponse(String resour
* @return List of metrics namespaces.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listMetricsNamespace(String resourceUri, OffsetDateTime startTime) {
+ public PagedFlux listMetricsNamespace(String resourceUri, OffsetDateTime startTime) {
return metricsNamespaceClient
.getMetricNamespaces()
.listAsync(resourceUri, startTime.toString());
@@ -95,19 +93,19 @@ public PagedFlux listMetricsNamespace(String resourceUri, Offs
* @return List of metrics definitions.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listMetricsDefinition(String resourceUri, String metricsNamespace) {
+ public PagedFlux listMetricsDefinition(String resourceUri, String metricsNamespace) {
return metricsDefinitionsClient
.getMetricDefinitions()
.listAsync(resourceUri, metricsNamespace);
}
- PagedFlux listMetricsNamespace(String resourceUri, OffsetDateTime startTime, Context context) {
+ PagedFlux listMetricsNamespace(String resourceUri, OffsetDateTime startTime, Context context) {
return metricsNamespaceClient
.getMetricNamespaces()
.listAsync(resourceUri, startTime.toString(), context);
}
- PagedFlux listMetricsDefinition(String resourceUri, String metricsNamespace, Context context) {
+ PagedFlux listMetricsDefinition(String resourceUri, String metricsNamespace, Context context) {
return metricsDefinitionsClient.getMetricDefinitions()
.listAsync(resourceUri, metricsNamespace, context);
}
@@ -121,9 +119,10 @@ Mono> queryMetricsWithResponse(String resourceUri,
.map(type -> String.valueOf(type.ordinal()))
.collect(Collectors.joining(","));
}
+ String timespan = options.getTimeSpan() == null ? null : options.getTimeSpan().toString();
return metricsClient
.getMetrics()
- .listWithResponseAsync(resourceUri, options.getTimespan(), options.getInterval(),
+ .listWithResponseAsync(resourceUri, timespan, options.getInterval(),
String.join(",", metricsNames), aggregation, options.getTop(), options.getOrderby(),
options.getFilter(), ResultType.DATA, options.getMetricsNamespace(), context)
.map(response -> convertToMetricsQueryResult(response));
@@ -138,22 +137,22 @@ private Response convertToMetricsQueryResult(Response(response.getRequest(), response.getStatusCode(), response.getHeaders(), metricsQueryResult);
}
- private List mapMetrics(List value) {
+ private List mapMetrics(List value) {
return value.stream()
- .map(metric -> new Metrics(metric.getId(), metric.getType(), metric.getUnit(), metric.getName().getValue(),
+ .map(metric -> new Metric(metric.getId(), metric.getType(), metric.getUnit(), metric.getName().getValue(),
mapTimeSeries(metric.getTimeseries())))
.collect(Collectors.toList());
}
- private List mapTimeSeries(List timeseries) {
+ private List mapTimeSeries(List timeseries) {
return timeseries.stream()
- .map(timeSeriesElement -> new MetricsTimeSeriesElement(mapMetricsData(timeSeriesElement.getData())))
+ .map(timeSeriesElement -> new MetricTimeSeriesElement(mapMetricsData(timeSeriesElement.getData())))
.collect(Collectors.toList());
}
- private List mapMetricsData(List data) {
+ private List mapMetricsData(List data) {
return data.stream()
- .map(metricValue -> new MetricsValue(metricValue.getTimeStamp(),
+ .map(metricValue -> new MetricValue(metricValue.getTimeStamp(),
metricValue.getAverage(), metricValue.getMinimum(), metricValue.getMaximum(), metricValue.getTotal(),
metricValue.getCount()))
.collect(Collectors.toList());
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClient.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClient.java
similarity index 83%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClient.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClient.java
index 02f52090f85bb..78425efa0d3f9 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClient.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClient.java
@@ -9,8 +9,8 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
-import com.azure.monitor.query.models.MetricsDefinition;
-import com.azure.monitor.query.models.MetricsNamespace;
+import com.azure.monitor.query.models.MetricDefinition;
+import com.azure.monitor.query.models.MetricNamespace;
import com.azure.monitor.query.models.MetricsQueryOptions;
import com.azure.monitor.query.models.MetricsQueryResult;
@@ -20,11 +20,11 @@
/**
* The synchronous client for querying Azure Monitor metrics.
*/
-@ServiceClient(builder = MetricsClientBuilder.class)
-public final class MetricsClient {
- private final MetricsAsyncClient asyncClient;
+@ServiceClient(builder = MetricsQueryClientBuilder.class)
+public final class MetricsQueryClient {
+ private final MetricsQueryAsyncClient asyncClient;
- MetricsClient(MetricsAsyncClient asyncClient) {
+ MetricsQueryClient(MetricsQueryAsyncClient asyncClient) {
this.asyncClient = asyncClient;
}
@@ -62,7 +62,7 @@ public Response queryMetricsWithResponse(String resourceUri,
* @return List of metrics namespaces.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listMetricsNamespace(String resourceUri, OffsetDateTime startTime) {
+ public PagedIterable listMetricsNamespace(String resourceUri, OffsetDateTime startTime) {
return listMetricsNamespace(resourceUri, startTime, Context.NONE);
}
@@ -74,8 +74,8 @@ public PagedIterable listMetricsNamespace(String resourceUri,
* @return List of metrics namespaces.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listMetricsNamespace(String resourceUri, OffsetDateTime startTime,
- Context context) {
+ public PagedIterable listMetricsNamespace(String resourceUri, OffsetDateTime startTime,
+ Context context) {
return new PagedIterable<>(asyncClient.listMetricsNamespace(resourceUri, startTime, context));
}
@@ -86,7 +86,7 @@ public PagedIterable listMetricsNamespace(String resourceUri,
* @return List of metrics definitions.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PagedIterable listMetricsDefinition(String resourceUri, String metricsNamespace) {
+ public PagedIterable listMetricsDefinition(String resourceUri, String metricsNamespace) {
return listMetricsDefinition(resourceUri, metricsNamespace, Context.NONE);
}
@@ -98,8 +98,8 @@ public PagedIterable listMetricsDefinition(String resourceUri
* @return List of metrics definitions.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PagedIterable listMetricsDefinition(String resourceUri, String metricsNamespace,
- Context context) {
+ public PagedIterable listMetricsDefinition(String resourceUri, String metricsNamespace,
+ Context context) {
return new PagedIterable<>(asyncClient.listMetricsDefinition(resourceUri, metricsNamespace, context));
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClientBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClientBuilder.java
similarity index 75%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClientBuilder.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClientBuilder.java
index 6cb0ddaea9f8e..5167367d600c1 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClientBuilder.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClientBuilder.java
@@ -18,19 +18,19 @@
import com.azure.monitor.query.metricsnamespaces.implementation.MetricsNamespacesClientImplBuilder;
/**
- * Fluent builder for creating instances of {@link MetricsClient} and {@link MetricsAsyncClient}.
+ * Fluent builder for creating instances of {@link MetricsQueryClient} and {@link MetricsQueryAsyncClient}.
*/
-@ServiceClientBuilder(serviceClients = {MetricsClient.class, MetricsAsyncClient.class})
-public final class MetricsClientBuilder {
+@ServiceClientBuilder(serviceClients = {MetricsQueryClient.class, MetricsQueryAsyncClient.class})
+public final class MetricsQueryClientBuilder {
private final MonitorManagementClientImplBuilder innerMetricsBuilder = new MonitorManagementClientImplBuilder();
private final MetricsDefinitionsClientImplBuilder innerMetricsDefinitionsBuilder =
new MetricsDefinitionsClientImplBuilder();
private final MetricsNamespacesClientImplBuilder innerMetricsNamespaceBuilder =
new MetricsNamespacesClientImplBuilder();
- private final ClientLogger logger = new ClientLogger(MetricsClientBuilder.class);
+ private final ClientLogger logger = new ClientLogger(MetricsQueryClientBuilder.class);
private ClientOptions clientOptions;
- private MetricsServiceVersion serviceVersion;
+ private MetricsQueryServiceVersion serviceVersion;
/**
@@ -38,7 +38,7 @@ public final class MetricsClientBuilder {
* @param endpoint the host value.
* @return the MetricsClientBuilder.
*/
- public MetricsClientBuilder endpoint(String endpoint) {
+ public MetricsQueryClientBuilder endpoint(String endpoint) {
innerMetricsBuilder.host(endpoint);
innerMetricsDefinitionsBuilder.host(endpoint);
innerMetricsNamespaceBuilder.host(endpoint);
@@ -50,7 +50,7 @@ public MetricsClientBuilder endpoint(String endpoint) {
* @param pipeline the pipeline value.
* @return the MetricsClientBuilder.
*/
- public MetricsClientBuilder pipeline(HttpPipeline pipeline) {
+ public MetricsQueryClientBuilder pipeline(HttpPipeline pipeline) {
innerMetricsBuilder.pipeline(pipeline);
innerMetricsDefinitionsBuilder.pipeline(pipeline);
innerMetricsNamespaceBuilder.pipeline(pipeline);
@@ -62,7 +62,7 @@ public MetricsClientBuilder pipeline(HttpPipeline pipeline) {
* @param httpClient the httpClient value.
* @return the MetricsClientBuilder.
*/
- public MetricsClientBuilder httpClient(HttpClient httpClient) {
+ public MetricsQueryClientBuilder httpClient(HttpClient httpClient) {
innerMetricsBuilder.httpClient(httpClient);
innerMetricsDefinitionsBuilder.httpClient(httpClient);
innerMetricsNamespaceBuilder.httpClient(httpClient);
@@ -74,7 +74,7 @@ public MetricsClientBuilder httpClient(HttpClient httpClient) {
* @param configuration the configuration value.
* @return the MetricsClientBuilder.
*/
- public MetricsClientBuilder configuration(Configuration configuration) {
+ public MetricsQueryClientBuilder configuration(Configuration configuration) {
innerMetricsBuilder.configuration(configuration);
innerMetricsDefinitionsBuilder.configuration(configuration);
innerMetricsNamespaceBuilder.configuration(configuration);
@@ -86,7 +86,7 @@ public MetricsClientBuilder configuration(Configuration configuration) {
* @param httpLogOptions the httpLogOptions value.
* @return the MetricsClientBuilder.
*/
- public MetricsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
+ public MetricsQueryClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
innerMetricsBuilder.httpLogOptions(httpLogOptions);
innerMetricsDefinitionsBuilder.httpLogOptions(httpLogOptions);
innerMetricsNamespaceBuilder.httpLogOptions(httpLogOptions);
@@ -98,7 +98,7 @@ public MetricsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
* @param retryPolicy the retryPolicy value.
* @return the MetricsClientBuilder.
*/
- public MetricsClientBuilder retryPolicy(RetryPolicy retryPolicy) {
+ public MetricsQueryClientBuilder retryPolicy(RetryPolicy retryPolicy) {
innerMetricsBuilder.retryPolicy(retryPolicy);
innerMetricsDefinitionsBuilder.retryPolicy(retryPolicy);
innerMetricsNamespaceBuilder.retryPolicy(retryPolicy);
@@ -110,7 +110,7 @@ public MetricsClientBuilder retryPolicy(RetryPolicy retryPolicy) {
* @param customPolicy The custom Http pipeline policy to add.
* @return the MetricsClientBuilder.
*/
- public MetricsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
+ public MetricsQueryClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
innerMetricsBuilder.addPolicy(customPolicy);
innerMetricsDefinitionsBuilder.addPolicy(customPolicy);
innerMetricsNamespaceBuilder.addPolicy(customPolicy);
@@ -122,7 +122,7 @@ public MetricsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
* @param tokenCredential the tokenCredential value.
* @return the MetricsClientBuilder.
*/
- public MetricsClientBuilder credential(TokenCredential tokenCredential) {
+ public MetricsQueryClientBuilder credential(TokenCredential tokenCredential) {
innerMetricsBuilder.credential(tokenCredential);
innerMetricsDefinitionsBuilder.credential(tokenCredential);
innerMetricsNamespaceBuilder.credential(tokenCredential);
@@ -132,38 +132,38 @@ public MetricsClientBuilder credential(TokenCredential tokenCredential) {
/**
* Set the {@link ClientOptions} used for creating the client.
* @param clientOptions The {@link ClientOptions}.
- * @return the {@link MetricsClientBuilder}
+ * @return the {@link MetricsQueryClientBuilder}
*/
- public MetricsClientBuilder clientOptions(ClientOptions clientOptions) {
+ public MetricsQueryClientBuilder clientOptions(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
return this;
}
/**
* The service version to use when creating the client.
- * @param serviceVersion The {@link MetricsServiceVersion}.
- * @return the {@link MetricsClientBuilder}
+ * @param serviceVersion The {@link MetricsQueryServiceVersion}.
+ * @return the {@link MetricsQueryClientBuilder}
*/
- public MetricsClientBuilder serviceVersion(MetricsServiceVersion serviceVersion) {
+ public MetricsQueryClientBuilder serviceVersion(MetricsQueryServiceVersion serviceVersion) {
this.serviceVersion = serviceVersion;
return this;
}
/**
* Creates a synchronous client with the configured options in this builder.
- * @return A synchronous {@link MetricsClient}.
+ * @return A synchronous {@link MetricsQueryClient}.
*/
- public MetricsClient buildClient() {
- return new MetricsClient(buildAsyncClient());
+ public MetricsQueryClient buildClient() {
+ return new MetricsQueryClient(buildAsyncClient());
}
/**
* Creates an asynchronous client with the configured options in this builder.
- * @return An asynchronous {@link MetricsAsyncClient}.
+ * @return An asynchronous {@link MetricsQueryAsyncClient}.
*/
- public MetricsAsyncClient buildAsyncClient() {
+ public MetricsQueryAsyncClient buildAsyncClient() {
logger.info("Using service version " + this.serviceVersion);
- return new MetricsAsyncClient(innerMetricsBuilder.buildClient(),
+ return new MetricsQueryAsyncClient(innerMetricsBuilder.buildClient(),
innerMetricsNamespaceBuilder.buildClient(), innerMetricsDefinitionsBuilder.buildClient());
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsServiceVersion.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryServiceVersion.java
similarity index 80%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsServiceVersion.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryServiceVersion.java
index 70258c260a8f5..c06d87579cd39 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsServiceVersion.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryServiceVersion.java
@@ -8,7 +8,7 @@
/**
* The service version of the Metrics service that can be queried to retrieved Azure Monitor metrics.
*/
-public enum MetricsServiceVersion implements ServiceVersion {
+public enum MetricsQueryServiceVersion implements ServiceVersion {
V_1("v1");
String version;
@@ -17,7 +17,7 @@ public enum MetricsServiceVersion implements ServiceVersion {
* The service version.
* @param version The service version.
*/
- MetricsServiceVersion(String version) {
+ MetricsQueryServiceVersion(String version) {
this.version = version;
}
@@ -25,7 +25,7 @@ public enum MetricsServiceVersion implements ServiceVersion {
* Returns the latest supported service version by this library.
* @return The latest supported service version by this library.
*/
- public static MetricsServiceVersion getLatest() {
+ public static MetricsQueryServiceVersion getLatest() {
return V_1;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/QueriesImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/QueriesImpl.java
index ad8f18a58e0fc..6e5d14ca7167b 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/QueriesImpl.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/QueriesImpl.java
@@ -245,7 +245,7 @@ public Response getWithResponse(
* @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal.
* @param body The Analytics query. Learn more about the [Analytics query
* syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/).
- * @param prefer Optional. The prefer header to set server timeout,.
+ * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -277,7 +277,7 @@ public Mono> executeWithResponseAsync(String workspaceId,
* @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal.
* @param body The Analytics query. Learn more about the [Analytics query
* syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/).
- * @param prefer Optional. The prefer header to set server timeout,.
+ * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
@@ -310,7 +310,7 @@ public Mono> executeWithResponseAsync(
* @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal.
* @param body The Analytics query. Learn more about the [Analytics query
* syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/).
- * @param prefer Optional. The prefer header to set server timeout,.
+ * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -336,7 +336,7 @@ public Mono executeAsync(String workspaceId, QueryBody body, Strin
* @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal.
* @param body The Analytics query. Learn more about the [Analytics query
* syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/).
- * @param prefer Optional. The prefer header to set server timeout,.
+ * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
@@ -363,7 +363,7 @@ public Mono executeAsync(String workspaceId, QueryBody body, Strin
* @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal.
* @param body The Analytics query. Learn more about the [Analytics query
* syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/).
- * @param prefer Optional. The prefer header to set server timeout,.
+ * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -381,7 +381,7 @@ public QueryResults execute(String workspaceId, QueryBody body, String prefer) {
* @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal.
* @param body The Analytics query. Learn more about the [Analytics query
* syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/).
- * @param prefer Optional. The prefer header to set server timeout,.
+ * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
@@ -402,7 +402,7 @@ public Response executeWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response to a batch.
+ * @return response to a batch query.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> batchWithResponseAsync(BatchRequest body) {
@@ -428,7 +428,7 @@ public Mono> batchWithResponseAsync(BatchRequest body) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response to a batch.
+ * @return response to a batch query.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> batchWithResponseAsync(BatchRequest body, Context context) {
@@ -453,7 +453,7 @@ public Mono> batchWithResponseAsync(BatchRequest body, C
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response to a batch.
+ * @return response to a batch query.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono batchAsync(BatchRequest body) {
@@ -477,7 +477,7 @@ public Mono batchAsync(BatchRequest body) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response to a batch.
+ * @return response to a batch query.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono batchAsync(BatchRequest body, Context context) {
@@ -500,7 +500,7 @@ public Mono batchAsync(BatchRequest body, Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response to a batch.
+ * @return response to a batch query.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public BatchResponse batch(BatchRequest body) {
@@ -516,7 +516,7 @@ public BatchResponse batch(BatchRequest body) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response to a batch.
+ * @return response to a batch query.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response batchWithResponse(BatchRequest body, Context context) {
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryRequest.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryRequest.java
similarity index 70%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryRequest.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryRequest.java
index 4ec37a1b7d26f..5efb84caa3c8b 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryRequest.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryRequest.java
@@ -5,16 +5,17 @@
package com.azure.monitor.query.log.implementation.models;
import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** An single request in a batch. */
@Fluent
-public final class LogQueryRequest {
+public final class BatchQueryRequest {
/*
* The error details.
*/
- @JsonProperty(value = "id")
+ @JsonProperty(value = "id", required = true)
private String id;
/*
@@ -27,7 +28,7 @@ public final class LogQueryRequest {
* The Analytics query. Learn more about the [Analytics query
* syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)
*/
- @JsonProperty(value = "body")
+ @JsonProperty(value = "body", required = true)
private QueryBody body;
/*
@@ -45,27 +46,33 @@ public final class LogQueryRequest {
/*
* Workspace Id to be included in the query
*/
- @JsonProperty(value = "workspace")
+ @JsonProperty(value = "workspace", required = true)
private String workspace;
/**
- * Get the id property: The error details.
+ * Creates an instance of BatchQueryRequest class.
*
- * @return the id value.
+ * @param id the id value to set.
+ * @param body the body value to set.
+ * @param workspace the workspace value to set.
*/
- public String getId() {
- return this.id;
+ @JsonCreator
+ public BatchQueryRequest(
+ @JsonProperty(value = "id", required = true) String id,
+ @JsonProperty(value = "body", required = true) QueryBody body,
+ @JsonProperty(value = "workspace", required = true) String workspace) {
+ this.id = id;
+ this.body = body;
+ this.workspace = workspace;
}
/**
- * Set the id property: The error details.
+ * Get the id property: The error details.
*
- * @param id the id value to set.
- * @return the LogQueryRequest object itself.
+ * @return the id value.
*/
- public LogQueryRequest setId(String id) {
- this.id = id;
- return this;
+ public String getId() {
+ return this.id;
}
/**
@@ -81,9 +88,9 @@ public Map getHeaders() {
* Set the headers property: Dictionary of <string>.
*
* @param headers the headers value to set.
- * @return the LogQueryRequest object itself.
+ * @return the BatchQueryRequest object itself.
*/
- public LogQueryRequest setHeaders(Map headers) {
+ public BatchQueryRequest setHeaders(Map headers) {
this.headers = headers;
return this;
}
@@ -98,18 +105,6 @@ public QueryBody getBody() {
return this.body;
}
- /**
- * Set the body property: The Analytics query. Learn more about the [Analytics query
- * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/).
- *
- * @param body the body value to set.
- * @return the LogQueryRequest object itself.
- */
- public LogQueryRequest setBody(QueryBody body) {
- this.body = body;
- return this;
- }
-
/**
* Get the path property: The path property.
*
@@ -123,9 +118,9 @@ public String getPath() {
* Set the path property: The path property.
*
* @param path the path value to set.
- * @return the LogQueryRequest object itself.
+ * @return the BatchQueryRequest object itself.
*/
- public LogQueryRequest setPath(String path) {
+ public BatchQueryRequest setPath(String path) {
this.path = path;
return this;
}
@@ -143,9 +138,9 @@ public String getMethod() {
* Set the method property: The method property.
*
* @param method the method value to set.
- * @return the LogQueryRequest object itself.
+ * @return the BatchQueryRequest object itself.
*/
- public LogQueryRequest setMethod(String method) {
+ public BatchQueryRequest setMethod(String method) {
this.method = method;
return this;
}
@@ -159,25 +154,22 @@ public String getWorkspace() {
return this.workspace;
}
- /**
- * Set the workspace property: Workspace Id to be included in the query.
- *
- * @param workspace the workspace value to set.
- * @return the LogQueryRequest object itself.
- */
- public LogQueryRequest setWorkspace(String workspace) {
- this.workspace = workspace;
- return this;
- }
-
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (getBody() != null) {
+ if (getId() == null) {
+ throw new IllegalArgumentException("Missing required property id in model BatchQueryRequest");
+ }
+ if (getBody() == null) {
+ throw new IllegalArgumentException("Missing required property body in model BatchQueryRequest");
+ } else {
getBody().validate();
}
+ if (getWorkspace() == null) {
+ throw new IllegalArgumentException("Missing required property workspace in model BatchQueryRequest");
+ }
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryResponse.java
similarity index 73%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResponse.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryResponse.java
index e85f70123985e..2808ee98a7856 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResponse.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryResponse.java
@@ -8,9 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** The LogQueryResponse model. */
+/** The BatchQueryResponse model. */
@Fluent
-public final class LogQueryResponse {
+public final class BatchQueryResponse {
/*
* The id property.
*/
@@ -24,11 +24,10 @@ public final class LogQueryResponse {
private Integer status;
/*
- * Contains the tables, columns & rows resulting from the query or the
- * error details if the query failed.
+ * Contains the tables, columns & rows resulting from a query.
*/
@JsonProperty(value = "body")
- private LogQueryResult body;
+ private QueryResults body;
/*
* Dictionary of
@@ -49,9 +48,9 @@ public String getId() {
* Set the id property: The id property.
*
* @param id the id value to set.
- * @return the LogQueryResponse object itself.
+ * @return the BatchQueryResponse object itself.
*/
- public LogQueryResponse setId(String id) {
+ public BatchQueryResponse setId(String id) {
this.id = id;
return this;
}
@@ -69,31 +68,29 @@ public Integer getStatus() {
* Set the status property: The status property.
*
* @param status the status value to set.
- * @return the LogQueryResponse object itself.
+ * @return the BatchQueryResponse object itself.
*/
- public LogQueryResponse setStatus(Integer status) {
+ public BatchQueryResponse setStatus(Integer status) {
this.status = status;
return this;
}
/**
- * Get the body property: Contains the tables, columns & rows resulting from the query or the error details if
- * the query failed.
+ * Get the body property: Contains the tables, columns & rows resulting from a query.
*
* @return the body value.
*/
- public LogQueryResult getBody() {
+ public QueryResults getBody() {
return this.body;
}
/**
- * Set the body property: Contains the tables, columns & rows resulting from the query or the error details if
- * the query failed.
+ * Set the body property: Contains the tables, columns & rows resulting from a query.
*
* @param body the body value to set.
- * @return the LogQueryResponse object itself.
+ * @return the BatchQueryResponse object itself.
*/
- public LogQueryResponse setBody(LogQueryResult body) {
+ public BatchQueryResponse setBody(QueryResults body) {
this.body = body;
return this;
}
@@ -111,9 +108,9 @@ public Map getHeaders() {
* Set the headers property: Dictionary of <string>.
*
* @param headers the headers value to set.
- * @return the LogQueryResponse object itself.
+ * @return the BatchQueryResponse object itself.
*/
- public LogQueryResponse setHeaders(Map headers) {
+ public BatchQueryResponse setHeaders(Map headers) {
this.headers = headers;
return this;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchRequest.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchRequest.java
index d87c285cb6ae1..9c3fa4535b876 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchRequest.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchRequest.java
@@ -5,6 +5,7 @@
package com.azure.monitor.query.log.implementation.models;
import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -14,27 +15,26 @@ public final class BatchRequest {
/*
* An single request in a batch.
*/
- @JsonProperty(value = "requests")
- private List requests;
+ @JsonProperty(value = "requests", required = true)
+ private List requests;
/**
- * Get the requests property: An single request in a batch.
+ * Creates an instance of BatchRequest class.
*
- * @return the requests value.
+ * @param requests the requests value to set.
*/
- public List getRequests() {
- return this.requests;
+ @JsonCreator
+ public BatchRequest(@JsonProperty(value = "requests", required = true) List requests) {
+ this.requests = requests;
}
/**
- * Set the requests property: An single request in a batch.
+ * Get the requests property: An single request in a batch.
*
- * @param requests the requests value to set.
- * @return the BatchRequest object itself.
+ * @return the requests value.
*/
- public BatchRequest setRequests(List requests) {
- this.requests = requests;
- return this;
+ public List getRequests() {
+ return this.requests;
}
/**
@@ -43,7 +43,9 @@ public BatchRequest setRequests(List requests) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (getRequests() != null) {
+ if (getRequests() == null) {
+ throw new IllegalArgumentException("Missing required property requests in model BatchRequest");
+ } else {
getRequests().forEach(e -> e.validate());
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchResponse.java
index d717938fb9177..1fef944fb8aab 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchResponse.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchResponse.java
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** Response to a batch. */
+/** Response to a batch query. */
@Fluent
public final class BatchResponse {
/*
@@ -16,14 +16,14 @@ public final class BatchResponse {
* batch.
*/
@JsonProperty(value = "responses")
- private List responses;
+ private List responses;
/**
* Get the responses property: An array of responses corresponding to each individual request in a batch.
*
* @return the responses value.
*/
- public List getResponses() {
+ public List getResponses() {
return this.responses;
}
@@ -33,7 +33,7 @@ public List getResponses() {
* @param responses the responses value to set.
* @return the BatchResponse object itself.
*/
- public BatchResponse setResponses(List responses) {
+ public BatchResponse setResponses(List responses) {
this.responses = responses;
return this;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/Column.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/Column.java
index 78d3a04036179..dfb3306168ec7 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/Column.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/Column.java
@@ -5,7 +5,7 @@
package com.azure.monitor.query.log.implementation.models;
import com.azure.core.annotation.Fluent;
-import com.azure.monitor.query.models.ColumnDataType;
+import com.azure.monitor.query.models.LogsColumnType;
import com.fasterxml.jackson.annotation.JsonProperty;
/** A column in a table. */
@@ -21,7 +21,7 @@ public final class Column {
* The data type of this column.
*/
@JsonProperty(value = "type")
- private ColumnDataType type;
+ private LogsColumnType type;
/**
* Get the name property: The name of this column.
@@ -48,7 +48,7 @@ public Column setName(String name) {
*
* @return the type value.
*/
- public ColumnDataType getType() {
+ public LogsColumnType getType() {
return this.type;
}
@@ -58,7 +58,7 @@ public ColumnDataType getType() {
* @param type the type value to set.
* @return the Column object itself.
*/
- public Column setType(ColumnDataType type) {
+ public Column setType(LogsColumnType type) {
this.type = type;
return this;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResult.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResult.java
deleted file mode 100644
index 0fa6775fba390..0000000000000
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResult.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.monitor.query.log.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** Contains the tables, columns & rows resulting from the query or the error details if the query failed. */
-@Fluent
-public final class LogQueryResult {
- /*
- * The list of tables, columns and rows.
- */
- @JsonProperty(value = "tables")
- private List tables;
-
- /*
- * The code and message for an error.
- */
- @JsonProperty(value = "error")
- private ErrorInfo error;
-
- /**
- * Get the tables property: The list of tables, columns and rows.
- *
- * @return the tables value.
- */
- public List getTables() {
- return this.tables;
- }
-
- /**
- * Set the tables property: The list of tables, columns and rows.
- *
- * @param tables the tables value to set.
- * @return the LogQueryResult object itself.
- */
- public LogQueryResult setTables(List tables) {
- this.tables = tables;
- return this;
- }
-
- /**
- * Get the error property: The code and message for an error.
- *
- * @return the error value.
- */
- public ErrorInfo getError() {
- return this.error;
- }
-
- /**
- * Set the error property: The code and message for an error.
- *
- * @param error the error value to set.
- * @return the LogQueryResult object itself.
- */
- public LogQueryResult setError(ErrorInfo error) {
- this.error = error;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (getTables() != null) {
- getTables().forEach(e -> e.validate());
- }
- if (getError() != null) {
- getError().validate();
- }
- }
-}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/MetadataColumnDataType.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/MetadataColumnDataType.java
index cd5fe6ddb8317..4b5c126e587c4 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/MetadataColumnDataType.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/MetadataColumnDataType.java
@@ -31,6 +31,15 @@ public final class MetadataColumnDataType extends ExpandableStringEnum workspaces;
- /*
- * A list of qualified workspace names that are included in the query.
- */
- @JsonProperty(value = "qualifiedNames")
- private List qualifiedNames;
-
- /*
- * A list of workspace IDs that are included in the query.
- */
- @JsonProperty(value = "workspaceIds")
- private List workspaceIds;
-
- /*
- * A list of Azure resource IDs that are included in the query.
- */
- @JsonProperty(value = "azureResourceIds")
- private List azureResourceIds;
-
/**
* Creates an instance of QueryBody class.
*
@@ -114,66 +96,6 @@ public QueryBody setWorkspaces(List workspaces) {
return this;
}
- /**
- * Get the qualifiedNames property: A list of qualified workspace names that are included in the query.
- *
- * @return the qualifiedNames value.
- */
- public List getQualifiedNames() {
- return this.qualifiedNames;
- }
-
- /**
- * Set the qualifiedNames property: A list of qualified workspace names that are included in the query.
- *
- * @param qualifiedNames the qualifiedNames value to set.
- * @return the QueryBody object itself.
- */
- public QueryBody setQualifiedNames(List qualifiedNames) {
- this.qualifiedNames = qualifiedNames;
- return this;
- }
-
- /**
- * Get the workspaceIds property: A list of workspace IDs that are included in the query.
- *
- * @return the workspaceIds value.
- */
- public List getWorkspaceIds() {
- return this.workspaceIds;
- }
-
- /**
- * Set the workspaceIds property: A list of workspace IDs that are included in the query.
- *
- * @param workspaceIds the workspaceIds value to set.
- * @return the QueryBody object itself.
- */
- public QueryBody setWorkspaceIds(List workspaceIds) {
- this.workspaceIds = workspaceIds;
- return this;
- }
-
- /**
- * Get the azureResourceIds property: A list of Azure resource IDs that are included in the query.
- *
- * @return the azureResourceIds value.
- */
- public List getAzureResourceIds() {
- return this.azureResourceIds;
- }
-
- /**
- * Set the azureResourceIds property: A list of Azure resource IDs that are included in the query.
- *
- * @param azureResourceIds the azureResourceIds value to set.
- * @return the QueryBody object itself.
- */
- public QueryBody setAzureResourceIds(List azureResourceIds) {
- this.azureResourceIds = azureResourceIds;
- return this;
- }
-
/**
* Validates the instance.
*
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/QueryResults.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/QueryResults.java
index 17111b0fddf21..bdf22cebd1b1d 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/QueryResults.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/QueryResults.java
@@ -15,7 +15,7 @@ public final class QueryResults {
/*
* The list of tables, columns and rows.
*/
- @JsonProperty(value = "tables", required = true)
+ @JsonProperty(value = "tables")
private List tables;
/*
@@ -24,13 +24,19 @@ public final class QueryResults {
@JsonProperty(value = "statistics")
private Object statistics;
+ /*
+ * The code and message for an error.
+ */
+ @JsonProperty(value = "error")
+ private ErrorInfo error;
+
/**
* Creates an instance of QueryResults class.
*
* @param tables the tables value to set.
*/
@JsonCreator
- public QueryResults(@JsonProperty(value = "tables", required = true) List tables) {
+ public QueryResults(@JsonProperty(value = "tables") List tables) {
this.tables = tables;
}
@@ -63,6 +69,26 @@ public QueryResults setStatistics(Object statistics) {
return this;
}
+ /**
+ * Get the error property: The code and message for an error.
+ *
+ * @return the error value.
+ */
+ public ErrorInfo getError() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: The code and message for an error.
+ *
+ * @param error the error value to set.
+ * @return the QueryResults object itself.
+ */
+ public QueryResults setError(ErrorInfo error) {
+ this.error = error;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -74,5 +100,8 @@ public void validate() {
} else {
getTables().forEach(e -> e.validate());
}
+ if (getError() != null) {
+ getError().validate();
+ }
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metrics/implementation/models/Metric.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metrics/implementation/models/Metric.java
index ecdafe8d53dde..ac4f76ac3d65e 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metrics/implementation/models/Metric.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metrics/implementation/models/Metric.java
@@ -5,7 +5,7 @@
package com.azure.monitor.query.metrics.implementation.models;
import com.azure.core.annotation.Fluent;
-import com.azure.monitor.query.models.MetricsUnit;
+import com.azure.monitor.query.models.MetricUnit;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -48,7 +48,7 @@ public final class Metric {
* the unit of the metric.
*/
@JsonProperty(value = "unit", required = true)
- private MetricsUnit unit;
+ private MetricUnit unit;
/*
* the time series returned when a data query is performed.
@@ -72,7 +72,7 @@ public Metric(
@JsonProperty(value = "type", required = true) String type,
@JsonProperty(value = "name", required = true) LocalizableString name,
@JsonProperty(value = "displayDescription", required = true) String displayDescription,
- @JsonProperty(value = "unit", required = true) MetricsUnit unit,
+ @JsonProperty(value = "unit", required = true) MetricUnit unit,
@JsonProperty(value = "timeseries", required = true) List timeseries) {
this.id = id;
this.type = type;
@@ -143,7 +143,7 @@ public Metric setErrorCode(String errorCode) {
*
* @return the unit value.
*/
- public MetricsUnit getUnit() {
+ public MetricUnit getUnit() {
return this.unit;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/MetricDefinitionsImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/MetricDefinitionsImpl.java
index e0dc9141c6f59..eb62da3d9243c 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/MetricDefinitionsImpl.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/MetricDefinitionsImpl.java
@@ -25,7 +25,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.monitor.query.metricsdefinitions.implementation.models.ErrorResponseException;
import com.azure.monitor.query.metricsdefinitions.implementation.models.MetricDefinitionCollection;
-import com.azure.monitor.query.models.MetricsDefinition;
+import com.azure.monitor.query.models.MetricDefinition;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in MetricDefinitions. */
@@ -78,7 +78,7 @@ Mono> list(
* @return represents collection of metric definitions.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> listSinglePageAsync(String resourceUri, String metricnamespace) {
+ public Mono> listSinglePageAsync(String resourceUri, String metricnamespace) {
if (this.client.getHost() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null."));
@@ -119,7 +119,7 @@ public Mono> listSinglePageAsync(String resourc
* @return represents collection of metric definitions.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> listSinglePageAsync(
+ public Mono> listSinglePageAsync(
String resourceUri, String metricnamespace, Context context) {
if (this.client.getHost() == null) {
return Mono.error(
@@ -158,7 +158,7 @@ public Mono> listSinglePageAsync(
* @return represents collection of metric definitions.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listAsync(String resourceUri, String metricnamespace) {
+ public PagedFlux listAsync(String resourceUri, String metricnamespace) {
return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, metricnamespace));
}
@@ -174,7 +174,7 @@ public PagedFlux listAsync(String resourceUri, String metricn
* @return represents collection of metric definitions.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listAsync(String resourceUri, String metricnamespace, Context context) {
+ public PagedFlux listAsync(String resourceUri, String metricnamespace, Context context) {
return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, metricnamespace, context));
}
@@ -189,7 +189,7 @@ public PagedFlux listAsync(String resourceUri, String metricn
* @return represents collection of metric definitions.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceUri, String metricnamespace) {
+ public PagedIterable list(String resourceUri, String metricnamespace) {
return new PagedIterable<>(listAsync(resourceUri, metricnamespace));
}
@@ -205,7 +205,7 @@ public PagedIterable list(String resourceUri, String metricna
* @return represents collection of metric definitions.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceUri, String metricnamespace, Context context) {
+ public PagedIterable list(String resourceUri, String metricnamespace, Context context) {
return new PagedIterable<>(listAsync(resourceUri, metricnamespace, context));
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/models/MetricDefinitionCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/models/MetricDefinitionCollection.java
index 42162aa1b0389..a7bf960396cb9 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/models/MetricDefinitionCollection.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/models/MetricDefinitionCollection.java
@@ -5,7 +5,7 @@
package com.azure.monitor.query.metricsdefinitions.implementation.models;
import com.azure.core.annotation.Fluent;
-import com.azure.monitor.query.models.MetricsDefinition;
+import com.azure.monitor.query.models.MetricDefinition;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -17,7 +17,7 @@ public final class MetricDefinitionCollection {
* the values for the metric definitions.
*/
@JsonProperty(value = "value", required = true)
- private List value;
+ private List value;
/**
* Creates an instance of MetricDefinitionCollection class.
@@ -25,7 +25,7 @@ public final class MetricDefinitionCollection {
* @param value the value value to set.
*/
@JsonCreator
- public MetricDefinitionCollection(@JsonProperty(value = "value", required = true) List value) {
+ public MetricDefinitionCollection(@JsonProperty(value = "value", required = true) List value) {
this.value = value;
}
@@ -34,7 +34,7 @@ public MetricDefinitionCollection(@JsonProperty(value = "value", required = true
*
* @return the value value.
*/
- public List getValue() {
+ public List getValue() {
return this.value;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/MetricNamespacesImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/MetricNamespacesImpl.java
index 4cd7e9b1b1093..81ad0dc4839a6 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/MetricNamespacesImpl.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/MetricNamespacesImpl.java
@@ -24,7 +24,7 @@
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.monitor.query.metricsnamespaces.implementation.models.ErrorResponseException;
-import com.azure.monitor.query.models.MetricsNamespace;
+import com.azure.monitor.query.models.MetricNamespace;
import com.azure.monitor.query.metricsnamespaces.implementation.models.MetricNamespaceCollection;
import reactor.core.publisher.Mono;
@@ -78,7 +78,7 @@ Mono> list(
* @return represents collection of metric namespaces.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> listSinglePageAsync(String resourceUri, String startTime) {
+ public Mono> listSinglePageAsync(String resourceUri, String startTime) {
if (this.client.getHost() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null."));
@@ -119,7 +119,7 @@ public Mono> listSinglePageAsync(String resource
* @return represents collection of metric namespaces.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> listSinglePageAsync(
+ public Mono> listSinglePageAsync(
String resourceUri, String startTime, Context context) {
if (this.client.getHost() == null) {
return Mono.error(
@@ -152,7 +152,7 @@ public Mono> listSinglePageAsync(
* @return represents collection of metric namespaces.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listAsync(String resourceUri, String startTime) {
+ public PagedFlux listAsync(String resourceUri, String startTime) {
return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, startTime));
}
@@ -168,7 +168,7 @@ public PagedFlux listAsync(String resourceUri, String startTim
* @return represents collection of metric namespaces.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listAsync(String resourceUri, String startTime, Context context) {
+ public PagedFlux listAsync(String resourceUri, String startTime, Context context) {
return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, startTime, context));
}
@@ -183,7 +183,7 @@ public PagedFlux listAsync(String resourceUri, String startTim
* @return represents collection of metric namespaces.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceUri, String startTime) {
+ public PagedIterable list(String resourceUri, String startTime) {
return new PagedIterable<>(listAsync(resourceUri, startTime));
}
@@ -199,7 +199,7 @@ public PagedIterable list(String resourceUri, String startTime
* @return represents collection of metric namespaces.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceUri, String startTime, Context context) {
+ public PagedIterable list(String resourceUri, String startTime, Context context) {
return new PagedIterable<>(listAsync(resourceUri, startTime, context));
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/models/MetricNamespaceCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/models/MetricNamespaceCollection.java
index 755de060a23e0..bb56e3f5e6a82 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/models/MetricNamespaceCollection.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/models/MetricNamespaceCollection.java
@@ -5,7 +5,7 @@
package com.azure.monitor.query.metricsnamespaces.implementation.models;
import com.azure.core.annotation.Fluent;
-import com.azure.monitor.query.models.MetricsNamespace;
+import com.azure.monitor.query.models.MetricNamespace;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -17,7 +17,7 @@ public final class MetricNamespaceCollection {
* The values for the metric namespaces.
*/
@JsonProperty(value = "value", required = true)
- private List value;
+ private List value;
/**
* Creates an instance of MetricNamespaceCollection class.
@@ -25,7 +25,7 @@ public final class MetricNamespaceCollection {
* @param value the value value to set.
*/
@JsonCreator
- public MetricNamespaceCollection(@JsonProperty(value = "value", required = true) List value) {
+ public MetricNamespaceCollection(@JsonProperty(value = "value", required = true) List value) {
this.value = value;
}
@@ -34,7 +34,7 @@ public MetricNamespaceCollection(@JsonProperty(value = "value", required = true)
*
* @return the value value.
*/
- public List getValue() {
+ public List getValue() {
return this.value;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/ColumnDataType.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/ColumnDataType.java
deleted file mode 100644
index 4afbb7360cbcf..0000000000000
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/ColumnDataType.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.monitor.query.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for ColumnDataType. */
-public final class ColumnDataType extends ExpandableStringEnum {
- /** Static value bool for ColumnDataType. */
- public static final ColumnDataType BOOL = fromString("bool");
-
- /** Static value datetime for ColumnDataType. */
- public static final ColumnDataType DATETIME = fromString("datetime");
-
- /** Static value dynamic for ColumnDataType. */
- public static final ColumnDataType DYNAMIC = fromString("dynamic");
-
- /** Static value int for ColumnDataType. */
- public static final ColumnDataType INT = fromString("int");
-
- /** Static value long for ColumnDataType. */
- public static final ColumnDataType LONG = fromString("long");
-
- /** Static value real for ColumnDataType. */
- public static final ColumnDataType REAL = fromString("real");
-
- /** Static value string for ColumnDataType. */
- public static final ColumnDataType STRING = fromString("string");
-
- /**
- * Creates or finds a ColumnDataType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding ColumnDataType.
- */
- @JsonCreator
- public static ColumnDataType fromString(String name) {
- return fromString(name, ColumnDataType.class);
- }
-
- /** @return known ColumnDataType values. */
- public static Collection values() {
- return values(ColumnDataType.class);
- }
-}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatch.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQuery.java
similarity index 81%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatch.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQuery.java
index 2788fa274d3a3..e2a6ce151c2eb 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatch.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQuery.java
@@ -12,7 +12,7 @@
* A fluent class to create a batch of logs queries.
*/
@Fluent
-public final class LogsQueryBatch {
+public final class LogsBatchQuery {
private final List queries = new ArrayList<>();
@@ -21,9 +21,9 @@ public final class LogsQueryBatch {
* @param workspaceId The workspaceId on which the query is executed.
* @param query The Kusto query.
* @param timeSpan The time period for which the logs should be queried.
- * @return The updated {@link LogsQueryBatch}.
+ * @return The updated {@link LogsBatchQuery}.
*/
- public LogsQueryBatch addQuery(String workspaceId, String query, QueryTimeSpan timeSpan) {
+ public LogsBatchQuery addQuery(String workspaceId, String query, QueryTimeSpan timeSpan) {
queries.add(new LogsQueryOptions(workspaceId, query, timeSpan));
return this;
}
@@ -31,9 +31,9 @@ public LogsQueryBatch addQuery(String workspaceId, String query, QueryTimeSpan t
/**
* Adds a new logs query to the batch.
* @param logsQueryOptions The logs query options
- * @return The updated {@link LogsQueryBatch}
+ * @return The updated {@link LogsBatchQuery}
*/
- public LogsQueryBatch addQuery(LogsQueryOptions logsQueryOptions) {
+ public LogsBatchQuery addQuery(LogsQueryOptions logsQueryOptions) {
queries.add(logsQueryOptions);
return this;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResult.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResult.java
similarity index 67%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResult.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResult.java
index 833ee330b5a63..a73ed5cb15555 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResult.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResult.java
@@ -9,24 +9,21 @@
* Class containing the result of a single logs query in a batch.
*/
@Immutable
-public final class LogsQueryBatchResult {
+public final class LogsBatchQueryResult {
private final String id;
private final int status;
private final LogsQueryResult queryResult;
- private final LogsQueryErrorDetails error;
/**
- * Creates an instance of {@link LogsQueryBatchResult} containing the result of a single logs query in a batch.
+ * Creates an instance of {@link LogsBatchQueryResult} containing the result of a single logs query in a batch.
* @param id The query id.
* @param status The response status of the query.
* @param queryResult The result of the query.
- * @param error The error details if the query failed to execute.
*/
- public LogsQueryBatchResult(String id, int status, LogsQueryResult queryResult, LogsQueryErrorDetails error) {
+ public LogsBatchQueryResult(String id, int status, LogsQueryResult queryResult) {
this.id = id;
this.status = status;
this.queryResult = queryResult;
- this.error = error;
}
/**
@@ -52,13 +49,5 @@ public int getStatus() {
public LogsQueryResult getQueryResult() {
return queryResult;
}
-
- /**
- * Returns the error details if the query failed to execute.
- * @return The error details.
- */
- public LogsQueryErrorDetails getError() {
- return error;
- }
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResultCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResultCollection.java
similarity index 69%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResultCollection.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResultCollection.java
index 9f0810eb66a45..c9cc1e853b0f6 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResultCollection.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResultCollection.java
@@ -11,14 +11,14 @@
* The collection wrapper to hold all results of a batch of logs queries.
*/
@Immutable
-public final class LogsQueryBatchResultCollection {
- private final List batchResults;
+public final class LogsBatchQueryResultCollection {
+ private final List batchResults;
/**
- * Creates an instance of {@link LogsQueryBatchResultCollection} to hold all results of a batch of logs queries.
+ * Creates an instance of {@link LogsBatchQueryResultCollection} to hold all results of a batch of logs queries.
* @param batchResults The results of a batch of logs queries.
*/
- public LogsQueryBatchResultCollection(List batchResults) {
+ public LogsBatchQueryResultCollection(List batchResults) {
this.batchResults = batchResults;
}
@@ -26,7 +26,7 @@ public LogsQueryBatchResultCollection(List batchResults) {
* Returns the results of a batch of logs queries.
* @return The results of a batch of logs queries.
*/
- public List getBatchResults() {
+ public List getBatchResults() {
return batchResults;
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsColumnType.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsColumnType.java
new file mode 100644
index 0000000000000..f4c1609aac602
--- /dev/null
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsColumnType.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.monitor.query.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for LogsColumnType. */
+public final class LogsColumnType extends ExpandableStringEnum {
+ /** Static value bool for LogsColumnType. */
+ public static final LogsColumnType BOOL = fromString("bool");
+
+ /** Static value datetime for LogsColumnType. */
+ public static final LogsColumnType DATETIME = fromString("datetime");
+
+ /** Static value dynamic for LogsColumnType. */
+ public static final LogsColumnType DYNAMIC = fromString("dynamic");
+
+ /** Static value int for LogsColumnType. */
+ public static final LogsColumnType INT = fromString("int");
+
+ /** Static value long for LogsColumnType. */
+ public static final LogsColumnType LONG = fromString("long");
+
+ /** Static value real for LogsColumnType. */
+ public static final LogsColumnType REAL = fromString("real");
+
+ /** Static value string for LogsColumnType. */
+ public static final LogsColumnType STRING = fromString("string");
+
+ /** Static value guid for LogsColumnType. */
+ public static final LogsColumnType GUID = fromString("guid");
+
+ /** Static value decimal for LogsColumnType. */
+ public static final LogsColumnType DECIMAL = fromString("decimal");
+
+ /** Static value timespan for LogsColumnType. */
+ public static final LogsColumnType TIMESPAN = fromString("timespan");
+
+ /**
+ * Creates or finds a LogsColumnType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding LogsColumnType.
+ */
+ @JsonCreator
+ public static LogsColumnType fromString(String name) {
+ return fromString(name, LogsColumnType.class);
+ }
+
+ /** @return known LogsColumnType values. */
+ public static Collection values() {
+ return values(LogsColumnType.class);
+ }
+}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryError.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryError.java
index 61d65c40006f2..7b144d6f69df1 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryError.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryError.java
@@ -3,112 +3,52 @@
package com.azure.monitor.query.models;
+import com.azure.core.annotation.Immutable;
+
import java.util.List;
/**
- * Error details of a failed log query.
+ * The error details of a failed log query.
*/
-
+@Immutable
public final class LogsQueryError {
- /*
- * The error's code.
- */
- private final String code;
-
- /*
- * A human readable error message.
- */
private final String message;
-
- /*
- * Indicates which property in the request is responsible for the error.
- */
- private final String target;
-
- /*
- * Indicates which value in 'target' is responsible for the error.
- */
- private final String value;
-
- /*
- * Indicates resources which were responsible for the error.
- */
- private final List resources;
-
- /*
- * Additional properties that can be provided on the error details object
- */
- private final Object additionalProperties;
+ private final String code;
+ private final List errors;
/**
- * Creates an instance of ErrorDetail class.
- * @param code the code value to set.
- * @param message the message value to set.
- * @param target indicates which property in the request is responsible for the error.
- * @param value indicates which value in 'target' is responsible for the error.
- * @param resources indicates resources which were responsible for the error.
- * @param additionalProperties additional properties that can be provided on the error details object
+ * Creates an instance of {@link LogsQueryError} with the failure code and target.
+ * @param message The error message.
+ * @param code The error code indicating the reason for the error.
+ * @param errors The list of additional error details.
*/
- public LogsQueryError(
- String code,
- String message,
- String target,
- String value,
- List resources,
- Object additionalProperties) {
- this.code = code;
+ public LogsQueryError(String message, String code, List errors) {
this.message = message;
- this.target = target;
- this.value = value;
- this.resources = resources;
- this.additionalProperties = additionalProperties;
- }
-
- /**
- * Get the code property: The error's code.
- * @return the code value.
- */
- public String getCode() {
- return this.code;
+ this.code = code;
+ this.errors = errors;
}
/**
- * Get the message property: A human readable error message.
- * @return the message value.
+ * Returns the error message.
+ * @return The error message.
*/
public String getMessage() {
- return this.message;
+ return message;
}
/**
- * Get the target property: Indicates which property in the request is responsible for the error.
- * @return the target value.
+ * Returns the error code indicating the reason for the error
+ * @return The error code indicating the reason for the error
*/
- public String getTarget() {
- return this.target;
- }
-
- /**
- * Get the value property: Indicates which value in 'target' is responsible for the error.
- * @return the value value.
- */
- public String getValue() {
- return this.value;
- }
-
- /**
- * Get the resources property: Indicates resources which were responsible for the error.
- * @return the resources value.
- */
- public List getResources() {
- return this.resources;
+ public String getCode() {
+ return code;
}
/**
- * Get the additionalProperties property: Additional properties that can be provided on the error details object.
- * @return the additionalProperties value.
+ * Returns the list of additional error details.
+ * @return the list of additional error details.
*/
- public Object getAdditionalProperties() {
- return this.additionalProperties;
+ public List getErrors() {
+ return errors;
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetail.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetail.java
new file mode 100644
index 0000000000000..dcde69e3efb08
--- /dev/null
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetail.java
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.monitor.query.models;
+
+import com.azure.core.annotation.Immutable;
+
+import java.util.List;
+
+/**
+ * Error details of a failed log query.
+ */
+@Immutable
+public final class LogsQueryErrorDetail {
+ /*
+ * The error's code.
+ */
+ private final String code;
+
+ /*
+ * A human readable error message.
+ */
+ private final String message;
+
+ /*
+ * Indicates which property in the request is responsible for the error.
+ */
+ private final String target;
+
+ /*
+ * Indicates which value in 'target' is responsible for the error.
+ */
+ private final String value;
+
+ /*
+ * Indicates resources which were responsible for the error.
+ */
+ private final List resources;
+
+ /*
+ * Additional properties that can be provided on the error details object
+ */
+ private final Object additionalProperties;
+
+ /**
+ * Creates an instance of ErrorDetail class.
+ * @param code the code value to set.
+ * @param message the message value to set.
+ * @param target indicates which property in the request is responsible for the error.
+ * @param value indicates which value in 'target' is responsible for the error.
+ * @param resources indicates resources which were responsible for the error.
+ * @param additionalProperties additional properties that can be provided on the error details object
+ */
+ public LogsQueryErrorDetail(
+ String code,
+ String message,
+ String target,
+ String value,
+ List resources,
+ Object additionalProperties) {
+ this.code = code;
+ this.message = message;
+ this.target = target;
+ this.value = value;
+ this.resources = resources;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * Get the code property: The error's code.
+ * @return the code value.
+ */
+ public String getCode() {
+ return this.code;
+ }
+
+ /**
+ * Get the message property: A human readable error message.
+ * @return the message value.
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * Get the target property: Indicates which property in the request is responsible for the error.
+ * @return the target value.
+ */
+ public String getTarget() {
+ return this.target;
+ }
+
+ /**
+ * Get the value property: Indicates which value in 'target' is responsible for the error.
+ * @return the value value.
+ */
+ public String getValue() {
+ return this.value;
+ }
+
+ /**
+ * Get the resources property: Indicates resources which were responsible for the error.
+ * @return the resources value.
+ */
+ public List getResources() {
+ return this.resources;
+ }
+
+ /**
+ * Get the additionalProperties property: Additional properties that can be provided on the error details object.
+ * @return the additionalProperties value.
+ */
+ public Object getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetails.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetails.java
deleted file mode 100644
index 86da66d534907..0000000000000
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetails.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.monitor.query.models;
-
-import com.azure.core.annotation.Immutable;
-
-import java.util.List;
-
-/**
- * The error details of a failed log query.
- */
-@Immutable
-public final class LogsQueryErrorDetails {
- private final String message;
- private final String code;
- private final List errors;
-
- /**
- * Creates an instance of {@link LogsQueryErrorDetails} with the failure code and target.
- * @param message The error message.
- * @param code The error code indicating the reason for the error.
- * @param errors The list of additional error details.
- */
- public LogsQueryErrorDetails(String message, String code, List errors) {
- this.message = message;
- this.code = code;
- this.errors = errors;
- }
-
- /**
- * Returns the error message.
- * @return The error message.
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * Returns the error code indicating the reason for the error
- * @return The error code indicating the reason for the error
- */
- public String getCode() {
- return code;
- }
-
- /**
- * Returns the list of additional error details.
- * @return the list of additional error details.
- */
- public List getErrors() {
- return errors;
- }
-}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryException.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryException.java
index 9916ba59af887..37a8ff362b657 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryException.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryException.java
@@ -10,21 +10,21 @@
* Exception thrown when a query to retrieve logs fails.
*/
public final class LogsQueryException extends HttpResponseException {
- private final transient LogsQueryErrorDetails error;
+ private final transient LogsQueryError error;
/**
- * Creates a new instance of this exception with the {@link HttpResponse} and {@link LogsQueryError error}
+ * Creates a new instance of this exception with the {@link HttpResponse} and {@link LogsQueryErrorDetail error}
* information.
* @param response The {@link HttpResponse}.
* @param error The {@link LogsQueryError error} details.
*/
- public LogsQueryException(HttpResponse response, LogsQueryErrorDetails error) {
+ public LogsQueryException(HttpResponse response, LogsQueryError error) {
super("Failed to executed logs query", response, error);
this.error = error;
}
@Override
- public LogsQueryErrorDetails getValue() {
+ public LogsQueryError getValue() {
return this.error;
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryResult.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryResult.java
index 4ca2daf8b8f20..f2d51d3efbba5 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryResult.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryResult.java
@@ -13,13 +13,19 @@
@Immutable
public final class LogsQueryResult {
private final List logsTables;
+ private final LogsQueryStatistics statistics;
+ private final LogsQueryError error;
/**
* Creates an instance {@link LogsQueryResult} with a list of {@link LogsTable}.
* @param logsTables The list of {@link LogsTable} returned as query result.
+ * @param statistics The query execution statistics.
+ * @param error The error details if there was an error executing the query.
*/
- public LogsQueryResult(List logsTables) {
+ public LogsQueryResult(List logsTables, LogsQueryStatistics statistics, LogsQueryError error) {
this.logsTables = logsTables;
+ this.statistics = statistics;
+ this.error = error;
}
/**
@@ -29,4 +35,20 @@ public LogsQueryResult(List logsTables) {
public List getLogsTables() {
return logsTables;
}
+
+ /**
+ * Returns the query statistics.
+ * @return the query statistics.
+ */
+ public LogsQueryStatistics getStatistics() {
+ return statistics;
+ }
+
+ /**
+ * Returns the error details if there was an error executing the query.
+ * @return the error details if there was an error executing the query.
+ */
+ public LogsQueryError getError() {
+ return error;
+ }
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryStatistics.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryStatistics.java
new file mode 100644
index 0000000000000..f817ef38c1274
--- /dev/null
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryStatistics.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.monitor.query.models;
+
+import com.azure.core.annotation.Immutable;
+
+/**
+ * The statistics information related to query execution.
+ */
+@Immutable
+public final class LogsQueryStatistics {
+ private final Object rawStatistics;
+
+ /**
+ * Creates an instance with the statistics information related to query execution.
+ * @param rawStatistics the statistics information related to query execution.
+ */
+ public LogsQueryStatistics(Object rawStatistics) {
+ this.rawStatistics = rawStatistics;
+ }
+
+ /**
+ * Returns the raw statistics information related to query execution as JSON object.
+ * @return the raw statistics information related to query execution as JSON object.
+ */
+ public Object getRawStatistics() {
+ return rawStatistics;
+ }
+}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableCell.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableCell.java
index 0dc670b14ee85..5a864a86ca34b 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableCell.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableCell.java
@@ -14,7 +14,7 @@
@Immutable
public final class LogsTableCell {
private final String columnName;
- private final ColumnDataType columnType;
+ private final LogsColumnType columnType;
private final int columnIndex;
private final int rowIndex;
private final String rowValue;
@@ -27,7 +27,7 @@ public final class LogsTableCell {
* @param rowIndex The row index of the row this cell is associated with.
* @param rowValue The value of the cell.
*/
- public LogsTableCell(String columnName, ColumnDataType columnType, int columnIndex, int rowIndex, String rowValue) {
+ public LogsTableCell(String columnName, LogsColumnType columnType, int columnIndex, int rowIndex, String rowValue) {
this.columnName = columnName;
this.columnType = columnType;
this.columnIndex = columnIndex;
@@ -39,7 +39,7 @@ public LogsTableCell(String columnName, ColumnDataType columnType, int columnInd
* Returns the data type of the value this cell contains.
* @return the data type of the value this cell contains.
*/
- public ColumnDataType getColumnType() {
+ public LogsColumnType getColumnType() {
return columnType;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableColumn.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableColumn.java
index 24c44c2045147..7171f19e61c87 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableColumn.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableColumn.java
@@ -8,14 +8,14 @@
*/
public final class LogsTableColumn {
private final String columnName;
- private final ColumnDataType columnType;
+ private final LogsColumnType columnType;
/**
* Creates a column in {@link LogsTable}.
* @param columnName The name of the column.
* @param columnType The data type of the value in this column.
*/
- public LogsTableColumn(String columnName, ColumnDataType columnType) {
+ public LogsTableColumn(String columnName, LogsColumnType columnType) {
this.columnName = columnName;
this.columnType = columnType;
}
@@ -32,7 +32,7 @@ public String getColumnName() {
* Returns the data type of the value in this column.
* @return the data type of the value in this column.
*/
- public ColumnDataType getColumnType() {
+ public LogsColumnType getColumnType() {
return columnType;
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableRow.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableRow.java
index f34b6ed096862..005fe21a202d3 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableRow.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableRow.java
@@ -88,23 +88,26 @@ public T getRowAsObject(Class type) {
return;
}
field.setAccessible(true);
- if (tableCell.getColumnType() == ColumnDataType.BOOL) {
+ if (tableCell.getColumnType() == LogsColumnType.BOOL) {
field.set(t, tableCell.getValueAsBoolean());
- } else if (tableCell.getColumnType() == ColumnDataType.DATETIME) {
+ } else if (tableCell.getColumnType() == LogsColumnType.DATETIME) {
field.set(t, tableCell.getValueAsDateTime());
- } else if (tableCell.getColumnType() == ColumnDataType.DYNAMIC) {
+ } else if (tableCell.getColumnType() == LogsColumnType.DYNAMIC) {
if (tableCell.getValueAsDynamic() != null) {
field.set(t,
tableCell.getValueAsDynamic()
.toObject(TypeReference.createInstance(field.getType())));
}
- } else if (tableCell.getColumnType() == ColumnDataType.INT) {
+ } else if (tableCell.getColumnType() == LogsColumnType.INT) {
field.set(t, tableCell.getValueAsInteger());
- } else if (tableCell.getColumnType() == ColumnDataType.LONG) {
+ } else if (tableCell.getColumnType() == LogsColumnType.LONG) {
field.set(t, tableCell.getValueAsLong());
- } else if (tableCell.getColumnType() == ColumnDataType.REAL) {
+ } else if (tableCell.getColumnType() == LogsColumnType.REAL
+ || tableCell.getColumnType() == LogsColumnType.DECIMAL) {
field.set(t, tableCell.getValueAsDouble());
- } else if (tableCell.getColumnType() == ColumnDataType.STRING) {
+ } else if (tableCell.getColumnType() == LogsColumnType.STRING
+ || tableCell.getColumnType() == LogsColumnType.GUID
+ || tableCell.getColumnType() == LogsColumnType.TIMESPAN) {
field.set(t, tableCell.getValueAsString());
}
field.setAccessible(false);
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metrics.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metric.java
similarity index 81%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metrics.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metric.java
index c08e1897125b3..b024a5add767b 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metrics.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metric.java
@@ -11,12 +11,12 @@
* The metrics result of a query.
*/
@Immutable
-public final class Metrics {
+public final class Metric {
private final String id;
private final String type;
- private final MetricsUnit unit;
+ private final MetricUnit unit;
private final String metricsName;
- private final List timeSeries;
+ private final List timeSeries;
/**
* Creates an instance of the result data of a query.
@@ -26,8 +26,8 @@ public final class Metrics {
* @param metricsName The name of the metrics.
* @param timeseries The time series returned when the query is performed.
*/
- public Metrics(String id, String type, MetricsUnit unit,
- String metricsName, List timeseries) {
+ public Metric(String id, String type, MetricUnit unit,
+ String metricsName, List timeseries) {
this.id = id;
this.type = type;
this.unit = unit;
@@ -35,7 +35,6 @@ public Metrics(String id, String type, MetricsUnit unit,
this.timeSeries = timeseries;
}
-
/**
* Returns the name of the metrics.
* @return the name of the metrics.
@@ -64,7 +63,7 @@ public String getType() {
* Returns the metrics unit of the metrics.
* @return the unit of the metrics.
*/
- public MetricsUnit getUnit() {
+ public MetricUnit getUnit() {
return unit;
}
@@ -72,7 +71,7 @@ public MetricsUnit getUnit() {
* Returns the time series returned when a data query is performed.
* @return the time series returned when a data query is performed.
*/
- public List getTimeSeries() {
+ public List getTimeSeries() {
return timeSeries;
}
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsAvailability.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricAvailability.java
similarity index 92%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsAvailability.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricAvailability.java
index 79fc9d24ee7d1..955a736229171 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsAvailability.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricAvailability.java
@@ -12,7 +12,7 @@
* time grain.
*/
@Fluent
-public final class MetricsAvailability {
+public final class MetricAvailability {
/*
* the time grain specifies the aggregation interval for the metric.
* Expressed as a duration 'PT1M', 'P1D', etc.
@@ -44,7 +44,7 @@ public Duration getTimeGrain() {
* @param timeGrain the timeGrain value to set.
* @return the MetricAvailability object itself.
*/
- public MetricsAvailability setTimeGrain(Duration timeGrain) {
+ public MetricAvailability setTimeGrain(Duration timeGrain) {
this.timeGrain = timeGrain;
return this;
}
@@ -66,7 +66,7 @@ public Duration getRetention() {
* @param retention the retention value to set.
* @return the MetricAvailability object itself.
*/
- public MetricsAvailability setRetention(Duration retention) {
+ public MetricAvailability setRetention(Duration retention) {
this.retention = retention;
return this;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsDefinition.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricDefinition.java
similarity index 88%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsDefinition.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricDefinition.java
index 7c1abe8e766aa..b9dfa7e0eb9ea 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsDefinition.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricDefinition.java
@@ -9,7 +9,7 @@
/** Metric definition class specifies the metadata for a metric. */
@Fluent
-public final class MetricsDefinition {
+public final class MetricDefinition {
/*
* Flag to indicate whether the dimension is required.
*/
@@ -45,7 +45,7 @@ public final class MetricsDefinition {
* the unit of the metric.
*/
@JsonProperty(value = "unit")
- private MetricsUnit unit;
+ private MetricUnit unit;
/*
* the primary aggregation type value defining how to use the values for
@@ -59,7 +59,7 @@ public final class MetricsDefinition {
* queried.
*/
@JsonProperty(value = "metricAvailabilities")
- private List metricAvailabilities;
+ private List metricAvailabilities;
/*
* the resource identifier of the metric definition.
@@ -89,7 +89,7 @@ public Boolean isDimensionRequired() {
* @param isDimensionRequired the isDimensionRequired value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setIsDimensionRequired(Boolean isDimensionRequired) {
+ public MetricDefinition setIsDimensionRequired(Boolean isDimensionRequired) {
this.isDimensionRequired = isDimensionRequired;
return this;
}
@@ -109,7 +109,7 @@ public String getResourceId() {
* @param resourceId the resourceId value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setResourceId(String resourceId) {
+ public MetricDefinition setResourceId(String resourceId) {
this.resourceId = resourceId;
return this;
}
@@ -129,7 +129,7 @@ public LocalizableString getName() {
* @param name the name value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setName(LocalizableString name) {
+ public MetricDefinition setName(LocalizableString name) {
this.name = name;
return this;
}
@@ -149,7 +149,7 @@ public String getDisplayDescription() {
* @param displayDescription the displayDescription value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setDisplayDescription(String displayDescription) {
+ public MetricDefinition setDisplayDescription(String displayDescription) {
this.displayDescription = displayDescription;
return this;
}
@@ -169,7 +169,7 @@ public String getCategory() {
* @param category the category value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setCategory(String category) {
+ public MetricDefinition setCategory(String category) {
this.category = category;
return this;
}
@@ -179,7 +179,7 @@ public MetricsDefinition setCategory(String category) {
*
* @return the unit value.
*/
- public MetricsUnit getUnit() {
+ public MetricUnit getUnit() {
return this.unit;
}
@@ -189,7 +189,7 @@ public MetricsUnit getUnit() {
* @param unit the unit value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setUnit(MetricsUnit unit) {
+ public MetricDefinition setUnit(MetricUnit unit) {
this.unit = unit;
return this;
}
@@ -211,7 +211,7 @@ public AggregationType getPrimaryAggregationType() {
* @param primaryAggregationType the primaryAggregationType value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setPrimaryAggregationType(AggregationType primaryAggregationType) {
+ public MetricDefinition setPrimaryAggregationType(AggregationType primaryAggregationType) {
this.primaryAggregationType = primaryAggregationType;
return this;
}
@@ -221,7 +221,7 @@ public MetricsDefinition setPrimaryAggregationType(AggregationType primaryAggreg
*
* @return the metricAvailabilities value.
*/
- public List getMetricAvailabilities() {
+ public List getMetricAvailabilities() {
return this.metricAvailabilities;
}
@@ -231,7 +231,7 @@ public List getMetricAvailabilities() {
* @param metricAvailabilities the metricAvailabilities value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setMetricAvailabilities(List metricAvailabilities) {
+ public MetricDefinition setMetricAvailabilities(List metricAvailabilities) {
this.metricAvailabilities = metricAvailabilities;
return this;
}
@@ -251,7 +251,7 @@ public String getId() {
* @param id the id value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setId(String id) {
+ public MetricDefinition setId(String id) {
this.id = id;
return this;
}
@@ -271,7 +271,7 @@ public List getDimensions() {
* @param dimensions the dimensions value to set.
* @return the MetricDefinition object itself.
*/
- public MetricsDefinition setDimensions(List dimensions) {
+ public MetricDefinition setDimensions(List dimensions) {
this.dimensions = dimensions;
return this;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespace.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespace.java
similarity index 88%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespace.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespace.java
index 10a959055d6f5..fdaeba4288fcc 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespace.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespace.java
@@ -8,7 +8,7 @@
/** Metric namespace class specifies the metadata for a metric namespace. */
@Fluent
-public final class MetricsNamespace {
+public final class MetricNamespace {
/*
* The ID of the metric namespace.
*/
@@ -37,7 +37,7 @@ public final class MetricsNamespace {
* Properties which include the fully qualified namespace name.
*/
@JsonProperty(value = "properties")
- private MetricsNamespaceName properties;
+ private MetricNamespaceName properties;
/**
* Get the id property: The ID of the metric namespace.
@@ -54,7 +54,7 @@ public String getId() {
* @param id the id value to set.
* @return the MetricNamespace object itself.
*/
- public MetricsNamespace setId(String id) {
+ public MetricNamespace setId(String id) {
this.id = id;
return this;
}
@@ -74,7 +74,7 @@ public String getType() {
* @param type the type value to set.
* @return the MetricNamespace object itself.
*/
- public MetricsNamespace setType(String type) {
+ public MetricNamespace setType(String type) {
this.type = type;
return this;
}
@@ -94,7 +94,7 @@ public String getName() {
* @param name the name value to set.
* @return the MetricNamespace object itself.
*/
- public MetricsNamespace setName(String name) {
+ public MetricNamespace setName(String name) {
this.name = name;
return this;
}
@@ -114,7 +114,7 @@ public NamespaceClassification getClassification() {
* @param classification the classification value to set.
* @return the MetricNamespace object itself.
*/
- public MetricsNamespace setClassification(NamespaceClassification classification) {
+ public MetricNamespace setClassification(NamespaceClassification classification) {
this.classification = classification;
return this;
}
@@ -124,7 +124,7 @@ public MetricsNamespace setClassification(NamespaceClassification classification
*
* @return the properties value.
*/
- public MetricsNamespaceName getProperties() {
+ public MetricNamespaceName getProperties() {
return this.properties;
}
@@ -134,7 +134,7 @@ public MetricsNamespaceName getProperties() {
* @param properties the properties value to set.
* @return the MetricNamespace object itself.
*/
- public MetricsNamespace setProperties(MetricsNamespaceName properties) {
+ public MetricNamespace setProperties(MetricNamespaceName properties) {
this.properties = properties;
return this;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespaceName.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespaceName.java
similarity index 89%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespaceName.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespaceName.java
index b0448b1349210..01d976070d6c4 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespaceName.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespaceName.java
@@ -8,7 +8,7 @@
/** The fully qualified metric namespace name. */
@Fluent
-public final class MetricsNamespaceName {
+public final class MetricNamespaceName {
/*
* The metric namespace name.
*/
@@ -30,7 +30,7 @@ public String getMetricNamespaceName() {
* @param metricNamespaceName the metricNamespaceName value to set.
* @return the MetricNamespaceName object itself.
*/
- public MetricsNamespaceName setMetricNamespaceName(String metricNamespaceName) {
+ public MetricNamespaceName setMetricNamespaceName(String metricNamespaceName) {
this.metricNamespaceName = metricNamespaceName;
return this;
}
diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsTimeSeriesElement.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricTimeSeriesElement.java
similarity index 62%
rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsTimeSeriesElement.java
rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricTimeSeriesElement.java
index dc9d11489916e..104f84e3dca58 100644
--- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsTimeSeriesElement.java
+++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricTimeSeriesElement.java
@@ -8,15 +8,15 @@
/**
* A time series result type.
*/
-public final class MetricsTimeSeriesElement {
- private final List data;
+public final class MetricTimeSeriesElement {
+ private final List data;
/**
- * Creates an instance of {@link MetricsTimeSeriesElement} with a list of data points representing the metric
+ * Creates an instance of {@link MetricTimeSeriesElement} with a list of data points representing the metric
* values.
* @param data a list of data points representing the metric values.
*/
- public MetricsTimeSeriesElement(List data) {
+ public MetricTimeSeriesElement(List data) {
this.data = data;
}
@@ -24,7 +24,7 @@ public MetricsTimeSeriesElement(List data) {
* Returns a list of data points representing the metric values.
* @return a list of data points representing the metric
*/
- public List getData() {
+ public List